* avoid large copies
	* NewBufRead, NewBufWrite never fail
	* add BufReadWrite

io:
	* add io.Close

http, google/net/rpc:
	* add, use http.Conn.Hijack

R=r
DELTA=416  (202 added, 123 deleted, 91 changed)
OCL=24153
CL=24238
This commit is contained in:
Russ Cox 2009-02-03 14:16:22 -08:00
parent 535dcf77c8
commit 9aa28f9231
8 changed files with 249 additions and 170 deletions

View file

@ -174,12 +174,12 @@ var bufsizes = []int {
}
func TestBufReadSimple(t *testing.T) {
b, e := NewBufRead(newByteReader(io.StringBytes("hello world")));
b := NewBufRead(newByteReader(io.StringBytes("hello world")));
if s := readBytes(b); s != "hello world" {
t.Errorf("simple hello world test failed: got %q", s);
}
b, e = NewBufRead(newRot13Reader(newByteReader(io.StringBytes("hello world"))));
b = NewBufRead(newRot13Reader(newByteReader(io.StringBytes("hello world"))));
if s := readBytes(b); s != "uryyb jbeyq" {
t.Error("rot13 hello world test failed: got %q", s);
}