src/pkg/[a-m]*: gofix -r error -force=error
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5322051
diff --git a/src/pkg/crypto/x509/verify_test.go b/src/pkg/crypto/x509/verify_test.go
index eaa8169..2194d15 100644
--- a/src/pkg/crypto/x509/verify_test.go
+++ b/src/pkg/crypto/x509/verify_test.go
@@ -7,7 +7,7 @@
import (
"crypto/x509/pkix"
"encoding/pem"
- "os"
+ "errors"
"strings"
"testing"
)
@@ -19,7 +19,7 @@
currentTime int64
dnsName string
- errorCallback func(*testing.T, int, os.Error) bool
+ errorCallback func(*testing.T, int, error) bool
expectedChains [][]string
}
@@ -95,7 +95,7 @@
},
}
-func expectHostnameError(t *testing.T, i int, err os.Error) (ok bool) {
+func expectHostnameError(t *testing.T, i int, err error) (ok bool) {
if _, ok := err.(HostnameError); !ok {
t.Errorf("#%d: error was not a HostnameError: %s", i, err)
return false
@@ -103,7 +103,7 @@
return true
}
-func expectExpired(t *testing.T, i int, err os.Error) (ok bool) {
+func expectExpired(t *testing.T, i int, err error) (ok bool) {
if inval, ok := err.(CertificateInvalidError); !ok || inval.Reason != Expired {
t.Errorf("#%d: error was not Expired: %s", i, err)
return false
@@ -111,7 +111,7 @@
return true
}
-func expectAuthorityUnknown(t *testing.T, i int, err os.Error) (ok bool) {
+func expectAuthorityUnknown(t *testing.T, i int, err error) (ok bool) {
if _, ok := err.(UnknownAuthorityError); !ok {
t.Errorf("#%d: error was not UnknownAuthorityError: %s", i, err)
return false
@@ -119,10 +119,10 @@
return true
}
-func certificateFromPEM(pemBytes string) (*Certificate, os.Error) {
+func certificateFromPEM(pemBytes string) (*Certificate, error) {
block, _ := pem.Decode([]byte(pemBytes))
if block == nil {
- return nil, os.NewError("failed to decode PEM")
+ return nil, errors.New("failed to decode PEM")
}
return ParseCertificate(block.Bytes)
}