Golint: remove redundant ifs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: b4a63139696aea2c73ec361a9af8b36a118f0423 Component: engine
This commit is contained in:
@@ -348,11 +348,7 @@ func (d *Daemon) Kill() error {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := os.Remove(fmt.Sprintf("%s/docker.pid", d.Folder)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return os.Remove(fmt.Sprintf("%s/docker.pid", d.Folder))
|
||||
}
|
||||
|
||||
// Pid returns the pid of the daemon
|
||||
@@ -459,11 +455,7 @@ out2:
|
||||
|
||||
d.cmd.Wait()
|
||||
|
||||
if err := os.Remove(fmt.Sprintf("%s/docker.pid", d.Folder)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return os.Remove(fmt.Sprintf("%s/docker.pid", d.Folder))
|
||||
}
|
||||
|
||||
// Restart will restart the daemon by first stopping it and the starting it.
|
||||
|
||||
@@ -328,9 +328,8 @@ func createNetwork(c *check.C, config types.NetworkCreateRequest, expectedStatus
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
return nr.ID
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func connectNetwork(c *check.C, nid, cid string) {
|
||||
|
||||
Reference in New Issue
Block a user