X Tutup
Skip to content

Commit 794cf4c

Browse files
committed
Make go vet ./... happy
Signed-off-by: David Gageot <david@gageot.net>
1 parent 35054c5 commit 794cf4c

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

commands/commands_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ func TestReturnExitCode1onError(t *testing.T) {
205205

206206
func TestReturnExitCode3onErrorDuringPreCreate(t *testing.T) {
207207
command := func(commandLine CommandLine, api libmachine.API) error {
208-
return mcnerror.ErrDuringPreCreate{errors.New("foo is not bar")}
208+
return mcnerror.ErrDuringPreCreate{
209+
Cause: errors.New("foo is not bar"),
210+
}
209211
}
210212

211213
exitCode := checkErrorCodeForCommand(command)

libmachine/host/host_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func NewNetstatProvisioner() provision.Provisioner {
6969

7070
func TestStart(t *testing.T) {
7171
provision.SetDetector(&provision.FakeDetector{
72-
NewNetstatProvisioner(),
72+
Provisioner: NewNetstatProvisioner(),
7373
})
7474

7575
host := &Host{

libmachine/libmachine.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ func (api *Client) Create(h *host.Host) error {
123123
log.Info("Running pre-create checks...")
124124

125125
if err := h.Driver.PreCreateCheck(); err != nil {
126-
return mcnerror.ErrDuringPreCreate{err}
126+
return mcnerror.ErrDuringPreCreate{
127+
Cause: err,
128+
}
127129
}
128130

129131
if err := api.Save(h); err != nil {

0 commit comments

Comments
 (0)
X Tutup