buildx/util
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
..
buildflags build: set default call method name to build 2024-06-03 10:42:35 -07:00
cobrautil commands: add an alias for --check to be the same as --call=check 2024-06-03 13:25:21 -05:00
confutil build: set record provenance in response 2024-04-11 10:11:27 +02:00
desktop build: missing newline when printing build details on error 2023-06-30 13:48:02 +02:00
dockerutil build: sublogger to show docker load progress output 2023-09-12 22:24:29 +02:00
gitutil lint: gopls fixes 2024-04-24 17:58:17 -07:00
imagetools Slightly refactored the mediaType check on single source so that now we return original bytes without filtering on mediaType, based on the preferIndex preference. 2024-05-29 14:20:53 -04:00
ioset lint: gopls fixes 2024-04-24 17:58:17 -07:00
logutil logutil: print error from WithError if found 2023-05-30 10:00:24 +01:00
metricutil vendor: update buildx to latest docker/cli 2024-05-16 12:07:13 -05:00
osutil metrics: add build command duration metric 2024-02-14 15:58:52 -06:00
platformutil separate manual and automatically detected platforms 2020-04-24 20:08:43 -07:00
progress metrics: record the number of times lint rules are triggered during a build 2024-05-30 15:05:00 -05:00
resolver allow multi-node push and imagetools to use custom registry config 2021-11-04 10:02:12 -07:00
tracing vendor: update buildkit to v0.14.0-rc1 2024-05-31 16:23:41 -05:00
userfunc Dockerfile: update golangci-lint to 1.48.0 (go 1.19 support) 2022-08-11 02:10:33 +02:00
waitmap util: add waitmap for target synchronization 2022-01-27 18:46:12 -08:00