diff options
author | Rob Pike <r@golang.org> | 2009-12-02 22:02:14 -0800 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2009-12-02 22:02:14 -0800 |
commit | 9599e35e75f3bf5223edd9b0a0854536c23cdef2 (patch) | |
tree | c8ce48aeddfe892be3754b0aa74217b4eb6d1e57 /src/pkg/http | |
parent | 0247d93d819700b0bfc6814dc7b1c2afec4648a0 (diff) | |
download | golang-9599e35e75f3bf5223edd9b0a0854536c23cdef2.tar.gz |
move ReadFile, WriteFile, and ReadDir into a separate io/ioutil package.
this breaks the dependency of package io on package bytes.
R=rsc
CC=golang-dev
http://codereview.appspot.com/163085
Diffstat (limited to 'src/pkg/http')
-rw-r--r-- | src/pkg/http/client_test.go | 4 | ||||
-rw-r--r-- | src/pkg/http/request.go | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/pkg/http/client_test.go b/src/pkg/http/client_test.go index 8f5213067..76aad7e81 100644 --- a/src/pkg/http/client_test.go +++ b/src/pkg/http/client_test.go @@ -7,7 +7,7 @@ package http import ( - "io"; + "io/ioutil"; "strings"; "testing"; ) @@ -19,7 +19,7 @@ func TestClient(t *testing.T) { r, _, err := Get("http://www.google.com/robots.txt"); var b []byte; if err == nil { - b, err = io.ReadAll(r.Body); + b, err = ioutil.ReadAll(r.Body); r.Body.Close(); } if err != nil { diff --git a/src/pkg/http/request.go b/src/pkg/http/request.go index ce49f7cf8..83374a549 100644 --- a/src/pkg/http/request.go +++ b/src/pkg/http/request.go @@ -15,6 +15,7 @@ import ( "container/vector"; "fmt"; "io"; + "io/ioutil"; "os"; "strconv"; "strings"; @@ -626,7 +627,7 @@ func (r *Request) ParseForm() (err os.Error) { switch strings.Split(ct, ";", 2)[0] { case "text/plain", "application/x-www-form-urlencoded", "": var b []byte; - if b, err = io.ReadAll(r.Body); err != nil { + if b, err = ioutil.ReadAll(r.Body); err != nil { return err } query = string(b); |