buildx/commands
Jonathan A. Sternberg ef4a165e48
commands: add an alias for --check to be the same as --call=check
This adds an alias for `--check` that causes it to behave the same as
`--call=check`. This is done using `BoolFunc` to call a function when
the option is seen and to set it to the correct value. This should allow
command line flags like `--check --call=targets` to work correctly (even
though they conflict) by making it so the first invocation sets the
print function to `check` and the second overwrites the first. This is
the expected behavior for these types of boolean flags.

`BoolFunc` itself is part of the standard library flags package, but
never seems to have made it into pflag possibly because it was added in
go 1.21.

https://pkg.go.dev/flag#FlagSet.BoolFunc

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2024-06-03 13:25:21 -05:00
..
debug Mark experimental flags in `--help` 2024-01-13 19:53:56 +09:00
imagetools Add a --prefer-index flag that allows you to specify the preferred behavior when deciding on how to create an image/manifest from a single source. 2024-05-29 14:07:28 -04:00
bake.go build: set record provenance in response 2024-04-11 10:11:27 +02:00
build.go commands: add an alias for --check to be the same as --call=check 2024-06-03 13:25:21 -05:00
create.go driver: make buildkitd "config" and "flags" names consistent 2024-02-22 10:26:18 +01:00
dial_stdio.go dial-stdio: remove extra cmd.flags() 2024-06-03 14:14:55 +02:00
diskusage.go simplify signal handling for cobra context 2024-01-19 17:18:42 -08:00
inspect.go driver: make buildkitd "config" and "flags" names consistent 2024-02-22 10:26:18 +01:00
install.go lint: gopls fixes 2024-04-24 17:58:17 -07:00
ls.go simplify signal handling for cobra context 2024-01-19 17:18:42 -08:00
prune.go prune: allow negative and prefix filters 2024-05-24 16:57:25 -07:00
rm.go commands: handle ctrl-c on active prompt 2024-02-27 17:35:27 -08:00
root.go chore: check experimental from confutil 2024-03-15 11:52:41 +01:00
stop.go simplify signal handling for cobra context 2024-01-19 17:18:42 -08:00
uninstall.go lint: gopls fixes 2024-04-24 17:58:17 -07:00
use.go fix lint issues after update 2023-10-19 12:31:24 +02:00
util.go vendor: github.com/docker/docker and github.com/docker/cli v26.0.0 2024-04-01 13:05:55 -05:00
version.go lint: gopls fixes 2024-04-24 17:58:17 -07:00