diff --git a/go.mod b/go.mod index c3ca9904..4bf5408d 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/creack/pty v1.1.24 github.com/davecgh/go-spew v1.1.1 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/docker v28.0.0-rc.3+incompatible github.com/docker/go-units v0.5.0 diff --git a/go.sum b/go.sum index 4567d8ad..bae1164f 100644 --- a/go.sum +++ b/go.sum @@ -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/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/docker/cli v28.0.0-rc.2+incompatible h1:2N1dpr3qtlJwIQpqXm7oNwWNAUGzpKlsCeJ32ejvpTk= -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 h1:OnM9p+c9Gxw8JQhfeoj9TbIC0VQ8elqOYA2J2nJ8r3w= +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/go.mod h1:ClrwlNW+UioiRyH9GiAOe1o3J/TsY3Tr1ipoypjAUtc= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= diff --git a/vendor/github.com/docker/cli/cli-plugins/manager/manager.go b/vendor/github.com/docker/cli/cli-plugins/manager/manager.go index 223f3ae0..9f795bc4 100644 --- a/vendor/github.com/docker/cli/cli-plugins/manager/manager.go +++ b/vendor/github.com/docker/cli/cli-plugins/manager/manager.go @@ -32,7 +32,7 @@ const ( // errPluginNotFound is the error returned when a plugin could not be found. type errPluginNotFound string -func (e errPluginNotFound) NotFound() {} +func (errPluginNotFound) NotFound() {} func (e errPluginNotFound) Error() string { return "Error: No such CLI plugin: " + string(e) diff --git a/vendor/github.com/docker/cli/cli/cobra.go b/vendor/github.com/docker/cli/cli/cobra.go index e6bcc90f..aa7dbef4 100644 --- a/vendor/github.com/docker/cli/cli/cobra.go +++ b/vendor/github.com/docker/cli/cli/cobra.go @@ -337,8 +337,10 @@ func operationSubCommands(cmd *cobra.Command) []*cobra.Command { return cmds } +const defaultTermWidth = 80 + func wrappedFlagUsages(cmd *cobra.Command) string { - width := 80 + width := defaultTermWidth if ws, err := term.GetWinsize(0); err == nil { width = int(ws.Width) } diff --git a/vendor/github.com/docker/cli/cli/command/cli.go b/vendor/github.com/docker/cli/cli/command/cli.go index a8cfd58e..227720fa 100644 --- a/vendor/github.com/docker/cli/cli/command/cli.go +++ b/vendor/github.com/docker/cli/cli/command/cli.go @@ -97,7 +97,7 @@ type DockerCli struct { } // DefaultVersion returns api.defaultVersion. -func (cli *DockerCli) DefaultVersion() string { +func (*DockerCli) DefaultVersion() string { return api.DefaultVersion } @@ -231,7 +231,7 @@ func (cli *DockerCli) HooksEnabled() bool { } // 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 return manifeststore.NewStore(filepath.Join(config.Dir(), "manifests")) } diff --git a/vendor/github.com/docker/cli/cli/command/cli_options.go b/vendor/github.com/docker/cli/cli/command/cli_options.go index 84b121f3..ef133d6a 100644 --- a/vendor/github.com/docker/cli/cli/command/cli_options.go +++ b/vendor/github.com/docker/cli/cli/command/cli_options.go @@ -177,7 +177,10 @@ func withCustomHeadersFromEnv() client.Opt { csvReader := csv.NewReader(strings.NewReader(value)) fields, err := csvReader.Read() 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 { return nil @@ -191,7 +194,10 @@ func withCustomHeadersFromEnv() client.Opt { k = strings.TrimSpace(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. @@ -199,7 +205,10 @@ func withCustomHeadersFromEnv() client.Opt { // from an environment variable with the same name). In the meantime, // produce an error to prevent users from depending on this. 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 diff --git a/vendor/github.com/docker/cli/cli/command/formatter/custom.go b/vendor/github.com/docker/cli/cli/command/formatter/custom.go index 043e268d..6910a261 100644 --- a/vendor/github.com/docker/cli/cli/command/formatter/custom.go +++ b/vendor/github.com/docker/cli/cli/command/formatter/custom.go @@ -32,7 +32,7 @@ type SubContext interface { type SubHeaderContext map[string]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, ".") r := strings.NewReplacer("-", " ", "_", " ") h := r.Replace(n[len(n)-1]) diff --git a/vendor/github.com/docker/cli/cli/command/formatter/disk_usage.go b/vendor/github.com/docker/cli/cli/command/formatter/disk_usage.go index 18d79d08..1199d571 100644 --- a/vendor/github.com/docker/cli/cli/command/formatter/disk_usage.go +++ b/vendor/github.com/docker/cli/cli/command/formatter/disk_usage.go @@ -270,7 +270,7 @@ func (c *diskUsageImagesContext) MarshalJSON() ([]byte, error) { return MarshalJSON(c) } -func (c *diskUsageImagesContext) Type() string { +func (*diskUsageImagesContext) Type() string { return "Images" } @@ -321,7 +321,7 @@ func (c *diskUsageContainersContext) MarshalJSON() ([]byte, error) { return MarshalJSON(c) } -func (c *diskUsageContainersContext) Type() string { +func (*diskUsageContainersContext) Type() string { return "Containers" } @@ -329,7 +329,7 @@ func (c *diskUsageContainersContext) TotalCount() string { 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") || strings.Contains(ctr.State, "paused") || strings.Contains(ctr.State, "restarting") @@ -382,7 +382,7 @@ func (c *diskUsageVolumesContext) MarshalJSON() ([]byte, error) { return MarshalJSON(c) } -func (c *diskUsageVolumesContext) Type() string { +func (*diskUsageVolumesContext) Type() string { return "Local Volumes" } @@ -443,7 +443,7 @@ func (c *diskUsageBuilderContext) MarshalJSON() ([]byte, error) { return MarshalJSON(c) } -func (c *diskUsageBuilderContext) Type() string { +func (*diskUsageBuilderContext) Type() string { return "Build Cache" } diff --git a/vendor/github.com/docker/cli/cli/command/telemetry.go b/vendor/github.com/docker/cli/cli/command/telemetry.go index d8985234..2ee8adfb 100644 --- a/vendor/github.com/docker/cli/cli/command/telemetry.go +++ b/vendor/github.com/docker/cli/cli/command/telemetry.go @@ -54,11 +54,11 @@ func (cli *DockerCli) Resource() *resource.Resource { return cli.res.Get() } -func (cli *DockerCli) TracerProvider() trace.TracerProvider { +func (*DockerCli) TracerProvider() trace.TracerProvider { return otel.GetTracerProvider() } -func (cli *DockerCli) MeterProvider() metric.MeterProvider { +func (*DockerCli) MeterProvider() metric.MeterProvider { return otel.GetMeterProvider() } diff --git a/vendor/github.com/docker/cli/cli/connhelper/commandconn/commandconn.go b/vendor/github.com/docker/cli/cli/connhelper/commandconn/commandconn.go index c100b97e..52888a91 100644 --- a/vendor/github.com/docker/cli/cli/connhelper/commandconn/commandconn.go +++ b/vendor/github.com/docker/cli/cli/connhelper/commandconn/commandconn.go @@ -253,17 +253,17 @@ func (c *commandConn) RemoteAddr() net.Addr { 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) return nil } -func (c *commandConn) SetReadDeadline(t time.Time) error { +func (*commandConn) SetReadDeadline(t time.Time) error { logrus.Debugf("unimplemented call: SetReadDeadline(%v)", t) return nil } -func (c *commandConn) SetWriteDeadline(t time.Time) error { +func (*commandConn) SetWriteDeadline(t time.Time) error { logrus.Debugf("unimplemented call: SetWriteDeadline(%v)", t) return nil } diff --git a/vendor/github.com/docker/cli/cli/debug/debug.go b/vendor/github.com/docker/cli/cli/debug/debug.go index 1a9a46ab..84002bd0 100644 --- a/vendor/github.com/docker/cli/cli/debug/debug.go +++ b/vendor/github.com/docker/cli/cli/debug/debug.go @@ -10,14 +10,14 @@ import ( // Enable sets the DEBUG env var to true // and makes the logger to log at debug level. func Enable() { - os.Setenv("DEBUG", "1") + _ = os.Setenv("DEBUG", "1") logrus.SetLevel(logrus.DebugLevel) } // Disable sets the DEBUG env var to false // and makes the logger to log at info level. func Disable() { - os.Setenv("DEBUG", "") + _ = os.Setenv("DEBUG", "") logrus.SetLevel(logrus.InfoLevel) } diff --git a/vendor/github.com/docker/cli/cli/manifest/store/store.go b/vendor/github.com/docker/cli/cli/manifest/store/store.go index c4f8219c..e97e8628 100644 --- a/vendor/github.com/docker/cli/cli/manifest/store/store.go +++ b/vendor/github.com/docker/cli/cli/manifest/store/store.go @@ -44,7 +44,7 @@ func (s *fsStore) Get(listRef reference.Reference, manifest reference.Reference) 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) switch { case os.IsNotExist(err): @@ -165,7 +165,7 @@ func (n *notFoundError) Error() string { } // NotFound interface -func (n *notFoundError) NotFound() {} +func (*notFoundError) NotFound() {} // IsNotFound returns true if the error is a not found error func IsNotFound(err error) bool { diff --git a/vendor/github.com/docker/cli/cli/registry/client/endpoint.go b/vendor/github.com/docker/cli/cli/registry/client/endpoint.go index 2446da85..95312b05 100644 --- a/vendor/github.com/docker/cli/cli/registry/client/endpoint.go +++ b/vendor/github.com/docker/cli/cli/registry/client/endpoint.go @@ -123,6 +123,6 @@ func (th *existingTokenHandler) AuthorizeRequest(req *http.Request, _ map[string return nil } -func (th *existingTokenHandler) Scheme() string { +func (*existingTokenHandler) Scheme() string { return "bearer" } diff --git a/vendor/github.com/docker/cli/cli/registry/client/fetcher.go b/vendor/github.com/docker/cli/cli/registry/client/fetcher.go index 3e4b36d3..d1f255bf 100644 --- a/vendor/github.com/docker/cli/cli/registry/client/fetcher.go +++ b/vendor/github.com/docker/cli/cli/registry/client/fetcher.go @@ -304,4 +304,4 @@ func (n *notFoundError) Error() string { } // NotFound satisfies interface github.com/docker/docker/errdefs.ErrNotFound -func (n *notFoundError) NotFound() {} +func (notFoundError) NotFound() {} diff --git a/vendor/github.com/docker/cli/cli/trust/trust.go b/vendor/github.com/docker/cli/cli/trust/trust.go index 5e08b49e..bb7e597a 100644 --- a/vendor/github.com/docker/cli/cli/trust/trust.go +++ b/vendor/github.com/docker/cli/cli/trust/trust.go @@ -89,7 +89,7 @@ func (scs simpleCredentialStore) RefreshToken(*url.URL, string) string { 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 // information needed to operate on a notary repository. diff --git a/vendor/github.com/docker/cli/internal/tui/colors.go b/vendor/github.com/docker/cli/internal/tui/colors.go index c36dfabc..796aa390 100644 --- a/vendor/github.com/docker/cli/internal/tui/colors.go +++ b/vendor/github.com/docker/cli/internal/tui/colors.go @@ -24,10 +24,10 @@ func (a noColor) With(_ ...aec.ANSI) aec.ANSI { return a } -func (a noColor) Apply(s string) string { +func (noColor) Apply(s string) string { return s } -func (a noColor) String() string { +func (noColor) String() string { return "" } diff --git a/vendor/github.com/docker/cli/opts/config.go b/vendor/github.com/docker/cli/opts/config.go index 1423ae3b..1fc0eb35 100644 --- a/vendor/github.com/docker/cli/opts/config.go +++ b/vendor/github.com/docker/cli/opts/config.go @@ -80,7 +80,7 @@ func (o *ConfigOpt) Set(value string) error { } // Type returns the type of this option -func (o *ConfigOpt) Type() string { +func (*ConfigOpt) Type() string { return "config" } diff --git a/vendor/github.com/docker/cli/opts/duration.go b/vendor/github.com/docker/cli/opts/duration.go index 5dc6eeaa..d55c51e6 100644 --- a/vendor/github.com/docker/cli/opts/duration.go +++ b/vendor/github.com/docker/cli/opts/duration.go @@ -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 -func (d *DurationOpt) Type() string { +func (*DurationOpt) Type() string { return "duration" } diff --git a/vendor/github.com/docker/cli/opts/gpus.go b/vendor/github.com/docker/cli/opts/gpus.go index 93bf9397..993f6da9 100644 --- a/vendor/github.com/docker/cli/opts/gpus.go +++ b/vendor/github.com/docker/cli/opts/gpus.go @@ -92,7 +92,7 @@ func (o *GpuOpts) Set(value string) error { } // Type returns the type of this option -func (o *GpuOpts) Type() string { +func (*GpuOpts) Type() string { return "gpu-request" } diff --git a/vendor/github.com/docker/cli/opts/mount.go b/vendor/github.com/docker/cli/opts/mount.go index 5e23a513..275a4d7f 100644 --- a/vendor/github.com/docker/cli/opts/mount.go +++ b/vendor/github.com/docker/cli/opts/mount.go @@ -215,7 +215,7 @@ func (m *MountOpt) Set(value string) error { } // Type returns the type of this option -func (m *MountOpt) Type() string { +func (*MountOpt) Type() string { return "mount" } diff --git a/vendor/github.com/docker/cli/opts/network.go b/vendor/github.com/docker/cli/opts/network.go index 2ce5dff1..c3510870 100644 --- a/vendor/github.com/docker/cli/opts/network.go +++ b/vendor/github.com/docker/cli/opts/network.go @@ -106,7 +106,7 @@ func (n *NetworkOpt) Set(value string) error { //nolint:gocyclo } // Type returns the type of this option -func (n *NetworkOpt) Type() string { +func (*NetworkOpt) Type() string { return "network" } @@ -116,7 +116,7 @@ func (n *NetworkOpt) Value() []NetworkAttachmentOpts { } // String returns the network opts as a string -func (n *NetworkOpt) String() string { +func (*NetworkOpt) String() string { return "" } diff --git a/vendor/github.com/docker/cli/opts/opts.go b/vendor/github.com/docker/cli/opts/opts.go index 157b30f3..061fda57 100644 --- a/vendor/github.com/docker/cli/opts/opts.go +++ b/vendor/github.com/docker/cli/opts/opts.go @@ -110,7 +110,7 @@ func (opts *ListOpts) Len() int { } // Type returns a string name for this Option type -func (opts *ListOpts) Type() string { +func (*ListOpts) Type() string { return "list" } @@ -180,7 +180,7 @@ func (opts *MapOpts) String() string { } // Type returns a string name for this Option type -func (opts *MapOpts) Type() string { +func (*MapOpts) Type() string { return "map" } @@ -358,7 +358,7 @@ func (o *FilterOpt) Set(value string) error { } // Type returns the option type -func (o *FilterOpt) Type() string { +func (*FilterOpt) Type() string { return "filter" } @@ -386,7 +386,7 @@ func (c *NanoCPUs) Set(value string) error { } // Type returns the type -func (c *NanoCPUs) Type() string { +func (*NanoCPUs) Type() string { return "decimal" } @@ -463,7 +463,7 @@ func (m *MemBytes) Set(value string) error { } // Type returns the type -func (m *MemBytes) Type() string { +func (*MemBytes) Type() string { return "bytes" } @@ -498,7 +498,7 @@ func (m *MemSwapBytes) Set(value string) error { } // Type returns the type -func (m *MemSwapBytes) Type() string { +func (*MemSwapBytes) Type() string { return "bytes" } diff --git a/vendor/github.com/docker/cli/opts/port.go b/vendor/github.com/docker/cli/opts/port.go index 099aae35..0407355e 100644 --- a/vendor/github.com/docker/cli/opts/port.go +++ b/vendor/github.com/docker/cli/opts/port.go @@ -121,7 +121,7 @@ func (p *PortOpt) Set(value string) error { } // Type returns the type of this option -func (p *PortOpt) Type() string { +func (*PortOpt) Type() string { return "port" } diff --git a/vendor/github.com/docker/cli/opts/quotedstring.go b/vendor/github.com/docker/cli/opts/quotedstring.go index 741f450b..eb2ac7fb 100644 --- a/vendor/github.com/docker/cli/opts/quotedstring.go +++ b/vendor/github.com/docker/cli/opts/quotedstring.go @@ -13,7 +13,7 @@ func (s *QuotedString) Set(val string) error { } // Type returns the type of the value -func (s *QuotedString) Type() string { +func (*QuotedString) Type() string { return "string" } diff --git a/vendor/github.com/docker/cli/opts/secret.go b/vendor/github.com/docker/cli/opts/secret.go index 09d2b2b3..bdf232de 100644 --- a/vendor/github.com/docker/cli/opts/secret.go +++ b/vendor/github.com/docker/cli/opts/secret.go @@ -79,7 +79,7 @@ func (o *SecretOpt) Set(value string) error { } // Type returns the type of this option -func (o *SecretOpt) Type() string { +func (*SecretOpt) Type() string { return "secret" } diff --git a/vendor/github.com/docker/cli/opts/throttledevice.go b/vendor/github.com/docker/cli/opts/throttledevice.go index 8bf12880..46b09185 100644 --- a/vendor/github.com/docker/cli/opts/throttledevice.go +++ b/vendor/github.com/docker/cli/opts/throttledevice.go @@ -100,6 +100,6 @@ func (opt *ThrottledeviceOpt) GetList() []*blkiodev.ThrottleDevice { } // Type returns the option type -func (opt *ThrottledeviceOpt) Type() string { +func (*ThrottledeviceOpt) Type() string { return "list" } diff --git a/vendor/github.com/docker/cli/opts/ulimit.go b/vendor/github.com/docker/cli/opts/ulimit.go index 1409a109..48052c88 100644 --- a/vendor/github.com/docker/cli/opts/ulimit.go +++ b/vendor/github.com/docker/cli/opts/ulimit.go @@ -58,6 +58,6 @@ func (o *UlimitOpt) GetList() []*container.Ulimit { } // Type returns the option type -func (o *UlimitOpt) Type() string { +func (*UlimitOpt) Type() string { return "ulimit" } diff --git a/vendor/github.com/docker/cli/opts/weightdevice.go b/vendor/github.com/docker/cli/opts/weightdevice.go index ee377fc3..036c7c8c 100644 --- a/vendor/github.com/docker/cli/opts/weightdevice.go +++ b/vendor/github.com/docker/cli/opts/weightdevice.go @@ -79,6 +79,6 @@ func (opt *WeightdeviceOpt) GetList() []*blkiodev.WeightDevice { } // Type returns the option type -func (opt *WeightdeviceOpt) Type() string { +func (*WeightdeviceOpt) Type() string { return "list" } diff --git a/vendor/modules.txt b/vendor/modules.txt index fc1cd5c6..754596ed 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -229,7 +229,7 @@ github.com/davecgh/go-spew/spew # github.com/distribution/reference v0.6.0 ## explicit; go 1.20 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 github.com/docker/cli/cli github.com/docker/cli/cli-plugins/hooks