From: Robert Hencke Date: Tue, 17 May 2011 04:15:06 +0000 (-0700) Subject: pkg: fix new incorrect prints found by govet X-Git-Tag: weekly.2011-05-22~44 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3faa490f895ffbba599b5be52bd4c86cb4573ada;p=gostls13.git pkg: fix new incorrect prints found by govet R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/4539063 --- diff --git a/src/pkg/crypto/x509/x509_test.go b/src/pkg/crypto/x509/x509_test.go index b7b50c9c3a..b431ec4358 100644 --- a/src/pkg/crypto/x509/x509_test.go +++ b/src/pkg/crypto/x509/x509_test.go @@ -291,14 +291,14 @@ func TestParseCertificateWithDsaPublicKey(t *testing.T) { pemBlock, _ := pem.Decode([]byte(dsaCertPem)) cert, err := ParseCertificate(pemBlock.Bytes) if err != nil { - t.Fatal("Failed to parse certificate: %s", err) + t.Fatalf("Failed to parse certificate: %s", err) } if cert.PublicKeyAlgorithm != DSA { t.Errorf("Parsed key algorithm was not DSA") } parsedKey, ok := cert.PublicKey.(*dsa.PublicKey) if !ok { - t.Fatal("Parsed key was not a DSA key: %s", err) + t.Fatalf("Parsed key was not a DSA key: %s", err) } if expectedKey.Y.Cmp(parsedKey.Y) != 0 || expectedKey.P.Cmp(parsedKey.P) != 0 || diff --git a/src/pkg/os/os_test.go b/src/pkg/os/os_test.go index 51ea8189e7..b06d57b851 100644 --- a/src/pkg/os/os_test.go +++ b/src/pkg/os/os_test.go @@ -243,7 +243,7 @@ func smallReaddirnames(file *File, length int, t *testing.T) []string { t.Fatalf("readdirnames %q failed: %v", file.Name(), err) } if len(d) == 0 { - t.Fatalf("readdirnames %q returned empty slice and no error") + t.Fatalf("readdirnames %q returned empty slice and no error", file.Name()) } names[count] = d[0] count++