mirror of
https://github.com/golang/go
synced 2024-10-01 03:28: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:
parent
f0c7ec0ef3
commit
27a49c973b
@ -279,14 +279,14 @@ func loadExportsGoPath(dir string) map[string]bool {
|
|||||||
if strings.Contains(err.Error(), "no buildable Go source files in") {
|
if strings.Contains(err.Error(), "no buildable Go source files in") {
|
||||||
return nil
|
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
|
return nil
|
||||||
}
|
}
|
||||||
fset := token.NewFileSet()
|
fset := token.NewFileSet()
|
||||||
for _, file := range buildPkg.GoFiles {
|
for _, file := range buildPkg.GoFiles {
|
||||||
f, err := parser.ParseFile(fset, filepath.Join(dir, file), nil, 0)
|
f, err := parser.ParseFile(fset, filepath.Join(dir, file), nil, 0)
|
||||||
if err != nil {
|
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
|
continue
|
||||||
}
|
}
|
||||||
for name := range f.Scope.Objects {
|
for name := range f.Scope.Objects {
|
||||||
|
Loading…
Reference in New Issue
Block a user