aboutsummaryrefslogtreecommitdiff
path: root/test/recover2.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-11-01 22:06:05 -0400
committerRuss Cox <rsc@golang.org>2011-11-01 22:06:05 -0400
commit44526cdbe0c012c2a9bf6fc493aa8ad3411b884f (patch)
tree25afb6c71d7243d18ecd3f74ec6a77fd04fe1871 /test/recover2.go
parenteb6929299b6da3d9bea1fa7f7cd319c2de9242bb (diff)
downloadgo-44526cdbe0c012c2a9bf6fc493aa8ad3411b884f.tar.gz
go-44526cdbe0c012c2a9bf6fc493aa8ad3411b884f.zip
non-pkg: gofix -r error -force=error
R=golang-dev, iant, r, r CC=golang-dev https://golang.org/cl/5307066
Diffstat (limited to 'test/recover2.go')
-rw-r--r--test/recover2.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/recover2.go b/test/recover2.go
index 9affe25d47..ccaf8ced16 100644
--- a/test/recover2.go
+++ b/test/recover2.go
@@ -11,10 +11,7 @@
package main
-import (
- "os"
- "strings"
-)
+import "strings"
var x = make([]byte, 10)
@@ -33,7 +30,7 @@ func mustRecover(s string) {
if v == nil {
panic("expected panic")
}
- if e := v.(os.Error).String(); strings.Index(e, s) < 0 {
+ if e := v.(error).Error(); strings.Index(e, s) < 0 {
panic("want: " + s + "; have: " + e)
}
}