aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-10-31 17:53:39 -0400
committerRuss Cox <rsc@golang.org>2011-10-31 17:53:39 -0400
commit92926f54722ce3e67765e440d0d6e5ef6da7474b (patch)
tree186dcbd5299fe19a74be99206c8609bfb4f7a395
parenta07841e21ebe371f7b9f45cba1e0d1a8090c58fb (diff)
downloadgo-92926f54722ce3e67765e440d0d6e5ef6da7474b.tar.gz
go-92926f54722ce3e67765e440d0d6e5ef6da7474b.zip
pkg: minor cleanup
remove some redundant .String() change variable name to make it os.Error-proof R=golang-dev, iant CC=golang-dev https://golang.org/cl/5302075
-rw-r--r--src/pkg/archive/zip/struct.go6
-rw-r--r--src/pkg/big/int_test.go2
-rw-r--r--src/pkg/big/rat_test.go2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/archive/zip/struct.go b/src/pkg/archive/zip/struct.go
index a32de5a9e0..4f9f599a14 100644
--- a/src/pkg/archive/zip/struct.go
+++ b/src/pkg/archive/zip/struct.go
@@ -60,10 +60,10 @@ type directoryEnd struct {
comment string
}
-func recoverError(err *os.Error) {
+func recoverError(errp *os.Error) {
if e := recover(); e != nil {
- if osErr, ok := e.(os.Error); ok {
- *err = osErr
+ if err, ok := e.(os.Error); ok {
+ *errp = err
return
}
panic(e)
diff --git a/src/pkg/big/int_test.go b/src/pkg/big/int_test.go
index fde19c23b7..d66bb5fa05 100644
--- a/src/pkg/big/int_test.go
+++ b/src/pkg/big/int_test.go
@@ -536,7 +536,7 @@ func TestScan(t *testing.T) {
buf.Reset()
buf.WriteString(test.input)
if _, err := fmt.Fscanf(&buf, test.format, x); err != nil {
- t.Errorf("#%d error: %s", i, err.String())
+ t.Errorf("#%d error: %s", i, err)
}
if x.String() != test.output {
t.Errorf("#%d got %s; want %s", i, x.String(), test.output)
diff --git a/src/pkg/big/rat_test.go b/src/pkg/big/rat_test.go
index a95e5fea3a..2443450411 100644
--- a/src/pkg/big/rat_test.go
+++ b/src/pkg/big/rat_test.go
@@ -112,7 +112,7 @@ func TestRatScan(t *testing.T) {
_, err := fmt.Fscanf(&buf, "%v", x)
if err == nil != test.ok {
if test.ok {
- t.Errorf("#%d error: %s", i, err.String())
+ t.Errorf("#%d error: %s", i, err)
} else {
t.Errorf("#%d expected error", i)
}