mirror of
https://github.com/moby/moby.git
synced 2026-01-11 10:41:43 +00:00
testutil/daemon: Daemon.StopWithError: rename output-var to prevent shadowing
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -699,13 +699,13 @@ func (d *Daemon) Stop(t testing.TB) {
|
||||
// If it timeouts, a SIGKILL is sent.
|
||||
// Stop will not delete the daemon directory. If a purged daemon is needed,
|
||||
// instantiate a new one with NewDaemon.
|
||||
func (d *Daemon) StopWithError() (err error) {
|
||||
func (d *Daemon) StopWithError() (retErr error) {
|
||||
if d.cmd == nil || d.Wait == nil {
|
||||
return errDaemonNotStarted
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
d.log.Logf("[%s] error while stopping daemon: %v", d.id, err)
|
||||
if retErr != nil {
|
||||
d.log.Logf("[%s] error while stopping daemon: %v", d.id, retErr)
|
||||
} else {
|
||||
d.log.Logf("[%s] daemon stopped", d.id)
|
||||
if d.pidFile != "" {
|
||||
|
||||
Reference in New Issue
Block a user