]> Cypherpunks repositories - gostls13.git/commit
fmt: allow recursive calls to Fscan etc.
authorRoger Peppe <rogpeppe@gmail.com>
Wed, 2 Mar 2011 18:54:23 +0000 (10:54 -0800)
committerRob Pike <r@golang.org>
Wed, 2 Mar 2011 18:54:23 +0000 (10:54 -0800)
commit81bfbe93331bcf5b67a61ae76af45844af3971e1
tree2d7058d8b890714d21533207d6a542769d728abe
parent324cc3d0408ff45392590d4f38e199f286d3eb57
fmt: allow recursive calls to Fscan etc.
Add a new Read method to ScanState so that it
satisfies the io.Reader interface; rename
Getrune and Ungetrune to ReadRune and UnreadRune.
Make sure ReadRune does not read past width restrictions;
remove now-unnecessary Width method from ScanState.
Also make the documentation a little clearer as to
how ReadRune and UnreadRune are used.

R=r, r2
CC=golang-dev
https://golang.org/cl/4240056
src/pkg/fmt/doc.go
src/pkg/fmt/scan.go
src/pkg/fmt/scan_test.go