206a8da307
cli/command/container: remove deprecated formatting functions
...
These were deprecated in 907507e22a and
fdc90caeee , which are part of the v28.4
release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-22 09:38:09 +02:00
644dc16b16
vendor: github.com/docker/docker master (v29.0-dev)
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-07-21 23:04:50 +02:00
fdc90caeee
cli/command/container: deprecate DiffFormatWrite
...
It's part of the presentation logic of the cli, and only used internally.
We can consider providing utilities for these, but better as part of
separate packages.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-07-16 13:52:04 +02:00
0db7b9f774
cli/command/container: newDiffContext: use struct-literal
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-07-16 13:50:31 +02:00
239b727834
cli/command/container: DiffFormatWrite: remove intermediate var
...
Also rename "ctx" argument; we shouldn't use this as name for things
that are not a context.Context.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-07-16 13:45:09 +02:00
907507e22a
cli/command/container: deprecate NewDiffFormat
...
It's part of the presentation logic of the cli, and only used internally.
We can consider providing utilities for these, but better as part of
separate packages.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-07-16 13:45:05 +02:00
a2c9f3c6ce
linting: address else/if/elseif statements found by gocritic
...
cli/command/formatter/tabwriter/tabwriter.go:579:10: elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
} else {
^
cli/connhelper/connhelper.go:43:2: singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
switch scheme := u.Scheme; scheme {
^
cli/compose/loader/loader.go:666:10: elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
} else {
^
opts/hosts_test.go:173:10: elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
} else {
^
cli-plugins/manager/candidate_test.go:78:4: ifElseChain: rewrite if-else to switch statement (gocritic)
if tc.err != "" {
^
cli/command/checkpoint/formatter.go:15:2: singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
switch source {
^
cli/command/image/formatter_history.go:25:2: singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
switch source {
^
cli/command/service/scale.go:107:2: ifElseChain: rewrite if-else to switch statement (gocritic)
if serviceMode.Replicated != nil {
^
cli/command/service/update.go:804:9: elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
} else {
^
cli/command/service/update.go:222:2: ifElseChain: rewrite if-else to switch statement (gocritic)
if sendAuth {
^
cli/command/container/formatter_diff.go:17:2: singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
switch source {
^
cli/command/container/start.go:79:2: ifElseChain: rewrite if-else to switch statement (gocritic)
if opts.Attach || opts.OpenStdin {
^
cli/command/container/utils.go:84:11: elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
} else {
^
cli/command/container/exec_test.go:200:11: elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
} else {
^
cli/command/container/logs_test.go:52:11: elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
} else {
^
cli/command/container/opts_test.go:1014:10: elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
} else {
^
cli/command/system/info.go:297:7: singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
switch o.Key {
^
cli/command/system/version.go:164:4: singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
switch component.Name {
^
cli/command/system/info_test.go:478:4: ifElseChain: rewrite if-else to switch statement (gocritic)
if tc.expectedOut != "" {
^
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2023-11-20 16:02:16 +01:00
4f97f55999
vendor: github.com/docker/docker v24.0.0-rc.1.0.20230505222407-8d9a40a82034
...
This will be v24.0.0-rc.2
full diff: https://github.com/docker/docker/compare/v24.0.0-rc.1...8d9a40a820349860405e142249c55215aa4da8e3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2023-05-06 00:34:34 +02:00
1da95ff6aa
format code with gofumpt
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2022-09-30 11:59:11 +02:00
69fdd2a4ad
formatter package heavy refactoring
...
- make it possible to extract the formatter implementation from the
"common" code, that way, the formatter package stays small
- extract some formatter into their own packages
This is essentially moving the "formatter" implementation of each type
in their respective packages. The *main* reason to do that, is to be
able to depend on `cli/command/formatter` without depending of the
implementation detail of the formatter. As of now, depending on
`cli/command/formatter` means we depend on `docker/docker/api/types`,
`docker/licensing`, … — that should not be the case. `formatter`
should hold the common code (or helpers) to easily create formatter,
not all formatter implementations.
Signed-off-by: Vincent Demeester <vincent@sbr.pm >
2018-10-23 17:05:44 +02:00