diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-12-03 02:17:34 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-12-03 02:17:34 +0000 |
commit | 2fd401c8f190f1fe43e51a7f726f6ed6119a1f96 (patch) | |
tree | 7f76eff391f37fe6467ff4ffbc0c582c9959ea30 /libgo/go/http/dump.go | |
parent | 02e9018f1616b23f1276151797216717b3564202 (diff) | |
download | gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.zip gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.tar.gz gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.tar.bz2 |
libgo: Update to weekly.2011-11-02.
From-SVN: r181964
Diffstat (limited to 'libgo/go/http/dump.go')
-rw-r--r-- | libgo/go/http/dump.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libgo/go/http/dump.go b/libgo/go/http/dump.go index f78df57..b85feea 100644 --- a/libgo/go/http/dump.go +++ b/libgo/go/http/dump.go @@ -8,14 +8,13 @@ import ( "bytes" "io" "io/ioutil" - "os" ) // One of the copies, say from b to r2, could be avoided by using a more // elaborate trick where the other copy is made during Request/Response.Write. // This would complicate things too much, given that these functions are for // debugging only. -func drainBody(b io.ReadCloser) (r1, r2 io.ReadCloser, err os.Error) { +func drainBody(b io.ReadCloser) (r1, r2 io.ReadCloser, err error) { var buf bytes.Buffer if _, err = buf.ReadFrom(b); err != nil { return nil, nil, err @@ -33,7 +32,7 @@ func drainBody(b io.ReadCloser) (r1, r2 io.ReadCloser, err os.Error) { // changes req.Body to refer to the in-memory copy. // The documentation for Request.Write details which fields // of req are used. -func DumpRequest(req *Request, body bool) (dump []byte, err os.Error) { +func DumpRequest(req *Request, body bool) (dump []byte, err error) { var b bytes.Buffer save := req.Body if !body || req.Body == nil { @@ -54,7 +53,7 @@ func DumpRequest(req *Request, body bool) (dump []byte, err os.Error) { } // DumpResponse is like DumpRequest but dumps a response. -func DumpResponse(resp *Response, body bool) (dump []byte, err os.Error) { +func DumpResponse(resp *Response, body bool) (dump []byte, err error) { var b bytes.Buffer save := resp.Body savecl := resp.ContentLength |