Merge pull request #1885 from dmp42/5-vet-fix

Vet fix
This commit is contained in:
Evan Hazlett 2015-09-21 14:20:10 -04:00
commit 0540e5e295
7 changed files with 7 additions and 7 deletions

View File

@ -7,7 +7,7 @@ script:
- make dco
- make fmt
# - make lint
# - make vet
- make vet
- make test-short
- make test-long
- make coverage-send

View File

@ -35,5 +35,5 @@ endif
default: build
clean: coverage-clean build-clean
build: build-simple
test: dco fmt test-short
test: dco fmt vet test-short
validate: dco fmt vet lint test-short test-long

View File

@ -4,6 +4,6 @@ import "testing"
func TestActionValue(t *testing.T) {
if Restart.String() != "restart" {
t.Fatal("Expected %q but got %q", "install", Restart.String())
t.Fatalf("Expected %s but got %s", "install", Restart.String())
}
}

View File

@ -62,7 +62,7 @@ func (kp *KeyPair) WriteToFile(privateKeyPath string, publicKeyPath string) erro
}{
{
File: privateKeyPath,
Value: pem.EncodeToMemory(&pem.Block{"RSA PRIVATE KEY", nil, kp.PrivateKey}),
Value: pem.EncodeToMemory(&pem.Block{Type: "RSA PRIVATE KEY", Headers: nil, Bytes: kp.PrivateKey}),
},
{
File: publicKeyPath,

View File

@ -11,7 +11,7 @@ func TestNewKeyPair(t *testing.T) {
t.Fatal(err)
}
if privPem := pem.EncodeToMemory(&pem.Block{"RSA PRIVATE KEY", nil, pair.PrivateKey}); len(privPem) == 0 {
if privPem := pem.EncodeToMemory(&pem.Block{Type: "RSA PRIVATE KEY", Headers: nil, Bytes: pair.PrivateKey}); len(privPem) == 0 {
t.Fatal("No PEM returned")
}

View File

@ -24,7 +24,7 @@ func TestGetLatestBoot2DockerReleaseUrl(t *testing.T) {
expectedUrl := fmt.Sprintf("%s/boot2docker/boot2docker/releases/download/0.1/boot2docker.iso", ts.URL)
if isoUrl != expectedUrl {
t.Fatalf("expected url %s; received %s", isoUrl)
t.Fatalf("expected url %s; received %s", isoUrl, expectedUrl)
}
}

View File

@ -119,7 +119,7 @@ func TestCopyFile(t *testing.T) {
}
if string(data) != testStr {
t.Fatalf("expected data \"%s\"; received \"%\"", testStr, string(data))
t.Fatalf("expected data \"%s\"; received \"%s\"", testStr, string(data))
}
}