aboutsummaryrefslogtreecommitdiffstats
path: root/generators/defaults.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-04-15 17:06:57 +0800
committerFelix Lange <fjl@twurst.com>2016-04-15 17:17:27 +0800
commit6fdd0893c3ebf57e5a9ba2af569c595c859ab902 (patch)
tree2df67265a0350b68b2f10ba2f7dcd292fef59ad0 /generators/defaults.go
parent68c755a238f1a204087c2843f01d48fc6039716f (diff)
downloadgo-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.gz
go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.zst
go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.zip
all: fix go vet warnings
Diffstat (limited to 'generators/defaults.go')
-rw-r--r--generators/defaults.go10
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)
}
}