Skip to content

Commit

Permalink
fix: change flag name
Browse files Browse the repository at this point in the history
Signed-off-by: Alessio Greggi <[email protected]>
  • Loading branch information
alegrey91 committed Mar 20, 2024
1 parent 05f5e5e commit 5e24edc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ var deleteCmd = &cobra.Command{
func init() {
rootCmd.AddCommand(deleteCmd)

deleteCmd.Flags().IntVarP(&ruleId, "id", "n", 0, "delete rule through number")
deleteCmd.Flags().StringVarP(&file, "file", "f", "rules.yml", "delete rule through rules file")
deleteCmd.Flags().BoolP("all", "a", false, "delete rule through rules file")
deleteCmd.MarkFlagsMutuallyExclusive("id", "file")
deleteCmd.Flags().IntVarP(&ruleId, "id", "n", 0, "delete rules through ID")
deleteCmd.Flags().StringVarP(&file, "file", "f", "rules.yml", "delete rules through file")
deleteCmd.Flags().BoolP("all", "a", false, "delete all rules")
deleteCmd.MarkFlagsMutuallyExclusive("id", "file", "all")
}

func deleteFromFile(file string) {
Expand Down

0 comments on commit 5e24edc

Please sign in to comment.