Commit d2d4ce77 authored by Chris Bednarski's avatar Chris Bednarski

Merge pull request #2561 from mitchellh/b-govet

Fix govet issues
parents af2fa705 eb5482cb
......@@ -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
}
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
}
}
......
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