diff --git a/bootstrap/bpglob/bpglob.go b/bootstrap/bpglob/bpglob.go index cb6633b..1097760 100644 --- a/bootstrap/bpglob/bpglob.go +++ b/bootstrap/bpglob/bpglob.go @@ -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() } diff --git a/bpfmt/bpfmt.go b/bpfmt/bpfmt.go index ba4d9b3..17fe513 100644 --- a/bpfmt/bpfmt.go +++ b/bpfmt/bpfmt.go @@ -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) } diff --git a/bpmodify/bpmodify.go b/bpmodify/bpmodify.go index 6a3c803..446034b 100644 --- a/bpmodify/bpmodify.go +++ b/bpmodify/bpmodify.go @@ -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) } diff --git a/microfactory/microfactory_test.go b/microfactory/microfactory_test.go index 083c9a6..8356adf 100644 --- a/microfactory/microfactory_test.go +++ b/microfactory/microfactory_test.go @@ -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 {