Merge pull request #199 from colincross/vet
Fix format issues found by go vet
This commit is contained in:
commit
f12def88ce
4 changed files with 7 additions and 7 deletions
|
@ -52,7 +52,7 @@ func (m *multiArg) Get() interface{} {
|
|||
}
|
||||
|
||||
func usage() {
|
||||
fmt.Fprintf(os.Stderr, "usage: bpglob -o out glob\n")
|
||||
fmt.Fprintln(os.Stderr, "usage: bpglob -o out glob")
|
||||
flag.PrintDefaults()
|
||||
os.Exit(2)
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ func main() {
|
|||
flag.Parse()
|
||||
|
||||
if *out == "" {
|
||||
fmt.Fprintf(os.Stderr, "error: -o is required\n")
|
||||
fmt.Fprintln(os.Stderr, "error: -o is required")
|
||||
usage()
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ func usage() {
|
|||
|
||||
func usageViolation(violation string) {
|
||||
fmt.Fprintln(os.Stderr, violation)
|
||||
fmt.Fprintf(os.Stderr, "usage: bpfmt [flags] [path ...]\n")
|
||||
fmt.Fprintln(os.Stderr, "usage: bpfmt [flags] [path ...]")
|
||||
flag.PrintDefaults()
|
||||
os.Exit(2)
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ func report(err error) {
|
|||
}
|
||||
|
||||
func usage() {
|
||||
fmt.Fprintf(os.Stderr, "usage: bpmodify [flags] [path ...]\n")
|
||||
fmt.Fprintln(os.Stderr, "usage: bpmodify [flags] [path ...]")
|
||||
flag.PrintDefaults()
|
||||
os.Exit(2)
|
||||
}
|
||||
|
|
|
@ -81,13 +81,13 @@ func TestBadPackagePathMap(t *testing.T) {
|
|||
t.Error("Expected error with blank argument, but none returned")
|
||||
}
|
||||
if err := pkgMap.Set("a=a"); err != nil {
|
||||
t.Error("Unexpected error: %v", err)
|
||||
t.Errorf("Unexpected error: %v", err)
|
||||
}
|
||||
if err := pkgMap.Set("a=b"); err == nil {
|
||||
t.Error("Expected error with duplicate package prefix, but none returned")
|
||||
}
|
||||
if _, ok, err := pkgMap.Path("testing"); err != nil {
|
||||
t.Error("Unexpected error: %v", err)
|
||||
t.Errorf("Unexpected error: %v", err)
|
||||
} else if ok {
|
||||
t.Error("Expected testing to be consider in the stdlib")
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ func TestSingleBuild(t *testing.T) {
|
|||
pkg := loadPkg()
|
||||
|
||||
if err := pkg.Compile(config, filepath.Join(dir, "out")); err != nil {
|
||||
t.Fatalf("Got error when compiling:", err)
|
||||
t.Fatal("Got error when compiling:", err)
|
||||
}
|
||||
|
||||
if err := pkg.Link(config, out); err != nil {
|
||||
|
|
Loading…
Reference in a new issue