diff options
author | Russ Cox <rsc@golang.org> | 2009-08-27 11:20:15 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-08-27 11:20:15 -0700 |
commit | e0347fcfd827558d7b7a15995d61a17cb080b11d (patch) | |
tree | 4630cb5e26c85e719c02e5a360c3eaa04f42748f /src/pkg/net/parse_test.go | |
parent | 43f160a74b60cb31146233bca5bd967539799aea (diff) | |
download | golang-e0347fcfd827558d7b7a15995d61a17cb080b11d.tar.gz |
remove Line in bufio.ReadLine(Bytes|Slice|String)
also drop bool arg from ReadString
R=r
DELTA=45 (13 added, 1 deleted, 31 changed)
OCL=33923
CL=33960
Diffstat (limited to 'src/pkg/net/parse_test.go')
-rw-r--r-- | src/pkg/net/parse_test.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pkg/net/parse_test.go b/src/pkg/net/parse_test.go index 227ae55f1..c95138896 100644 --- a/src/pkg/net/parse_test.go +++ b/src/pkg/net/parse_test.go @@ -28,7 +28,10 @@ func TestReadLine(t *testing.T) { lineno := 1; byteno := 0; for { - bline, berr := br.ReadLineString('\n', false); + bline, berr := br.ReadString('\n'); + if n := len(bline); n > 0 { + bline = bline[0:n-1]; + } line, ok := file.readLine(); if (berr != nil) != !ok || bline != line { t.Fatalf("%s:%d (#%d)\nbufio => %q, %v\nnet => %q, %v", |