Skip to content

Commit dcc3d25

Browse files
committed
cli/command/service: fix API annotations for generic resource flags
These flags were added in 20a6ff3, 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 <[email protected]>
1 parent abe4aa7 commit dcc3d25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cli/command/service/update.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ func newUpdateCommand(dockerCLI command.Cli) *cobra.Command {
112112

113113
// Add needs parsing, Remove only needs the key
114114
flags.Var(newListOptsVar(), flagGenericResourcesRemove, "Remove a Generic resource")
115-
flags.SetAnnotation(flagHostAdd, "version", []string{"1.32"})
115+
flags.SetAnnotation(flagGenericResourcesRemove, "version", []string{"1.32"})
116116
flags.Var(newListOptsVarWithValidator(ValidateSingleGenericResource), flagGenericResourcesAdd, "Add a Generic resource")
117-
flags.SetAnnotation(flagHostAdd, "version", []string{"1.32"})
117+
flags.SetAnnotation(flagGenericResourcesAdd, "version", []string{"1.32"})
118118

119119
// TODO(thaJeztah): add completion for capabilities, stop-signal (currently non-exported in container package)
120120
// _ = cmd.RegisterFlagCompletionFunc(flagCapAdd, completeLinuxCapabilityNames)

0 commit comments

Comments
 (0)