testutil/daemon: Daemon.StopWithError: rename output-var to prevent shadowing

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2023-12-28 11:07:15 +01:00
parent 3606712e2d
commit 986988a394

View File

@@ -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 != "" {