Skip to content

Commit bf7d1b2

Browse files
committed
replace deprecated function
1 parent e41a77a commit bf7d1b2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

api/ocm/tools/toi/drivers/docker/driver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import (
1111
"strings"
1212
"sync"
1313

14+
"github.com/containerd/errdefs"
1415
"github.com/distribution/reference"
1516
"github.com/docker/cli/cli/command"
1617
"github.com/docker/docker/api/types/container"
1718
"github.com/docker/docker/api/types/image"
1819
registrytypes "github.com/docker/docker/api/types/registry"
19-
"github.com/docker/docker/client"
2020
"github.com/docker/docker/pkg/jsonmessage"
2121
"github.com/docker/docker/pkg/stdcopy"
2222
"github.com/docker/docker/registry"
@@ -510,7 +510,7 @@ type ConfigurationOption func(*container.Config, *container.HostConfig) error
510510
func (d *Driver) inspectImage(ctx context.Context, image string) (image.InspectResponse, error) {
511511
ii, err := d.dockerCli.Client().ImageInspect(ctx, image)
512512
switch {
513-
case client.IsErrNotFound(err):
513+
case errdefs.IsNotFound(err):
514514
fmt.Fprintf(d.dockerCli.Err(), "Unable to find image '%s' locally\n", image)
515515
if d.config[OptionPullPolicy] == PullPolicyNever {
516516
return ii, errors.Wrapf(err, "image %s not found", image)

0 commit comments

Comments
 (0)