Correcting all go vet errors
This commit is contained in:
@@ -60,7 +60,7 @@ func coreDump(dir string) {
|
||||
// I wish there was a better way to get the master IP...
|
||||
config, err := loadConfig()
|
||||
if err != nil {
|
||||
fmt.Printf("Error loading config: %v")
|
||||
fmt.Printf("Error loading config: %v", err)
|
||||
}
|
||||
ix := strings.LastIndex(config.Host, "/")
|
||||
master := net.JoinHostPort(config.Host[ix+1:], "22")
|
||||
|
||||
@@ -77,7 +77,7 @@ func gcloudListNodes() {
|
||||
output, err := exec.Command("gcloud", "compute", "instances", "list",
|
||||
"--project="+testContext.CloudConfig.ProjectID, "--zone="+testContext.CloudConfig.Zone).CombinedOutput()
|
||||
if err != nil {
|
||||
Logf("Failed to list nodes: %v, %v", err)
|
||||
Logf("Failed to list nodes: %v", err)
|
||||
return
|
||||
}
|
||||
Logf(string(output))
|
||||
|
||||
@@ -550,7 +550,7 @@ var _ = Describe("Nodes", func() {
|
||||
pod, err := c.Pods(ns).Get(additionalPod)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
if pod.Spec.NodeName != node.Name {
|
||||
Logf("Pod %s found on invalid node: %s instead of %s", pod.Spec.NodeName, node.Name)
|
||||
Logf("Pod %s found on invalid node: %s instead of %s", pod.Name, pod.Spec.NodeName, node.Name)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1267,7 +1267,7 @@ func testNotReachable(ip string, port int) {
|
||||
Logf("Expecting %s to be unreachable but was reachable and got an error reading response: %v", url, err)
|
||||
return false, nil
|
||||
}
|
||||
Logf("Able to reach service %s when should no longer have been reachable, status:%d and body: %s", url, resp.Status, string(body))
|
||||
Logf("Able to reach service %s when should no longer have been reachable, status: %q and body: %s", url, resp.Status, string(body))
|
||||
return false, nil
|
||||
})
|
||||
Expect(err).NotTo(HaveOccurred(), "Error waiting for %s", desc)
|
||||
|
||||
@@ -1813,7 +1813,7 @@ func resetMetrics(c *client.Client) error {
|
||||
return err
|
||||
}
|
||||
if string(body) != "metrics reset\n" {
|
||||
return fmt.Errorf("Unexpected response: ", string(body))
|
||||
return fmt.Errorf("Unexpected response: %q", string(body))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user