mirror of
https://github.com/docker/cli.git
synced 2026-10-19 04:11:12 -04:00
Format error by value
- Use `%v` verb to format errors. - Give `param` constant in portallocator some better name. Signed-off-by: Michal Minar <miminar@redhat.com> Upstream-commit: 210ab030bc3dab7bcf8f7252f2f9facb5a26cb6b Component: engine
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ func Listeners(unsetEnv bool) ([]net.Listener, error) {
|
||||
var err error
|
||||
listeners[i], err = net.FileListener(f)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Error setting up FileListener for fd %d: %s", f.Fd(), err.Error())
|
||||
return nil, fmt.Errorf("Error setting up FileListener for fd %d: %v", f.Fd(), err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -198,7 +198,7 @@ this is just some garbage data
|
||||
|
||||
execUser, err := GetExecUser(test.ref, &defaultExecUser, passwd, group)
|
||||
if err != nil {
|
||||
t.Logf("got unexpected error when parsing '%s': %s", test.ref, err.Error())
|
||||
t.Logf("got unexpected error when parsing '%s': %v", test.ref, err)
|
||||
t.Fail()
|
||||
continue
|
||||
}
|
||||
@@ -337,7 +337,7 @@ this is just some garbage data
|
||||
|
||||
execUser, err := GetExecUser(test.ref, &defaultExecUser, passwd, group)
|
||||
if err != nil {
|
||||
t.Logf("got unexpected error when parsing '%s': %s", test.ref, err.Error())
|
||||
t.Logf("got unexpected error when parsing '%s': %v", test.ref, err)
|
||||
t.Fail()
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user