Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(236)

Issue 4607052: code review 4607052: os.Error API: don't export os.ErrorString, use os.NewEr... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 9 months ago by gri
Modified:
13 years, 9 months ago
Reviewers:
CC:
r, rsc, gri1, golang-dev
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : diff -r 3a5f42c956e0 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 3a5f42c956e0 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 7700d209820a https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 7700d209820a https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 46e644c8a858 https://go.googlecode.com/hg/ #

Patch Set 7 : diff -r b09efb10f127 https://go.googlecode.com/hg/ #

Patch Set 8 : diff -r b09efb10f127 https://go.googlecode.com/hg/ #

Total comments: 17

Patch Set 9 : diff -r e3c9fecaef4e https://go.googlecode.com/hg/ #

Patch Set 10 : diff -r e3c9fecaef4e https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 11 : diff -r e3c9fecaef4e https://go.googlecode.com/hg/ #

Patch Set 12 : diff -r e3c9fecaef4e https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 13 : diff -r e3c9fecaef4e https://go.googlecode.com/hg/ #

Patch Set 14 : diff -r e3c9fecaef4e https://go.googlecode.com/hg/ #

Total comments: 8

Patch Set 15 : diff -r e3c9fecaef4e https://go.googlecode.com/hg/ #

Patch Set 16 : diff -r 6e3e06fb2dc3 https://go.googlecode.com/hg/ #

Patch Set 17 : diff -r 6e3e06fb2dc3 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+367 lines, -230 lines) Patch
M src/cmd/cgo/gcc.go View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/cmd/gofix/Makefile View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A src/cmd/gofix/oserrorstring.go View 1 2 3 4 5 6 7 8 1 chunk +75 lines, -0 lines 0 comments Download
A src/cmd/gofix/oserrorstring_test.go View 1 2 3 4 5 6 7 8 1 chunk +57 lines, -0 lines 0 comments Download
M src/cmd/gofix/testdata/reflect.decoder.go.out View 1 2 3 4 5 6 3 chunks +3 lines, -3 lines 0 comments Download
M src/cmd/gofix/testdata/reflect.encoder.go.out View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/gofix/testdata/reflect.export.go.out View 1 2 3 4 5 6 3 chunks +6 lines, -6 lines 0 comments Download
M src/cmd/gofix/testdata/reflect.print.go.out View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/gofix/testdata/reflect.read.go.out View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M src/cmd/gofix/testdata/reflect.scan.go.out View 1 2 3 4 5 6 3 chunks +4 lines, -4 lines 0 comments Download
M src/cmd/gofix/testdata/reflect.type.go.out View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M src/cmd/goinstall/download.go View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -4 lines 0 comments Download
M src/cmd/goinstall/main.go View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/gotype/gotype.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/archive/tar/reader.go View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/big/int.go View 1 2 chunks +3 lines, -3 lines 0 comments Download
M src/pkg/big/nat.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/big/rat.go View 1 3 chunks +5 lines, -5 lines 0 comments Download
M src/pkg/bufio/bufio.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -1 line 0 comments Download
M src/pkg/bytes/buffer.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/compress/gzip/gunzip.go View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/compress/zlib/reader.go View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -3 lines 0 comments Download
M src/pkg/crypto/cast5/cast5.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/crypto/dsa/dsa.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/crypto/openpgp/elgamal/elgamal.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/crypto/rsa/pkcs1v15.go View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/crypto/rsa/rsa.go View 1 4 chunks +5 lines, -5 lines 0 comments Download
M src/pkg/crypto/tls/conn.go View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/crypto/tls/handshake_client.go View 1 3 chunks +3 lines, -3 lines 0 comments Download
M src/pkg/crypto/tls/handshake_server.go View 1 3 chunks +3 lines, -3 lines 0 comments Download
M src/pkg/crypto/tls/key_agreement.go View 1 2 3 7 chunks +10 lines, -10 lines 0 comments Download
M src/pkg/crypto/tls/tls.go View 1 2 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/crypto/x509/verify_test.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/crypto/x509/x509.go View 1 5 chunks +7 lines, -7 lines 0 comments Download
M src/pkg/debug/elf/file.go View 1 4 chunks +12 lines, -12 lines 0 comments Download
M src/pkg/exec/lp_plan9.go View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/exec/lp_unix.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/exec/lp_windows.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/fmt/print.go View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/fmt/scan.go View 1 3 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/fmt/scan_test.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/go/build/dir.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/go/parser/interface.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/go/types/exportdata.go View 1 4 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/go/types/gcimporter.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/gob/codec_test.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/gob/decode.go View 1 11 chunks +19 lines, -19 lines 0 comments Download
M src/pkg/gob/decoder.go View 1 4 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/gob/encoder.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/gob/gobencdec_test.go View 1 4 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/gob/type.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/http/client.go View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/http/fs.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/http/request.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +5 lines, -3 lines 0 comments Download
M src/pkg/http/transport.go View 1 2 chunks +3 lines, -3 lines 0 comments Download
M src/pkg/http/url.go View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/image/gif/reader.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/io/io.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -1 line 0 comments Download
M src/pkg/mail/message.go View 1 12 chunks +15 lines, -15 lines 0 comments Download
M src/pkg/net/fd_darwin.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/net/iprawsock.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/net/net.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/net/udpsock.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/netchan/common.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/netchan/export.go View 1 3 chunks +6 lines, -6 lines 0 comments Download
M src/pkg/netchan/import.go View 1 4 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/os/error.go View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -8 lines 0 comments Download
M src/pkg/rand/rand_test.go View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/rpc/client.go View 1 4 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/rpc/jsonrpc/all_test.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/rpc/server.go View 1 4 chunks +7 lines, -7 lines 0 comments Download
M src/pkg/rpc/server_test.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/strconv/atoi.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/strings/reader.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/syslog/syslog_unix.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/time/format.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/time/tick.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/websocket/client.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -2 lines 0 comments Download
M src/pkg/xml/read.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M test/fixedbugs/bug243.go View 1 2 3 4 5 6 7 8 9 2 chunks +1 line, -2 lines 0 comments Download

Messages

Total messages: 12
gri
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 9 months ago (2011-06-21 00:38:27 UTC) #1
r
http://codereview.appspot.com/4607052/diff/4081/src/cmd/gofix/oserrorstring.go File src/cmd/gofix/oserrorstring.go (right): http://codereview.appspot.com/4607052/diff/4081/src/cmd/gofix/oserrorstring.go#newcode42 src/cmd/gofix/oserrorstring.go:42: // Other occurences of os.ErrorString are not fixed; s/;// ...
13 years, 9 months ago (2011-06-21 01:21:16 UTC) #2
rsc
Instead of using gofmt -r, please revert the other files and run gofix to test ...
13 years, 9 months ago (2011-06-21 16:05:55 UTC) #3
gri1
PTAL (reverted files w/o manual changes and applied gofix to re-apply the changes): cd $GOROOT/src/pkg ...
13 years, 9 months ago (2011-06-21 18:55:59 UTC) #4
rsc
http://codereview.appspot.com/4607052/diff/7074/src/pkg/io/io.go File src/pkg/io/io.go (right): http://codereview.appspot.com/4607052/diff/7074/src/pkg/io/io.go#newcode15 src/pkg/io/io.go:15: os.Error Instead of this, which I fear will lead ...
13 years, 9 months ago (2011-06-21 19:03:48 UTC) #5
gri1
PTAL http://codereview.appspot.com/4607052/diff/7074/src/pkg/io/io.go File src/pkg/io/io.go (right): http://codereview.appspot.com/4607052/diff/7074/src/pkg/io/io.go#newcode15 src/pkg/io/io.go:15: os.Error On 2011/06/21 19:03:48, rsc wrote: > Instead ...
13 years, 9 months ago (2011-06-21 19:12:30 UTC) #6
rsc
http://codereview.appspot.com/4607052/diff/20001/src/pkg/bufio/bufio.go File src/pkg/bufio/bufio.go (right): http://codereview.appspot.com/4607052/diff/20001/src/pkg/bufio/bufio.go#newcode24 src/pkg/bufio/bufio.go:24: type Error string For a change like this it ...
13 years, 9 months ago (2011-06-21 19:14:59 UTC) #7
gri1
PTAL http://codereview.appspot.com/4607052/diff/20001/src/pkg/bufio/bufio.go File src/pkg/bufio/bufio.go (right): http://codereview.appspot.com/4607052/diff/20001/src/pkg/bufio/bufio.go#newcode24 src/pkg/bufio/bufio.go:24: type Error string On 2011/06/21 19:14:59, rsc wrote: ...
13 years, 9 months ago (2011-06-21 19:26:34 UTC) #8
rsc
LGTM This is super picky but since the value are all pointers, making it a ...
13 years, 9 months ago (2011-06-21 19:38:36 UTC) #9
gri1
PTAL. Makes sense, I should have used ptr receivers in the first place. Thanks for ...
13 years, 9 months ago (2011-06-21 21:01:53 UTC) #10
r
LGTM
13 years, 9 months ago (2011-06-22 00:27:24 UTC) #11
gri
13 years, 9 months ago (2011-06-22 17:53:00 UTC) #12
*** Submitted as http://code.google.com/p/go/source/detail?r=257fe69c8645 ***

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
http://codereview.appspot.com/4607052
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b