Skip to content

Commit ca885d7

Browse files
eahydraallencloud
authored andcommitted
bugfix: issues with go vet
Signed-off-by: Joseph Lee <[email protected]>
1 parent f6c1ec3 commit ca885d7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

daemon/logger/jsonfile/utils.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ func followFile(f *os.File, cfg *logger.ReadConfig, unmarshaler newUnmarshalFunc
7474
// ideally, it's caused by removing the container.
7575
return errDone
7676
default:
77-
logrus.Debug("unexpected file change during watching file %v: %v", f.Name(), e.Op)
77+
logrus.Debugf("unexpected file change during watching file %v: %v", f.Name(), e.Op)
7878
return errDone
7979
}
8080
case newErr := <-fileWatcher.Errors:
8181
// something wrong during the watching.
82-
logrus.Debug("unexpected error during watching file %v: %v", f.Name(), newErr)
82+
logrus.Debugf("unexpected error during watching file %v: %v", f.Name(), newErr)
8383
return err
8484
case <-watchTimeout.C:
8585
// FIXME: Since we hold the file handler in the process,
@@ -92,7 +92,7 @@ func followFile(f *os.File, cfg *logger.ReadConfig, unmarshaler newUnmarshalFunc
9292
if os.IsNotExist(sErr) {
9393
return errDone
9494
}
95-
logrus.Debug("unexpected error during watching file %v: %v", f.Name(), sErr)
95+
logrus.Debugf("unexpected error during watching file %v: %v", f.Name(), sErr)
9696
return errDone
9797
}
9898
}

pkg/netutils/interface.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,12 +374,12 @@ func chooseHostInterfaceFromRoute(routes []Route, nw networkInterfacer) (net.IP,
374374
func getAddrByHostname() (net.IP, error) {
375375
exit, stdout, stderr, err := exec.Run(0, "hostname", "-i")
376376
if err != nil {
377-
return nil, errors.Wrapf(err, "failed to get ip address, stdout: (%s), stderr: (%s), exit: (%s)",
377+
return nil, errors.Wrapf(err, "failed to get ip address, stdout: (%s), stderr: (%s), exit: (%d)",
378378
stdout, stderr, exit)
379379
}
380380

381381
if exit != 0 {
382-
return nil, errors.Errorf("failed to get ip address, stdout: (%s), stderr: (%s), exit: (%s)",
382+
return nil, errors.Errorf("failed to get ip address, stdout: (%s), stderr: (%s), exit: (%d)",
383383
stdout, stderr, exit)
384384
}
385385

0 commit comments

Comments
 (0)