From b7fb49c6246de957e46be7dd0b10a2b3966af51e Mon Sep 17 00:00:00 2001 From: Guillaume Ballet Date: Fri, 5 Jul 2019 11:04:41 +0200 Subject: [PATCH] accounts/abi: Gary's review feedback --- accounts/abi/bind/bind.go | 4 ++-- cmd/abigen/main.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/accounts/abi/bind/bind.go b/accounts/abi/bind/bind.go index 5da1b2b7a1..8445003439 100644 --- a/accounts/abi/bind/bind.go +++ b/accounts/abi/bind/bind.go @@ -25,13 +25,13 @@ import ( "errors" "fmt" "go/format" - "log" "regexp" "strings" "text/template" "unicode" "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/log" ) // Lang is a target programming language selector to generate bindings for. @@ -153,7 +153,7 @@ func Bind(types []string, abis []string, bytecodes []string, fsigs []map[string] for pattern, name := range libs { matched, err := regexp.Match("__\\$"+pattern+"\\$__", []byte(contracts[types[i]].InputBin)) if err != nil { - log.Fatalf("Could not search for pattern %v in %v: %v", pattern, contracts[types[i]], err) + log.Error("Could not search for pattern", "pattern", pattern, "contract", contracts[types[i]], "err", err) } if matched { contracts[types[i]].Libraries[pattern] = name diff --git a/cmd/abigen/main.go b/cmd/abigen/main.go index 16cb0df08c..aaf2f9fa86 100644 --- a/cmd/abigen/main.go +++ b/cmd/abigen/main.go @@ -82,7 +82,7 @@ func main() { bins []string types []string sigs []map[string]string - libs map[string]string + libs = make(map[string]string) ) if *solFlag != "" || *vyFlag != "" || *abiFlag == "-" { // Generate the list of types to exclude from binding