aboutsummaryrefslogtreecommitdiffstats
path: root/vm/gce
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-05-03 15:48:26 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-05-03 15:48:26 +0200
commita630fd8b418650f8df52aead511ec4d27ca48ad2 (patch)
tree0202f7587a306bab366f7d3720ef9b831933e3e0 /vm/gce
parent9fe5658a1b7320b756d02cf2075dc5c735f86ff4 (diff)
gometalinter: some fixes for unparam
But we still can't enable it as there are more [uninteresting] warnings. Update #538
Diffstat (limited to 'vm/gce')
-rw-r--r--vm/gce/gce.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/vm/gce/gce.go b/vm/gce/gce.go
index 7f3281382..843072cff 100644
--- a/vm/gce/gce.go
+++ b/vm/gce/gce.go
@@ -192,7 +192,7 @@ func (inst *instance) Forward(port int) (string, error) {
func (inst *instance) Copy(hostSrc string) (string, error) {
vmDst := "./" + filepath.Base(hostSrc)
args := append(sshArgs(inst.debug, inst.sshKey, "-P", 22), hostSrc, inst.sshUser+"@"+inst.ip+":"+vmDst)
- if _, err := runCmd(inst.debug, "scp", args...); err != nil {
+ if err := runCmd(inst.debug, "scp", args...); err != nil {
return "", err
}
return vmDst, nil
@@ -359,7 +359,7 @@ func (pool *Pool) waitInstanceBoot(name, ip, sshKey, sshUser, gceKey string) err
return fmt.Errorf("shutdown in progress")
}
args := append(sshArgs(pool.env.Debug, sshKey, "-p", 22), sshUser+"@"+ip, pwd)
- if _, err := runCmd(pool.env.Debug, "ssh", args...); err == nil {
+ if err := runCmd(pool.env.Debug, "ssh", args...); err == nil {
return nil
}
}
@@ -473,7 +473,7 @@ func uploadImageToGCS(localImage, gcsImage string) error {
return nil
}
-func runCmd(debug bool, bin string, args ...string) ([]byte, error) {
+func runCmd(debug bool, bin string, args ...string) error {
if debug {
log.Logf(0, "running command: %v %#v", bin, args)
}
@@ -481,7 +481,7 @@ func runCmd(debug bool, bin string, args ...string) ([]byte, error) {
if debug {
log.Logf(0, "result: %v\n%s", err, output)
}
- return output, err
+ return err
}
func sshArgs(debug bool, sshKey, portArg string, port int) []string {