Commit abb67fdd authored by Chris Bednarski's avatar Chris Bednarski

Fix govet issues

parent 02273207
...@@ -88,7 +88,7 @@ func (a *Artifact) Destroy() error { ...@@ -88,7 +88,7 @@ func (a *Artifact) Destroy() error {
if len(errors) == 1 { if len(errors) == 1 {
return errors[0] return errors[0]
} else { } else {
return &packer.MultiError{errors} return &packer.MultiError{Errors: errors}
} }
} }
......
...@@ -181,8 +181,6 @@ func WaitForState(conf *StateChangeConf) (i interface{}, err error) { ...@@ -181,8 +181,6 @@ func WaitForState(conf *StateChangeConf) (i interface{}, err error) {
time.Sleep(time.Duration(sleepSeconds) * time.Second) time.Sleep(time.Duration(sleepSeconds) * time.Second)
} }
return
} }
func isTransientNetworkError(err error) bool { func isTransientNetworkError(err error) bool {
......
...@@ -92,6 +92,4 @@ func WaitForState(conf *StateChangeConf) (i interface{}, err error) { ...@@ -92,6 +92,4 @@ func WaitForState(conf *StateChangeConf) (i interface{}, err error) {
log.Printf("Waiting for state to become: %s currently %s (%d%%)", conf.Target, currentState, currentProgress) log.Printf("Waiting for state to become: %s currently %s (%d%%)", conf.Target, currentState, currentProgress)
time.Sleep(2 * time.Second) time.Sleep(2 * time.Second)
} }
return
} }
package rpc package rpc
import ( import (
"fmt"
"github.com/hashicorp/go-msgpack/codec"
"github.com/mitchellh/packer/packer"
"io" "io"
"log" "log"
"net/rpc" "net/rpc"
"sync/atomic" "sync/atomic"
"github.com/hashicorp/go-msgpack/codec"
"github.com/mitchellh/packer/packer"
) )
var endpointId uint64 var endpointId uint64
...@@ -149,7 +149,7 @@ func (s *Server) Serve() { ...@@ -149,7 +149,7 @@ func (s *Server) Serve() {
func registerComponent(server *rpc.Server, name string, rcvr interface{}, id bool) string { func registerComponent(server *rpc.Server, name string, rcvr interface{}, id bool) string {
endpoint := name endpoint := name
if id { if id {
fmt.Sprintf("%s.%d", endpoint, atomic.AddUint64(&endpointId, 1)) log.Printf("%s.%d", endpoint, atomic.AddUint64(&endpointId, 1))
} }
server.RegisterName(endpoint, rcvr) server.RegisterName(endpoint, rcvr)
......
...@@ -134,7 +134,6 @@ WaitLoop: ...@@ -134,7 +134,6 @@ WaitLoop:
case <-p.cancel: case <-p.cancel:
close(waitDone) close(waitDone)
return fmt.Errorf("Interrupt detected, quitting waiting for machine to restart") return fmt.Errorf("Interrupt detected, quitting waiting for machine to restart")
break WaitLoop
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment