Skip to content

Commit

Permalink
change(remove-tags): rename keep-empty to keep-empty-array
Browse files Browse the repository at this point in the history
  • Loading branch information
Tieske committed Jun 26, 2023
1 parent a8b95e9 commit 4b5d45f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/removetags.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ func executeRemoveTags(cmd *cobra.Command, tagsToRemove []string) error {

var keepEmptyArrays bool
{
keepEmptyArrays, err = cmd.Flags().GetBool("keep-empty")
keepEmptyArrays, err = cmd.Flags().GetBool("keep-empty-array")
if err != nil {
return fmt.Errorf("failed getting cli argument 'keep-array'; %w", err)
return fmt.Errorf("failed getting cli argument 'keep-empty-array'; %w", err)
}
}

Expand Down Expand Up @@ -93,7 +93,7 @@ func executeRemoveTags(cmd *cobra.Command, tagsToRemove []string) error {
trackInfo["input"] = inputFilename
trackInfo["output"] = outputFilename
trackInfo["tags"] = tagsToRemove
trackInfo["keep-empty"] = keepEmptyArrays
trackInfo["keep-empty-array"] = keepEmptyArrays
trackInfo["selectors"] = selectors
deckformat.HistoryAppend(data, trackInfo)

Expand All @@ -118,7 +118,7 @@ If no selectors are given, all Kong entities will be selected.`,

func init() {
rootCmd.AddCommand(RemoveTagsCmd)
RemoveTagsCmd.Flags().Bool("keep-empty", false, "keep empty tag-arrays in output")
RemoveTagsCmd.Flags().Bool("keep-empty-array", false, "keep empty tag-arrays in output")
RemoveTagsCmd.Flags().Bool("keep-only", false, "setting this flag will remove all tags except the ones listed\n"+
"(if none are listed, all tags will be removed)")
RemoveTagsCmd.Flags().StringP("state", "s", "-", "decK file to process. Use - to read from stdin")
Expand Down

0 comments on commit 4b5d45f

Please sign in to comment.