diff --git a/cmd_bind.go b/cmd_bind.go index 029c933..14e45c1 100644 --- a/cmd_bind.go +++ b/cmd_bind.go @@ -62,7 +62,7 @@ func gopyRunCmdBind(cmdr *commander.Command, args []string) error { err = os.MkdirAll(odir, 0755) if err != nil { return fmt.Errorf( - "gopy-bind: could not create output directory: %v\n", err, + "gopy-bind: could not create output directory: %v", err, ) } } @@ -75,7 +75,7 @@ func gopyRunCmdBind(cmdr *commander.Command, args []string) error { pkg, err := newPackage(path) if err != nil { return fmt.Errorf( - "gopy-bind: go/build.Import failed with path=%q: %v\n", + "gopy-bind: go/build.Import failed with path=%q: %v", path, err, ) @@ -190,7 +190,7 @@ func gopyRunCmdBind(cmdr *commander.Command, args []string) error { case "python3", "py3": return fmt.Errorf("gopy: python-3 support not yet implemented") default: - return fmt.Errorf("unknown target language: %q\n", lang) + return fmt.Errorf("gopy: unknown target language: %q", lang) } return err } diff --git a/cmd_gen.go b/cmd_gen.go index 118f49c..d8f9cac 100644 --- a/cmd_gen.go +++ b/cmd_gen.go @@ -58,7 +58,7 @@ func gopyRunCmdGen(cmdr *commander.Command, args []string) error { err = os.MkdirAll(odir, 0755) if err != nil { return fmt.Errorf( - "gopy-gen: could not create output directory: %v\n", err, + "gopy-gen: could not create output directory: %v", err, ) } } @@ -66,7 +66,7 @@ func gopyRunCmdGen(cmdr *commander.Command, args []string) error { odir, err = filepath.Abs(odir) if err != nil { return fmt.Errorf( - "gopy-gen: could not infer absolute path to output directory: %v\n", + "gopy-gen: could not infer absolute path to output directory: %v", err, ) } @@ -75,7 +75,7 @@ func gopyRunCmdGen(cmdr *commander.Command, args []string) error { pkg, err := newPackage(path) if err != nil { return fmt.Errorf( - "gopy-gen: go/build.Import failed with path=%q: %v\n", + "gopy-gen: go/build.Import failed with path=%q: %v", path, err, ) diff --git a/gen.go b/gen.go index 66430e6..380657a 100644 --- a/gen.go +++ b/gen.go @@ -115,7 +115,7 @@ func genPkg(odir string, p *bind.Package, lang string) error { } default: - return fmt.Errorf("unknown target language: %q\n", lang) + return fmt.Errorf("gopy: unknown target language: %q", lang) } if err != nil {