gopy: apply golint fixes

This commit is contained in:
Sebastien Binet 2017-08-09 22:22:09 +02:00
parent a446b7dcef
commit 0ab5a46669
3 changed files with 7 additions and 7 deletions

View File

@ -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
}

View File

@ -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,
)

2
gen.go
View File

@ -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 {