golang go-ethereum contract string to [32]byte
func covertStringByte32(t string) [32]byte { var b32 [32]byte copy(b32[:], []byte(t)) return b32 } func covertStringByte64(t string) [64]byte { var b64 [64]byte copy(b64[:], []byte(t)) return b64 }
func covertStringByte32(t string) [32]byte { var b32 [32]byte copy(b32[:], []byte(t)) return b32 } func covertStringByte64(t string) [64]byte { var b64 [64]byte copy(b64[:], []byte(t)) return b64 }
httpexpect star 1159 https://github.com/gavv/httpexpect https://github.com/gavv/httpexpect/blob/master/_examples/echo_test.go goconvey https://segmentfault.com/a/1190000014924022 https://github.com/smartystreets/goconvey/ baloo star 652 https://github.com/h2non/baloo frisby star 249 https://github.com/verdverm/frisby apitest star 121 https://github.com/steinfletcher/apitest
https://segmentfault.com/a/1190000020185565
https://segmentfault.com/a/1190000020086749
https://stackoverflow.com/questions/52079662/go-get-cannot-find-local-packages-when-using-multiple-modules-in-a-repo api/contracts/contract.go package contracts import ( "math/big" "strings" ).... func DeployContract(...) api/contract.go package main import ( "api/contracts" ...) func deployContract(c echo.Context) error { address, tx, token, err := contracts.DeployContract(auth, client) ... } ! Best Import is api/go.mod module api require ( api/contracts v0.0.0 ...) replace ( api/contracts v0.0.0 => ./contracts ...) And api/contracts/go.mod module api/contracts require ( ...) ``` ` `` ``````