Fix govet issues
This commit is contained in:
parent
02273207df
commit
abb67fdd79
|
@ -88,7 +88,7 @@ func (a *Artifact) Destroy() error {
|
|||
if len(errors) == 1 {
|
||||
return errors[0]
|
||||
} else {
|
||||
return &packer.MultiError{errors}
|
||||
return &packer.MultiError{Errors: errors}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -181,8 +181,6 @@ func WaitForState(conf *StateChangeConf) (i interface{}, err error) {
|
|||
|
||||
time.Sleep(time.Duration(sleepSeconds) * time.Second)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func isTransientNetworkError(err error) bool {
|
||||
|
|
|
@ -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)
|
||||
time.Sleep(2 * time.Second)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package rpc
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/hashicorp/go-msgpack/codec"
|
||||
"github.com/mitchellh/packer/packer"
|
||||
"io"
|
||||
"log"
|
||||
"net/rpc"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/hashicorp/go-msgpack/codec"
|
||||
"github.com/mitchellh/packer/packer"
|
||||
)
|
||||
|
||||
var endpointId uint64
|
||||
|
@ -149,7 +149,7 @@ func (s *Server) Serve() {
|
|||
func registerComponent(server *rpc.Server, name string, rcvr interface{}, id bool) string {
|
||||
endpoint := name
|
||||
if id {
|
||||
fmt.Sprintf("%s.%d", endpoint, atomic.AddUint64(&endpointId, 1))
|
||||
log.Printf("%s.%d", endpoint, atomic.AddUint64(&endpointId, 1))
|
||||
}
|
||||
|
||||
server.RegisterName(endpoint, rcvr)
|
||||
|
|
|
@ -134,7 +134,6 @@ WaitLoop:
|
|||
case <-p.cancel:
|
||||
close(waitDone)
|
||||
return fmt.Errorf("Interrupt detected, quitting waiting for machine to restart")
|
||||
break WaitLoop
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue