From d4c750a878ec7934445f75b2bf37a39f0db703ec Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Wed, 15 Oct 2014 11:56:19 -0700 Subject: [PATCH] Fix vet-go.sh and some things it complained about --- cmd/integration/integration.go | 2 +- hack/vet-go.sh | 4 ++-- pkg/api/latest/latest_test.go | 2 +- plugin/pkg/scheduler/factory/factory.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index 5ddafc3cdee..6e56dcf5ded 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -76,7 +76,7 @@ func (fakePodInfoGetter) GetPodInfo(host, podNamespace, podID string) (api.PodIn Port: 10251, } default: - glog.Fatalf("Can't get info for: '%v', '%v'", host, podNamespace, podID) + glog.Fatalf("Can't get info for: '%v', '%v - %v'", host, podNamespace, podID) } return c.GetPodInfo("localhost", podNamespace, podID) } diff --git a/hack/vet-go.sh b/hack/vet-go.sh index 334ce11754f..1da59cf5042 100755 --- a/hack/vet-go.sh +++ b/hack/vet-go.sh @@ -19,10 +19,10 @@ set -o errexit set -o nounset set -o pipefail -KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. +KUBE_REPO_ROOT=$(dirname "${BASH_SOURCE}")/.. # Set the environment variables required by the build. -source "${KUBE_ROOT}/hack/config-go.sh" +source "${KUBE_REPO_ROOT}/hack/config-go.sh" # Go to the top of the tree. cd "${KUBE_REPO_ROOT}" diff --git a/pkg/api/latest/latest_test.go b/pkg/api/latest/latest_test.go index 3465e4d258e..fbef7f1ee4a 100644 --- a/pkg/api/latest/latest_test.go +++ b/pkg/api/latest/latest_test.go @@ -139,7 +139,7 @@ func TestResourceVersioner(t *testing.T) { t.Fatalf("unexpected error: %v", err) } if version != "10" { - t.Errorf("unexpected version %d", version) + t.Errorf("unexpected version %v", version) } } diff --git a/plugin/pkg/scheduler/factory/factory.go b/plugin/pkg/scheduler/factory/factory.go index 91948c6c785..1bc95023042 100644 --- a/plugin/pkg/scheduler/factory/factory.go +++ b/plugin/pkg/scheduler/factory/factory.go @@ -211,7 +211,7 @@ func (s *storeToMinionLister) GetNodeInfo(id string) (*api.Minion, error) { if minion, ok := s.Get(id); ok { return minion.(*api.Minion), nil } - return nil, fmt.Errorf("minion '%v' is not in cache") + return nil, fmt.Errorf("minion '%v' is not in cache", id) } // storeToPodLister turns a store into a pod lister. The store must contain (only) pods.