1
0
mirror of https://github.com/golang/go synced 2024-09-30 22:48:32 -06:00

goimports: print \n at end of errors

LGTM=r
R=r
CC=bradfitz, golang-codereviews
https://golang.org/cl/136230045
This commit is contained in:
Russ Cox 2014-09-05 14:13:44 -04:00
parent f0c7ec0ef3
commit 27a49c973b

View File

@ -279,14 +279,14 @@ func loadExportsGoPath(dir string) map[string]bool {
if strings.Contains(err.Error(), "no buildable Go source files in") {
return nil
}
fmt.Fprintf(os.Stderr, "could not import %q: %v", dir, err)
fmt.Fprintf(os.Stderr, "could not import %q: %v\n", dir, err)
return nil
}
fset := token.NewFileSet()
for _, file := range buildPkg.GoFiles {
f, err := parser.ParseFile(fset, filepath.Join(dir, file), nil, 0)
if err != nil {
fmt.Fprintf(os.Stderr, "could not parse %q: %v", file, err)
fmt.Fprintf(os.Stderr, "could not parse %q: %v\n", file, err)
continue
}
for name := range f.Scope.Objects {