1
0
mirror of https://github.com/golang/go synced 2024-11-21 21:14:47 -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:
Robert Griesemer 2012-08-30 16:10:33 -07:00
parent 363ec80dec
commit d6c69dc602

View File

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