diff options
author | Felix Lange <fjl@twurst.com> | 2016-04-15 17:06:57 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-04-15 17:17:27 +0800 |
commit | 6fdd0893c3ebf57e5a9ba2af569c595c859ab902 (patch) | |
tree | 2df67265a0350b68b2f10ba2f7dcd292fef59ad0 /generators | |
parent | 68c755a238f1a204087c2843f01d48fc6039716f (diff) | |
download | dexon-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.gz dexon-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.zst dexon-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.zip |
all: fix go vet warnings
Diffstat (limited to 'generators')
-rw-r--r-- | generators/defaults.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/generators/defaults.go b/generators/defaults.go index aec4fe845..107e13e67 100644 --- a/generators/defaults.go +++ b/generators/defaults.go @@ -28,7 +28,7 @@ import ( "strings" ) -func fatal(str string, v ...interface{}) { +func fatalf(str string, v ...interface{}) { fmt.Fprintf(os.Stderr, str, v...) os.Exit(1) } @@ -40,12 +40,12 @@ type setting struct { func main() { if len(os.Args) < 3 { - fatal("usage %s <input> <output>\n", os.Args[0]) + fatalf("usage %s <input> <output>\n", os.Args[0]) } content, err := ioutil.ReadFile(os.Args[1]) if err != nil { - fatal("error reading file %v\n", err) + fatalf("error reading file %v\n", err) } m := make(map[string]setting) @@ -54,7 +54,7 @@ func main() { filepath := filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "params", os.Args[2]) output, err := os.OpenFile(filepath, os.O_RDWR|os.O_CREATE, 0666) if err != nil { - fatal("error opening file for writing %v\n", err) + fatalf("error opening file for writing %v\n", err) } output.WriteString(`// DO NOT EDIT!!! @@ -76,6 +76,6 @@ var ( cmd := exec.Command("gofmt", "-w", filepath) if err := cmd.Run(); err != nil { - fatal("gofmt failed: %v\n", err) + fatalf("gofmt failed: %v\n", err) } } |