fix use-errors-new from revive

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2025-05-15 11:56:40 +02:00
parent f0136d1dba
commit 381d9d0723
107 changed files with 267 additions and 235 deletions

View File

@@ -2,7 +2,6 @@ package daemon
import (
"context"
"fmt"
cerrdefs "github.com/containerd/errdefs"
"github.com/docker/docker/api/types/container"
@@ -56,7 +55,7 @@ func (daemon *Daemon) update(name string, hostConfig *container.HostConfig) erro
if ctr.RemovalInProgress || ctr.Dead {
ctr.Unlock()
return errCannotUpdate(ctr.ID, fmt.Errorf(`container is marked for removal and cannot be "update"`))
return errCannotUpdate(ctr.ID, errors.New(`container is marked for removal and cannot be "update"`))
}
if err := ctr.UpdateContainer(hostConfig); err != nil {