Browse Source

all: fix vet issues with build tags, formatting

* Build tags need to come before the package name
and have at least a blank line, between them and
the package, please see
  https://golang.org/pkg/go/build/#hdr-Build_Constraints
* fmt.Println doesn't take formatting verbs
* Fix a missing formatting argument to fmt.Printf
pull/1780/head
Emmanuel Odeke 7 years ago
parent
commit
bbc3b807c6
No known key found for this signature in database GPG Key ID: 1CA47A292F89DD40
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      tests/server/client.go
  2. +2
    -2
      types/protoreplace/protoreplace.go

+ 2
- 2
tests/server/client.go View File

@ -21,7 +21,7 @@ func InitChain(client abcicli.Client) error {
}
_, err := client.InitChainSync(types.RequestInitChain{Validators: vals})
if err != nil {
fmt.Println("Failed test: InitChain - %v", err)
fmt.Printf("Failed test: InitChain - %v\n", err)
return err
}
fmt.Println("Passed test: InitChain")
@ -46,7 +46,7 @@ func Commit(client abcicli.Client, hashExp []byte) error {
_, data := res.Code, res.Data
if err != nil {
fmt.Println("Failed test: Commit")
fmt.Printf("committing %v\nlog: %v", res.GetLog())
fmt.Printf("committing %v\nlog: %v", data, res.GetLog())
return err
}
if !bytes.Equal(data, hashExp) {


+ 2
- 2
types/protoreplace/protoreplace.go View File

@ -1,7 +1,7 @@
package main
// +build ignore
package main
import (
"bytes"
"fmt"


Loading…
Cancel
Save