Sebastiaan van Stijn
139968dff2
cli/command/completion: deprecate NoComplete
...
This function was an exact duplicate of [cobra.NoFileCompletions], so
deprecating it in favor of that.
[cobra.NoFileCompletions]: https://pkg.go.dev/github.com/spf13/cobra@v1.9.1#NoFileCompletions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
(cherry picked from commit 2827d037ba )
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-30 12:24:11 +02:00
Sebastiaan van Stijn
a621313658
cli/command: rename vars for consistency and prevent shadowing
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
(cherry picked from commit 9fd71c8347 )
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-08-28 11:37:25 +02:00
Sebastiaan van Stijn
22a573649d
cli/command: change uses of ListOpts.GetAll for GetSlice
...
The `GetSlice()` function is part of cobra's [cobra.SliceValue] interface,
and duplicates the older `GetAll()` method. This patch changes our use
of the `GetAll()` method with the intent to deprecated it in future.
[cobra.SliceValue]: https://pkg.go.dev/github.com/spf13/cobra@v1.9.1#SliceValue
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-04-23 13:51:37 +02:00
Sebastiaan van Stijn
768d10767f
completion: add completion for docker node flags
...
With this patch:
docker node update --role
manager worker
docker node update --availability
active drain pause
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-02-20 18:33:17 +01:00
Sebastiaan van Stijn
d5e6e2ec6e
completion: add completion for node names
...
Change completion for nodes to use names by default, and bring back
support for the `DOCKER_COMPLETION_SHOW_NODE_IDS` env-var
https://github.com/docker/cli/blob/f9ced58158d5e0b358052432244b483774a1983d/contrib/completion/bash/docker#L38
With this patch:
docker node ps <tab>
docker-desktop self
export DOCKER_COMPLETION_SHOW_NODE_IDS=yes
docker node ps <TAB>
docker-desktop qyeriqk20al6hy4y869d08ff5 self
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-02-20 18:33:09 +01:00
Brian Goff
5400a48aaf
Plumb contexts through commands
...
This is to prepare for otel support.
Signed-off-by: Brian Goff <cpuguy83@gmail.com >
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2023-12-12 22:30:16 +01:00
CrazyMax
4595ce588c
cmd: set double quotes as code delimiter
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2023-01-06 19:15:33 +01:00
Sebastiaan van Stijn
1da95ff6aa
format code with gofumpt
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2022-09-30 11:59:11 +02:00
Kir Kolyshkin
6f8070deb2
Switch from x/net/context to context
...
Since go 1.7, "context" is a standard package. Since go 1.9,
x/net/context merely provides some types aliased to those in
the standard context package.
The changes were performed by the following script:
for f in $(git ls-files \*.go | grep -v ^vendor/); do
sed -i 's|golang.org/x/net/context|context|' $f
goimports -w $f
for i in 1 2; do
awk '/^$/ {e=1; next;}
/\t"context"$/ {e=0;}
{if (e) {print ""; e=0}; print;}' < $f > $f.new && \
mv $f.new $f
goimports -w $f
done
done
[v2: do awk/goimports fixup twice]
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com >
2018-05-11 16:49:43 -07:00
Vincent Demeester
44ac80881f
Update vendoring of docker/docker
...
Signed-off-by: Vincent Demeester <vincent@sbr.pm >
2017-06-06 00:23:21 +02:00
Vincent Demeester
d7f6563efc
Update cli imports to using local package
...
Also, rename a bunch of variable to not *shadow* the `opts` package
name.
Signed-off-by: Vincent Demeester <vincent@sbr.pm >
2017-05-15 14:45:19 +02:00
Daniel Nephin
10641c2aae
Update imports.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-04-17 18:07:56 -04:00
Daniel Nephin
1630fc40f8
Import docker/docker/cli
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com >
2017-04-17 17:40:59 -04:00