cli/command/service: fix API annotations for generic resource flags

These flags were added in 20a6ff32ee, and require
API version v1.32 or up, but they accidentally copied the flag-name from another
flag, so were not setting the annotation correctly.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-08-25 09:51:48 +02:00
parent abe4aa7893
commit dcc3d25dc2

View File

@ -112,9 +112,9 @@ func newUpdateCommand(dockerCLI command.Cli) *cobra.Command {
// Add needs parsing, Remove only needs the key
flags.Var(newListOptsVar(), flagGenericResourcesRemove, "Remove a Generic resource")
flags.SetAnnotation(flagHostAdd, "version", []string{"1.32"})
flags.SetAnnotation(flagGenericResourcesRemove, "version", []string{"1.32"})
flags.Var(newListOptsVarWithValidator(ValidateSingleGenericResource), flagGenericResourcesAdd, "Add a Generic resource")
flags.SetAnnotation(flagHostAdd, "version", []string{"1.32"})
flags.SetAnnotation(flagGenericResourcesAdd, "version", []string{"1.32"})
// TODO(thaJeztah): add completion for capabilities, stop-signal (currently non-exported in container package)
// _ = cmd.RegisterFlagCompletionFunc(flagCapAdd, completeLinuxCapabilityNames)