fix 'go vet' warnings

This commit is contained in:
Tim Hockin
2014-11-20 20:42:48 +08:00
parent ea960711ff
commit 95a9098311
19 changed files with 32 additions and 34 deletions

View File

@@ -390,7 +390,7 @@ func fieldPath(pod *api.BoundPod, container *api.Container) (string, error) {
for i := range pod.Spec.Containers {
here := &pod.Spec.Containers[i]
if here == container {
return fmt.Sprintf("spec.containers[%n]", i), nil
return fmt.Sprintf("spec.containers[%d]", i), nil
}
}
return "", fmt.Errorf("container %#v not found in pod %#v", container, pod)