Merge duplicated attr/secret/kv flag handling into one function (#2720)
This commit is contained in:
1 parent
1596b02e53
commit
5353725278
6 files changed
+154
-133
No files matched your search
@@ -96,7 +96,15 @@ func (c *PluginCommand) Flags() *base.FlagSets {
|
||||
common.PopulateCommonFlags(c.Command, f, "plugin-type host set", flagsPluginMap, c.Func)
|
||||
|
||||
f = set.NewFlagSet("Attribute Options")
|
||||
common.PopulateAttributeFlags(c.Command, f, flagsPluginMap, c.Func)
|
||||
attrsInput := common.CombinedSliceFlagValuePopulationInput{
|
||||
FlagSet: f,
|
||||
FlagNames: flagsPluginMap[c.Func],
|
||||
FullPopulationFlag: &c.FlagAttributes,
|
||||
FullPopulationInputName: "attributes",
|
||||
PiecewisePopulationFlag: &c.FlagAttrs,
|
||||
PiecewisePopulationInputBaseName: "attr",
|
||||
}
|
||||
common.PopulateCombinedSliceFlagValue(attrsInput)
|
||||
|
||||
extraPluginFlagsFunc(c, set, f)
|
||||
|
||||
|
||||
Reference in new issue
Block a user