diff --git a/cmd/itemDeactivate.go b/cmd/deactivate.go similarity index 68% rename from cmd/itemDeactivate.go rename to cmd/deactivate.go index 16328ad..11294ef 100644 --- a/cmd/itemDeactivate.go +++ b/cmd/deactivate.go @@ -9,7 +9,7 @@ import ( "github.com/spf13/cobra" ) -var itemDeactivateCmd = &cobra.Command{ +var deactivateCmd = &cobra.Command{ Use: "deactivate --source source [--item item]", Aliases: []string{"deac"}, Short: "Deactivate items", @@ -17,20 +17,20 @@ var itemDeactivateCmd = &cobra.Command{ Deactivation is idempotent.`, Run: func(cmd *cobra.Command, args []string) { - itemDeactivate(stringArg(cmd, "source"), stringArg(cmd, "item")) + deactivate(stringArg(cmd, "source"), stringArg(cmd, "item")) }, DisableFlagsInUseLine: true, } func init() { - rootCmd.AddCommand(itemDeactivateCmd) + rootCmd.AddCommand(deactivateCmd) - itemDeactivateCmd.Flags().StringP("source", "s", "", "Source of the item") - itemDeactivateCmd.MarkFlagRequired("source") - itemDeactivateCmd.Flags().StringP("item", "i", "", "Item id") + deactivateCmd.Flags().StringP("source", "s", "", "Source of the item") + deactivateCmd.MarkFlagRequired("source") + deactivateCmd.Flags().StringP("item", "i", "", "Item id") } -func itemDeactivate(source string, item string) { +func deactivate(source string, item string) { if source == "" { log.Fatal("error: --source is empty") }