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