aboutsummaryrefslogtreecommitdiffstats
path: root/commands/rm.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/rm.go')
-rw-r--r--commands/rm.go43
1 files changed, 0 insertions, 43 deletions
diff --git a/commands/rm.go b/commands/rm.go
deleted file mode 100644
index 2e1d924d..00000000
--- a/commands/rm.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package commands
-
-import (
- "errors"
-
- "github.com/spf13/cobra"
-)
-
-func newRmCommand() *cobra.Command {
- env := newEnv()
-
- cmd := &cobra.Command{
- Use: "rm ID",
- Short: "Remove an existing bug.",
- Long: "Remove an existing bug in the local repository. Note removing bugs that were imported from bridges will not remove the bug on the remote, and will only remove the local copy of the bug.",
- PreRunE: loadBackendEnsureUser(env),
- RunE: closeBackend(env, func(cmd *cobra.Command, args []string) error {
- return runRm(env, args)
- }),
- ValidArgsFunction: completeBug(env),
- }
-
- flags := cmd.Flags()
- flags.SortFlags = false
-
- return cmd
-}
-
-func runRm(env *Env, args []string) (err error) {
- if len(args) == 0 {
- return errors.New("you must provide a bug prefix to remove")
- }
-
- err = env.backend.RemoveBug(args[0])
-
- if err != nil {
- return
- }
-
- env.out.Printf("bug %s removed\n", args[0])
-
- return
-}