vendor: github.com/docker/cli v28.0.0-rc.3

no significant changes, only linting fixes

full diff: https://github.com/docker/cli/compare/v28.0.0-rc.2...v28.0.0-rc.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2025-02-19 13:39:40 +01:00
parent 352ce7e875
commit b973de2dd3
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
29 changed files with 60 additions and 49 deletions

2
go.mod
View File

@ -17,7 +17,7 @@ require (
github.com/creack/pty v1.1.24 github.com/creack/pty v1.1.24
github.com/davecgh/go-spew v1.1.1 github.com/davecgh/go-spew v1.1.1
github.com/distribution/reference v0.6.0 github.com/distribution/reference v0.6.0
github.com/docker/cli v28.0.0-rc.2+incompatible github.com/docker/cli v28.0.0-rc.3+incompatible
github.com/docker/cli-docs-tool v0.9.0 github.com/docker/cli-docs-tool v0.9.0
github.com/docker/docker v28.0.0-rc.3+incompatible github.com/docker/docker v28.0.0-rc.3+incompatible
github.com/docker/go-units v0.5.0 github.com/docker/go-units v0.5.0

4
go.sum
View File

@ -122,8 +122,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/docker/cli v28.0.0-rc.2+incompatible h1:2N1dpr3qtlJwIQpqXm7oNwWNAUGzpKlsCeJ32ejvpTk= github.com/docker/cli v28.0.0-rc.3+incompatible h1:OnM9p+c9Gxw8JQhfeoj9TbIC0VQ8elqOYA2J2nJ8r3w=
github.com/docker/cli v28.0.0-rc.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v28.0.0-rc.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/cli-docs-tool v0.9.0 h1:CVwQbE+ZziwlPqrJ7LRyUF6GvCA+6gj7MTCsayaK9t0= github.com/docker/cli-docs-tool v0.9.0 h1:CVwQbE+ZziwlPqrJ7LRyUF6GvCA+6gj7MTCsayaK9t0=
github.com/docker/cli-docs-tool v0.9.0/go.mod h1:ClrwlNW+UioiRyH9GiAOe1o3J/TsY3Tr1ipoypjAUtc= github.com/docker/cli-docs-tool v0.9.0/go.mod h1:ClrwlNW+UioiRyH9GiAOe1o3J/TsY3Tr1ipoypjAUtc=
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=

View File

@ -32,7 +32,7 @@ const (
// errPluginNotFound is the error returned when a plugin could not be found. // errPluginNotFound is the error returned when a plugin could not be found.
type errPluginNotFound string type errPluginNotFound string
func (e errPluginNotFound) NotFound() {} func (errPluginNotFound) NotFound() {}
func (e errPluginNotFound) Error() string { func (e errPluginNotFound) Error() string {
return "Error: No such CLI plugin: " + string(e) return "Error: No such CLI plugin: " + string(e)

View File

@ -337,8 +337,10 @@ func operationSubCommands(cmd *cobra.Command) []*cobra.Command {
return cmds return cmds
} }
const defaultTermWidth = 80
func wrappedFlagUsages(cmd *cobra.Command) string { func wrappedFlagUsages(cmd *cobra.Command) string {
width := 80 width := defaultTermWidth
if ws, err := term.GetWinsize(0); err == nil { if ws, err := term.GetWinsize(0); err == nil {
width = int(ws.Width) width = int(ws.Width)
} }

View File

@ -97,7 +97,7 @@ type DockerCli struct {
} }
// DefaultVersion returns api.defaultVersion. // DefaultVersion returns api.defaultVersion.
func (cli *DockerCli) DefaultVersion() string { func (*DockerCli) DefaultVersion() string {
return api.DefaultVersion return api.DefaultVersion
} }
@ -231,7 +231,7 @@ func (cli *DockerCli) HooksEnabled() bool {
} }
// ManifestStore returns a store for local manifests // ManifestStore returns a store for local manifests
func (cli *DockerCli) ManifestStore() manifeststore.Store { func (*DockerCli) ManifestStore() manifeststore.Store {
// TODO: support override default location from config file // TODO: support override default location from config file
return manifeststore.NewStore(filepath.Join(config.Dir(), "manifests")) return manifeststore.NewStore(filepath.Join(config.Dir(), "manifests"))
} }

View File

@ -177,7 +177,10 @@ func withCustomHeadersFromEnv() client.Opt {
csvReader := csv.NewReader(strings.NewReader(value)) csvReader := csv.NewReader(strings.NewReader(value))
fields, err := csvReader.Read() fields, err := csvReader.Read()
if err != nil { if err != nil {
return errdefs.InvalidParameter(errors.Errorf("failed to parse custom headers from %s environment variable: value must be formatted as comma-separated key=value pairs", envOverrideHTTPHeaders)) return errdefs.InvalidParameter(errors.Errorf(
"failed to parse custom headers from %s environment variable: value must be formatted as comma-separated key=value pairs",
envOverrideHTTPHeaders,
))
} }
if len(fields) == 0 { if len(fields) == 0 {
return nil return nil
@ -191,7 +194,10 @@ func withCustomHeadersFromEnv() client.Opt {
k = strings.TrimSpace(k) k = strings.TrimSpace(k)
if k == "" { if k == "" {
return errdefs.InvalidParameter(errors.Errorf(`failed to set custom headers from %s environment variable: value contains a key=value pair with an empty key: '%s'`, envOverrideHTTPHeaders, kv)) return errdefs.InvalidParameter(errors.Errorf(
`failed to set custom headers from %s environment variable: value contains a key=value pair with an empty key: '%s'`,
envOverrideHTTPHeaders, kv,
))
} }
// We don't currently allow empty key=value pairs, and produce an error. // We don't currently allow empty key=value pairs, and produce an error.
@ -199,7 +205,10 @@ func withCustomHeadersFromEnv() client.Opt {
// from an environment variable with the same name). In the meantime, // from an environment variable with the same name). In the meantime,
// produce an error to prevent users from depending on this. // produce an error to prevent users from depending on this.
if !hasValue { if !hasValue {
return errdefs.InvalidParameter(errors.Errorf(`failed to set custom headers from %s environment variable: missing "=" in key=value pair: '%s'`, envOverrideHTTPHeaders, kv)) return errdefs.InvalidParameter(errors.Errorf(
`failed to set custom headers from %s environment variable: missing "=" in key=value pair: '%s'`,
envOverrideHTTPHeaders, kv,
))
} }
env[http.CanonicalHeaderKey(k)] = v env[http.CanonicalHeaderKey(k)] = v

View File

@ -32,7 +32,7 @@ type SubContext interface {
type SubHeaderContext map[string]string type SubHeaderContext map[string]string
// Label returns the header label for the specified string // Label returns the header label for the specified string
func (c SubHeaderContext) Label(name string) string { func (SubHeaderContext) Label(name string) string {
n := strings.Split(name, ".") n := strings.Split(name, ".")
r := strings.NewReplacer("-", " ", "_", " ") r := strings.NewReplacer("-", " ", "_", " ")
h := r.Replace(n[len(n)-1]) h := r.Replace(n[len(n)-1])

View File

@ -270,7 +270,7 @@ func (c *diskUsageImagesContext) MarshalJSON() ([]byte, error) {
return MarshalJSON(c) return MarshalJSON(c)
} }
func (c *diskUsageImagesContext) Type() string { func (*diskUsageImagesContext) Type() string {
return "Images" return "Images"
} }
@ -321,7 +321,7 @@ func (c *diskUsageContainersContext) MarshalJSON() ([]byte, error) {
return MarshalJSON(c) return MarshalJSON(c)
} }
func (c *diskUsageContainersContext) Type() string { func (*diskUsageContainersContext) Type() string {
return "Containers" return "Containers"
} }
@ -329,7 +329,7 @@ func (c *diskUsageContainersContext) TotalCount() string {
return strconv.Itoa(len(c.containers)) return strconv.Itoa(len(c.containers))
} }
func (c *diskUsageContainersContext) isActive(ctr container.Summary) bool { func (*diskUsageContainersContext) isActive(ctr container.Summary) bool {
return strings.Contains(ctr.State, "running") || return strings.Contains(ctr.State, "running") ||
strings.Contains(ctr.State, "paused") || strings.Contains(ctr.State, "paused") ||
strings.Contains(ctr.State, "restarting") strings.Contains(ctr.State, "restarting")
@ -382,7 +382,7 @@ func (c *diskUsageVolumesContext) MarshalJSON() ([]byte, error) {
return MarshalJSON(c) return MarshalJSON(c)
} }
func (c *diskUsageVolumesContext) Type() string { func (*diskUsageVolumesContext) Type() string {
return "Local Volumes" return "Local Volumes"
} }
@ -443,7 +443,7 @@ func (c *diskUsageBuilderContext) MarshalJSON() ([]byte, error) {
return MarshalJSON(c) return MarshalJSON(c)
} }
func (c *diskUsageBuilderContext) Type() string { func (*diskUsageBuilderContext) Type() string {
return "Build Cache" return "Build Cache"
} }

View File

@ -54,11 +54,11 @@ func (cli *DockerCli) Resource() *resource.Resource {
return cli.res.Get() return cli.res.Get()
} }
func (cli *DockerCli) TracerProvider() trace.TracerProvider { func (*DockerCli) TracerProvider() trace.TracerProvider {
return otel.GetTracerProvider() return otel.GetTracerProvider()
} }
func (cli *DockerCli) MeterProvider() metric.MeterProvider { func (*DockerCli) MeterProvider() metric.MeterProvider {
return otel.GetMeterProvider() return otel.GetMeterProvider()
} }

View File

@ -253,17 +253,17 @@ func (c *commandConn) RemoteAddr() net.Addr {
return c.remoteAddr return c.remoteAddr
} }
func (c *commandConn) SetDeadline(t time.Time) error { func (*commandConn) SetDeadline(t time.Time) error {
logrus.Debugf("unimplemented call: SetDeadline(%v)", t) logrus.Debugf("unimplemented call: SetDeadline(%v)", t)
return nil return nil
} }
func (c *commandConn) SetReadDeadline(t time.Time) error { func (*commandConn) SetReadDeadline(t time.Time) error {
logrus.Debugf("unimplemented call: SetReadDeadline(%v)", t) logrus.Debugf("unimplemented call: SetReadDeadline(%v)", t)
return nil return nil
} }
func (c *commandConn) SetWriteDeadline(t time.Time) error { func (*commandConn) SetWriteDeadline(t time.Time) error {
logrus.Debugf("unimplemented call: SetWriteDeadline(%v)", t) logrus.Debugf("unimplemented call: SetWriteDeadline(%v)", t)
return nil return nil
} }

View File

@ -10,14 +10,14 @@ import (
// Enable sets the DEBUG env var to true // Enable sets the DEBUG env var to true
// and makes the logger to log at debug level. // and makes the logger to log at debug level.
func Enable() { func Enable() {
os.Setenv("DEBUG", "1") _ = os.Setenv("DEBUG", "1")
logrus.SetLevel(logrus.DebugLevel) logrus.SetLevel(logrus.DebugLevel)
} }
// Disable sets the DEBUG env var to false // Disable sets the DEBUG env var to false
// and makes the logger to log at info level. // and makes the logger to log at info level.
func Disable() { func Disable() {
os.Setenv("DEBUG", "") _ = os.Setenv("DEBUG", "")
logrus.SetLevel(logrus.InfoLevel) logrus.SetLevel(logrus.InfoLevel)
} }

View File

@ -44,7 +44,7 @@ func (s *fsStore) Get(listRef reference.Reference, manifest reference.Reference)
return s.getFromFilename(manifest, filename) return s.getFromFilename(manifest, filename)
} }
func (s *fsStore) getFromFilename(ref reference.Reference, filename string) (types.ImageManifest, error) { func (*fsStore) getFromFilename(ref reference.Reference, filename string) (types.ImageManifest, error) {
bytes, err := os.ReadFile(filename) bytes, err := os.ReadFile(filename)
switch { switch {
case os.IsNotExist(err): case os.IsNotExist(err):
@ -165,7 +165,7 @@ func (n *notFoundError) Error() string {
} }
// NotFound interface // NotFound interface
func (n *notFoundError) NotFound() {} func (*notFoundError) NotFound() {}
// IsNotFound returns true if the error is a not found error // IsNotFound returns true if the error is a not found error
func IsNotFound(err error) bool { func IsNotFound(err error) bool {

View File

@ -123,6 +123,6 @@ func (th *existingTokenHandler) AuthorizeRequest(req *http.Request, _ map[string
return nil return nil
} }
func (th *existingTokenHandler) Scheme() string { func (*existingTokenHandler) Scheme() string {
return "bearer" return "bearer"
} }

View File

@ -304,4 +304,4 @@ func (n *notFoundError) Error() string {
} }
// NotFound satisfies interface github.com/docker/docker/errdefs.ErrNotFound // NotFound satisfies interface github.com/docker/docker/errdefs.ErrNotFound
func (n *notFoundError) NotFound() {} func (notFoundError) NotFound() {}

View File

@ -89,7 +89,7 @@ func (scs simpleCredentialStore) RefreshToken(*url.URL, string) string {
return scs.auth.IdentityToken return scs.auth.IdentityToken
} }
func (scs simpleCredentialStore) SetRefreshToken(*url.URL, string, string) {} func (simpleCredentialStore) SetRefreshToken(*url.URL, string, string) {}
// GetNotaryRepository returns a NotaryRepository which stores all the // GetNotaryRepository returns a NotaryRepository which stores all the
// information needed to operate on a notary repository. // information needed to operate on a notary repository.

View File

@ -24,10 +24,10 @@ func (a noColor) With(_ ...aec.ANSI) aec.ANSI {
return a return a
} }
func (a noColor) Apply(s string) string { func (noColor) Apply(s string) string {
return s return s
} }
func (a noColor) String() string { func (noColor) String() string {
return "" return ""
} }

View File

@ -80,7 +80,7 @@ func (o *ConfigOpt) Set(value string) error {
} }
// Type returns the type of this option // Type returns the type of this option
func (o *ConfigOpt) Type() string { func (*ConfigOpt) Type() string {
return "config" return "config"
} }

View File

@ -46,7 +46,7 @@ func (d *DurationOpt) Set(s string) error {
} }
// Type returns the type of this option, which will be displayed in `--help` output // Type returns the type of this option, which will be displayed in `--help` output
func (d *DurationOpt) Type() string { func (*DurationOpt) Type() string {
return "duration" return "duration"
} }

View File

@ -92,7 +92,7 @@ func (o *GpuOpts) Set(value string) error {
} }
// Type returns the type of this option // Type returns the type of this option
func (o *GpuOpts) Type() string { func (*GpuOpts) Type() string {
return "gpu-request" return "gpu-request"
} }

View File

@ -215,7 +215,7 @@ func (m *MountOpt) Set(value string) error {
} }
// Type returns the type of this option // Type returns the type of this option
func (m *MountOpt) Type() string { func (*MountOpt) Type() string {
return "mount" return "mount"
} }

View File

@ -106,7 +106,7 @@ func (n *NetworkOpt) Set(value string) error { //nolint:gocyclo
} }
// Type returns the type of this option // Type returns the type of this option
func (n *NetworkOpt) Type() string { func (*NetworkOpt) Type() string {
return "network" return "network"
} }
@ -116,7 +116,7 @@ func (n *NetworkOpt) Value() []NetworkAttachmentOpts {
} }
// String returns the network opts as a string // String returns the network opts as a string
func (n *NetworkOpt) String() string { func (*NetworkOpt) String() string {
return "" return ""
} }

View File

@ -110,7 +110,7 @@ func (opts *ListOpts) Len() int {
} }
// Type returns a string name for this Option type // Type returns a string name for this Option type
func (opts *ListOpts) Type() string { func (*ListOpts) Type() string {
return "list" return "list"
} }
@ -180,7 +180,7 @@ func (opts *MapOpts) String() string {
} }
// Type returns a string name for this Option type // Type returns a string name for this Option type
func (opts *MapOpts) Type() string { func (*MapOpts) Type() string {
return "map" return "map"
} }
@ -358,7 +358,7 @@ func (o *FilterOpt) Set(value string) error {
} }
// Type returns the option type // Type returns the option type
func (o *FilterOpt) Type() string { func (*FilterOpt) Type() string {
return "filter" return "filter"
} }
@ -386,7 +386,7 @@ func (c *NanoCPUs) Set(value string) error {
} }
// Type returns the type // Type returns the type
func (c *NanoCPUs) Type() string { func (*NanoCPUs) Type() string {
return "decimal" return "decimal"
} }
@ -463,7 +463,7 @@ func (m *MemBytes) Set(value string) error {
} }
// Type returns the type // Type returns the type
func (m *MemBytes) Type() string { func (*MemBytes) Type() string {
return "bytes" return "bytes"
} }
@ -498,7 +498,7 @@ func (m *MemSwapBytes) Set(value string) error {
} }
// Type returns the type // Type returns the type
func (m *MemSwapBytes) Type() string { func (*MemSwapBytes) Type() string {
return "bytes" return "bytes"
} }

View File

@ -121,7 +121,7 @@ func (p *PortOpt) Set(value string) error {
} }
// Type returns the type of this option // Type returns the type of this option
func (p *PortOpt) Type() string { func (*PortOpt) Type() string {
return "port" return "port"
} }

View File

@ -13,7 +13,7 @@ func (s *QuotedString) Set(val string) error {
} }
// Type returns the type of the value // Type returns the type of the value
func (s *QuotedString) Type() string { func (*QuotedString) Type() string {
return "string" return "string"
} }

View File

@ -79,7 +79,7 @@ func (o *SecretOpt) Set(value string) error {
} }
// Type returns the type of this option // Type returns the type of this option
func (o *SecretOpt) Type() string { func (*SecretOpt) Type() string {
return "secret" return "secret"
} }

View File

@ -100,6 +100,6 @@ func (opt *ThrottledeviceOpt) GetList() []*blkiodev.ThrottleDevice {
} }
// Type returns the option type // Type returns the option type
func (opt *ThrottledeviceOpt) Type() string { func (*ThrottledeviceOpt) Type() string {
return "list" return "list"
} }

View File

@ -58,6 +58,6 @@ func (o *UlimitOpt) GetList() []*container.Ulimit {
} }
// Type returns the option type // Type returns the option type
func (o *UlimitOpt) Type() string { func (*UlimitOpt) Type() string {
return "ulimit" return "ulimit"
} }

View File

@ -79,6 +79,6 @@ func (opt *WeightdeviceOpt) GetList() []*blkiodev.WeightDevice {
} }
// Type returns the option type // Type returns the option type
func (opt *WeightdeviceOpt) Type() string { func (*WeightdeviceOpt) Type() string {
return "list" return "list"
} }

2
vendor/modules.txt vendored
View File

@ -229,7 +229,7 @@ github.com/davecgh/go-spew/spew
# github.com/distribution/reference v0.6.0 # github.com/distribution/reference v0.6.0
## explicit; go 1.20 ## explicit; go 1.20
github.com/distribution/reference github.com/distribution/reference
# github.com/docker/cli v28.0.0-rc.2+incompatible # github.com/docker/cli v28.0.0-rc.3+incompatible
## explicit ## explicit
github.com/docker/cli/cli github.com/docker/cli/cli
github.com/docker/cli/cli-plugins/hooks github.com/docker/cli/cli-plugins/hooks