summaryrefslogtreecommitdiff
path: root/src/text/scanner/example_test.go
Commit message (Collapse)AuthorAgeFilesLines
* text/scanner: use correct token position in exampleRobert Griesemer2017-05-121-19/+16
| | | | | | | | | | | | | | While at it, unindent source text so column values are easier to read, remove unnecessary text in output, and simplify the loop. Fixes #20346. Change-Id: I0fde02b9e4242383da427f4cf4c6c13dd0ab3b47 Reviewed-on: https://go-review.googlesource.com/43450 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* text/scanner: better error message if no error handler is installedRobert Griesemer2016-05-251-10/+11
| | | | | | | | | | | This is reverting golang.org/cl/19622 and introducing "<input>" as filename if no filename is specified. Fixes #15813. Change-Id: Iafc74b789fa33f48ee639c42d4aebc6f06435f95 Reviewed-on: https://go-review.googlesource.com/23402 Reviewed-by: Russ Cox <rsc@golang.org>
* text/scanner: add runnable example for packageCarlos C2015-06-241-0/+38
Change-Id: I42a952b04a56fb888fa7d5d9c2b56cbdd3434034 Reviewed-on: https://go-review.googlesource.com/11246 Reviewed-by: Andrew Gerrand <adg@golang.org>