A "break" statement terminates execution of the innermost "for", "switch", or "select" statement within the same function.
package main
import (
"fmt"
"time"
)| function getOriginAddress(bytes32 signedMessage, uint8 v, bytes32 r, bytes32 s) constant returns(address) { | |
| bytes memory prefix = "\x19Ethereum Signed Message:\n32"; | |
| bytes32 prefixedHash = keccak256(prefix, signedMessage); | |
| return ecrecover(prefixedHash, v, r, s); | |
| } |
| const message = web3.sha3('Hello World'); | |
| const signature = await web3.eth.sign(account, message); | |
| const { v, r, s } = ethUtil.fromRpcSig(signature); |
| type Store struct { | |
| q Querier | |
| } | |
| type DB interface { | |
| Querier | |
| Beginx() (*sqlx.Tx, error) | |
| } | |
| type Tx interface { |
| # Javascript Node CircleCI 2.0 configuration file | |
| # | |
| # Check https://circleci.com/docs/2.0/language-javascript/ for more details | |
| # | |
| # | |
| version: 2 | |
| jobs: | |
| build: | |
| docker: | |
| # specify the version you desire here |
'nil' is surprising NOT a keyword, but a predeclared identifier
map, slice, pointer, interface, channel, func "nil is predeclared identifier representing the zero value for a point, channel, func, interface, map or slice"
nil
| const message = web3.sha3('Hello World'); | |
| const signature = await web3.eth.sign(account, message); | |
| const { v, r, s } = ethUtil.fromRpcSig(signature); |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "github.com/gorilla/mux" | |
| "github.com/jinzhu/gorm" |
| package main | |
| import ( | |
| "database/sql" | |
| "log" | |
| ) | |
| func main() { | |
| db, err := sql.Open("VENDOR_HERE", "YOUR_DSN_HERE") | |
| handleError(err) |