text/scanner: mention package when reporting errors to stderr

Fixes #14166.

Change-Id: I325b283a1d53e73a6d862611c446820ab94a161c
Reviewed-on: https://go-review.googlesource.com/19622
Reviewed-by: Damien Neil <dneil@google.com>
This commit is contained in:
Robert Griesemer 2016-02-18 11:43:52 -08:00
parent 8fd1634f44
commit a576e9883c

View File

@ -333,7 +333,7 @@ func (s *Scanner) error(msg string) {
if !pos.IsValid() {
pos = s.Pos()
}
fmt.Fprintf(os.Stderr, "%s: %s\n", pos, msg)
fmt.Fprintf(os.Stderr, "text/scanner: %s: %s\n", pos, msg)
}
func (s *Scanner) isIdentRune(ch rune, i int) bool {