Reader previously had cached an error from the underlying reader
and would return it on every subsequent call to Read. The Reader
will now return the error only once, and subsequent calls will result
in a new Read call to the underlying Reader.
Fixes#1934.
R=bradfitz, rogpeppe, rsc
CC=golang-dev
https://golang.org/cl/4528133
It matches encoding/line exactly and the tests are copied from there.
If we land this, then encoding/line will get marked as deprecated then
deleted in time.
R=rsc, rog, peterGo
CC=golang-dev
https://golang.org/cl/4389046
Dependency on bufio crept in during last CL; this breaks the cycle.
Also add a missing '-' to the documentation.
R=rsc
CC=golang-dev
https://golang.org/cl/4274061
I have written a tool to verify Printf calls, and although it's not
ready to be reviewed yet it's already uncovered a spate of problems
in the repository. I'm sending this CL to break the changes into
pieces; as the tool improves it will find more, I'm sure.
R=rsc
CC=golang-dev
https://golang.org/cl/3427043
After a fill(), there is nothing to back up. Make sure UnreadRune
recognizes the situation.
Fixes#1137.
(Stops the crash, but doesn't make UnreadRune usable after a Peek()).
R=rsc
CC=golang-dev
https://golang.org/cl/2498041
On error, ReadSlice is defined to return the available data
and advance past that data, but it was not behaving that
way for err == ErrBufferFull, making it harder for callers to
handle well.
R=r
CC=golang-dev
https://golang.org/cl/1480041
parsing and printing to new syntax.
Use -oldparser to parse the old syntax,
use -oldprinter to print the old syntax.
2) Change default gofmt formatting settings
to use tabs for indentation only and to use
spaces for alignment. This will make the code
alignment insensitive to an editor's tabwidth.
Use -spaces=false to use tabs for alignment.
3) Manually changed src/exp/parser/parser_test.go
so that it doesn't try to parse the parser's
source files using the old syntax (they have
new syntax now).
4) gofmt -w src misc test/bench
1st set of files.
R=rsc
CC=agl, golang-dev, iant, ken2, r
https://golang.org/cl/180047
delete strings.Buffer
add a test for a bug not caught before (mustn't install zero-length blocks)
R=rsc
DELTA=987 (289 added, 587 deleted, 111 changed)
OCL=34850
CL=34850
make strings.Buffer handle strings and bytes with comparable efficiency.
if ok, next step will be to move this code to bytes.Buffer and terminate
strings.Buffer's short happy life.
R=rsc
DELTA=292 (212 added, 0 deleted, 80 changed)
OCL=34837
CL=34849
remove io.ErrEOF.
rename io.FullRead to io.ReadFull, to match
ReadAtLeast and ReadAll.
remove io.FullReader, because it is now unused.
R=r
DELTA=295 (88 added, 105 deleted, 102 changed)
OCL=30544
CL=30588