mirror of
https://github.com/golang/go
synced 2024-11-22 02:54:39 -07:00
go/scanner: don't print garbage if there's no error
R=r CC=golang-dev https://golang.org/cl/6489059
This commit is contained in:
parent
363ec80dec
commit
d6c69dc602
@ -120,7 +120,7 @@ func PrintError(w io.Writer, err error) {
|
||||
for _, e := range list {
|
||||
fmt.Fprintf(w, "%s\n", e)
|
||||
}
|
||||
} else {
|
||||
} else if err != nil {
|
||||
fmt.Fprintf(w, "%s\n", err)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user