Make go vet ./... happy

Signed-off-by: David Gageot <david@gageot.net>
This commit is contained in:
David Gageot 2016-01-28 11:15:12 +01:00
parent 35054c5c71
commit 794cf4cf4d
3 changed files with 7 additions and 3 deletions

View File

@ -205,7 +205,9 @@ func TestReturnExitCode1onError(t *testing.T) {
func TestReturnExitCode3onErrorDuringPreCreate(t *testing.T) { func TestReturnExitCode3onErrorDuringPreCreate(t *testing.T) {
command := func(commandLine CommandLine, api libmachine.API) error { command := func(commandLine CommandLine, api libmachine.API) error {
return mcnerror.ErrDuringPreCreate{errors.New("foo is not bar")} return mcnerror.ErrDuringPreCreate{
Cause: errors.New("foo is not bar"),
}
} }
exitCode := checkErrorCodeForCommand(command) exitCode := checkErrorCodeForCommand(command)

View File

@ -69,7 +69,7 @@ func NewNetstatProvisioner() provision.Provisioner {
func TestStart(t *testing.T) { func TestStart(t *testing.T) {
provision.SetDetector(&provision.FakeDetector{ provision.SetDetector(&provision.FakeDetector{
NewNetstatProvisioner(), Provisioner: NewNetstatProvisioner(),
}) })
host := &Host{ host := &Host{

View File

@ -123,7 +123,9 @@ func (api *Client) Create(h *host.Host) error {
log.Info("Running pre-create checks...") log.Info("Running pre-create checks...")
if err := h.Driver.PreCreateCheck(); err != nil { if err := h.Driver.PreCreateCheck(); err != nil {
return mcnerror.ErrDuringPreCreate{err} return mcnerror.ErrDuringPreCreate{
Cause: err,
}
} }
if err := api.Save(h); err != nil { if err := api.Save(h); err != nil {