1
0
mirror of https://github.com/docker/cli.git synced 2026-01-13 18:22:35 +03:00
Commit Graph

11643 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
04bcae3a8c cli/command/secret: remove deprecated formatting functions
These were deprecated in f3088e37a0, which
is part of the v28.4 release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-22 09:41:52 +02:00
Sebastiaan van Stijn
c592932f47 cli/command/registry: remove deprecated formatting functions
These were deprecated in 83371c2014, which
is part of the v28.4 release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-22 09:41:11 +02:00
Sebastiaan van Stijn
264080d2fc cli/command/plugin: remove deprecated formatting functions
These were deprecated in bf47419852, which
is part of the v28.4 release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-22 09:40:43 +02:00
Sebastiaan van Stijn
e5a0fb09a3 cli/command/node: remove deprecated formatting functions
These were deprecated in 123ef81f7d, which
is part of the v28.4 release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-22 09:40:09 +02:00
Sebastiaan van Stijn
7b172fcf53 cli/command/network: remove deprecated formatting functions
These were deprecated in e3903a1ac8, which
is part of the v28.4 release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-22 09:39:35 +02:00
Sebastiaan van Stijn
d223ec3b56 cli/command/image: remove deprecated formatting functions
These were deprecated in 15cf4fa912, which
is part of the v28.4 release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-22 09:38:56 +02:00
Sebastiaan van Stijn
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
Sebastiaan van Stijn
f969adf63f cli/command/config: remove deprecated formatting functions
These were deprecated in e626f778ec, which
is part of the v28.4 release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-22 09:36:11 +02:00
Sebastiaan van Stijn
e416418e70 cli/command/checkpoint: remove deprecated formatting functions
These were deprecated in d861b78a8a, which
is part of the v28.4 release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-22 09:34:17 +02:00
Sebastiaan van Stijn
58bb45c37f Merge pull request #6336 from thaJeztah/internalize_formatters
cli/command/*: deprecate formatting-related functions and types
2025-08-22 08:29:16 +02:00
Sebastiaan van Stijn
95c9b1b13b cli/command/trust: deprecate formatting-related functions and types
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.

This deprecates the following types and functions:

- `SignedTagInfo`
- `SignerInfo`
- `NewTrustTagFormat`
- `NewSignerInfoFormat`
- `TagWrite`
- `SignerInfoWrite`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-21 15:25:26 +02:00
Sebastiaan van Stijn
c3ee82fdc3 cli/command/task: deprecate NewTaskFormat, FormatWrite
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-08-21 15:25:26 +02:00
Sebastiaan van Stijn
9f453d3fea cli/command/service: deprecate NewFormat, InspectFormatWrite
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-08-21 15:25:26 +02:00
Sebastiaan van Stijn
f3088e37a0 cli/command/secret: deprecate NewFormat, FormatWrite, InspectFormatWrite
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-08-21 15:25:25 +02:00
Sebastiaan van Stijn
83371c2014 cli/command/registry: deprecate NewSearchFormat, SearchWrite
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-08-21 15:25:25 +02:00
Sebastiaan van Stijn
bf47419852 cli/command/plugin: deprecate NewFormat, FormatWrite
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-08-21 15:25:25 +02:00
Sebastiaan van Stijn
123ef81f7d cli/command/node: deprecate NewFormat, FormatWrite, InspectFormatWrite
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-08-21 15:25:25 +02:00
Sebastiaan van Stijn
e626f778ec cli/command/config: deprecate NewFormat, FormatWrite, InspectFormatWrite
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-08-21 15:25:25 +02:00
Sebastiaan van Stijn
d861b78a8a cli/command/checkpoint: deprecate NewFormat, FormatWrite
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-08-21 15:25:24 +02:00
Sebastiaan van Stijn
15cf4fa912 cli/command/image: deprecate NewHistoryFormat, HistoryWrite
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-08-21 15:25:24 +02:00
Sebastiaan van Stijn
e3903a1ac8 cli/command/network: deprecate NewFormat, FormatWrite
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-08-21 14:31:27 +02:00
Sebastiaan van Stijn
b0d1d94711 Merge pull request #6330 from thaJeztah/internalize_ParseEnvFile
opts: deprecate ParseEnvFile
2025-08-21 13:35:39 +02:00
Sebastiaan van Stijn
8c0440a653 Merge pull request #6335 from thaJeztah/rm_exported_cobra_funcs
cli/command/*: remove deprecated cobra command constructors
2025-08-21 13:13:19 +02:00
Sebastiaan van Stijn
40e605a3b2 Merge pull request #6334 from thaJeztah/commands_nolock
internal/commands: remove mutexes / synchronisation and copy
2025-08-21 13:11:17 +02:00
Sebastiaan van Stijn
873609d790 cli/command/*: remove deprecated cobra command constructors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-21 11:12:28 +02:00
Sebastiaan van Stijn
570a17b3bc internal/commands: RegisterLegacy: remove redundant copy
The RegisterLegacy and Register functions register constructors for
commands, so we should expect them to be a fresh copy that is not
shared, which means that we can mutate the command in-place.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-21 10:47:26 +02:00
Sebastiaan van Stijn
4405c0bd50 internal/commands: remove mutexes / synchronisation
The Register and RegisterLegacy functions are designed to be used
in package init() functions, which are guaranteed to be run
sequentially.

From the documentation (https://go.dev/ref/mem#init);

> Program initialization runs in a single goroutine, but that goroutine
> may create other goroutines, which run concurrently. If a package `p`
> imports package `q`, the completion of `q`'s `init` functions happens
> before the start of any of `p`'s.
>
> The completion of all `init` functions is synchronized before the
> start of the function `main.main`.

This patch removes the synchonisation as no concurrency should happen
if these functions are used as intended.

As the internal queue is not expected to be mutated after use, we also
don't have to return a copy.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-21 10:42:02 +02:00
Sebastiaan van Stijn
942a6c4c76 Merge pull request #6329 from Benehiko/cli/commands
Register CLI commands implicitly
2025-08-21 09:23:30 +02:00
Alano Terblanche
56cab16779 Register CLI commands implicitly
This patch removes the explicit `commands.AddCommands` function and
instead relies upon the `internal/commands` package which registers each
CLI command using `init()` instead.

Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
2025-08-21 07:16:35 +02:00
Sebastiaan van Stijn
76c405cfdb Merge pull request #6327 from thaJeztah/registryclient_simplify_repositoryEndpoint
internal/registryclient: repositoryEndpoint: memoize repoName
2025-08-20 15:04:16 +02:00
Sebastiaan van Stijn
e650803f09 opts: deprecate ParseEnvFile
It was a wrapper around kvfile.Load, which should be used instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-20 15:03:05 +02:00
Alano Terblanche
4d93a6486e Merge pull request #6328 from Benehiko/command/trust
Unexport trust commands
2025-08-20 12:18:16 +00:00
Alano Terblanche
d071c29d4a Merge pull request #6326 from Benehiko/command/plugin
Unexport plugin commands
2025-08-20 12:13:18 +00:00
Alano Terblanche
8d99b45d4a Merge pull request #6325 from Benehiko/command/swarm
Unexport swarm commands
2025-08-20 12:08:40 +00:00
Alano Terblanche
bd8e3e4440 Unexport trust commands
This patch deprecates exported trust commands and moves the implementation
details to an unexported function.

Commands that are affected include:

- trust.NewTrustCommand

Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
2025-08-20 14:07:45 +02:00
Alano Terblanche
c6b7268932 Unexport plugin commands
This patch deprecates exported plugin commands and moves the implementation
details to an unexported function.

Commands that are affected include:

- plugin.NewPluginCommand

Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
2025-08-20 14:03:57 +02:00
Sebastiaan van Stijn
2ce94e4fff internal/registryclient: repositoryEndpoint: memoize repoName
- Parse/format the repository name when constructing and store the
  result.
- Remove the Name() accessor, as this type is only used internally,
  and no longer had any special handling.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-20 14:02:26 +02:00
Alano Terblanche
bf39340294 Unexport swarm commands
This patch deprecates exported swarm commands and moves the implementation
details to an unexported function.

Commands that are affected include:

- swarm.NewSwarmCommand

Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
2025-08-20 13:59:30 +02:00
Alano Terblanche
b2b7187244 Merge pull request #6324 from Benehiko/command/registry
Unexport registry commands
2025-08-20 11:43:43 +00:00
Alano Terblanche
7dfcb06587 Merge pull request #6322 from Benehiko/command/context
Unexport context command
2025-08-20 11:40:09 +00:00
Alano Terblanche
d4588c711c Unexport registry commands
This patch deprecates exported registry commands and moves the implementation
details to an unexported function.

Commands that are affected include:

- registry.NewLoginCommand
- registry.NewLogoutCommand
- registry.NewSearchCommand

Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
2025-08-20 13:39:06 +02:00
Alano Terblanche
bf9173f383 Merge pull request #6323 from Benehiko/command/stack
Unexport stack commands
2025-08-20 11:36:40 +00:00
Alano Terblanche
630fe430ff Unexport stack commands
This patch deprecates exported stack commands and moves the implementation
details to an unexported function.

Commands that are affected include:

- stack.NewStackCommand

Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
2025-08-20 13:27:11 +02:00
Alano Terblanche
3b0edc794c Unexport context command
This patch deprecates exported context commands and moves the implementation
details to an unexported function.

Commands that are affected include:

- context.NewContextCommand

Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
2025-08-20 13:22:47 +02:00
Alano Terblanche
89316e18fc Merge pull request #6321 from Benehiko/command/volume
Unexport volume commands
2025-08-20 11:18:35 +00:00
Alano Terblanche
7a50955006 Merge pull request #6320 from Benehiko/command/service
Unexport service commands
2025-08-20 10:57:33 +00:00
Alano Terblanche
9961e39d40 Unexport volume commands
This patch deprecates exported volume commands and moves the implementation
details to an unexported function.

Commands that are affected include:

- volume.NewVolumeCommand
- volume.NewPruneCommand

Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
2025-08-20 12:57:33 +02:00
Alano Terblanche
88178eda32 Unexport service commands
This patch deprecates exported service commands and moves the implementation
details to an unexported function.

Commands that are affected include:

- service.NewServiceCommand

Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
2025-08-20 12:51:55 +02:00
Sebastiaan van Stijn
cd859b33b4 Merge pull request #6318 from Benehiko/command/manifest
Unexport manifest command
2025-08-20 12:51:14 +02:00
Alano Terblanche
1d34432676 Merge pull request #6319 from Benehiko/command/secret
Unexport secret commands
2025-08-20 10:49:06 +00:00