1
0
mirror of https://github.com/docker/cli.git synced 2026-01-18 08:21:31 +03:00

Replace fmt.Errorf() with errors.Errorf() in the cli

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin
2017-03-09 13:23:45 -05:00
parent c1b2fad9aa
commit e9d6193dfd
99 changed files with 370 additions and 337 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/docker/docker/cli/command"
"github.com/docker/docker/cli/command/inspect"
apiclient "github.com/docker/docker/client"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
@@ -48,7 +49,7 @@ func runInspect(dockerCli *command.DockerCli, opts inspectOptions) error {
case "", "container", "image", "node", "network", "service", "volume", "task", "plugin":
elementSearcher = inspectAll(context.Background(), dockerCli, opts.size, opts.inspectType)
default:
return fmt.Errorf("%q is not a valid value for --type", opts.inspectType)
return errors.Errorf("%q is not a valid value for --type", opts.inspectType)
}
return inspect.Inspect(dockerCli.Out(), opts.ids, opts.format, elementSearcher)
}
@@ -198,6 +199,6 @@ func inspectAll(ctx context.Context, dockerCli *command.DockerCli, getSize bool,
}
return v, raw, err
}
return nil, nil, fmt.Errorf("Error: No such object: %s", ref)
return nil, nil, errors.Errorf("Error: No such object: %s", ref)
}
}