mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
os.Error API: don't export os.ErrorString, use os.NewError consistently
This is a core API change. 1) gofix misc src 2) Manual adjustments to the following files under src/pkg: gob/decode.go rpc/client.go os/error.go io/io.go bufio/bufio.go http/request.go websocket/client.go as well as: src/cmd/gofix/testdata/*.go.in (reverted) test/fixedbugs/bug243.go 3) Implemented gofix patch (oserrorstring.go) and test case (oserrorstring_test.go) Compiles and runs all tests. R=r, rsc, gri CC=golang-dev https://golang.org/cl/4607052
This commit is contained in:
parent
55b0662465
commit
712fb6dcd3
80 changed files with 367 additions and 230 deletions
|
|
@ -36,8 +36,8 @@ func makeReader(r io.Reader) flate.Reader {
|
|||
return bufio.NewReader(r)
|
||||
}
|
||||
|
||||
var HeaderError os.Error = os.ErrorString("invalid gzip header")
|
||||
var ChecksumError os.Error = os.ErrorString("gzip checksum error")
|
||||
var HeaderError = os.NewError("invalid gzip header")
|
||||
var ChecksumError = os.NewError("gzip checksum error")
|
||||
|
||||
// The gzip file stores a header giving metadata about the compressed file.
|
||||
// That header is exposed as the fields of the Compressor and Decompressor structs.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue