aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-09-16 14:29:14 +0200
committerMichael Muré <batolettre@gmail.com>2018-09-16 14:29:14 +0200
commitdad61892cea320cd28c23c73fdf65a90404c6099 (patch)
treeda964d3af2001027ef880d93cf5914ecd40984e8 /commands
parenta846fb96de587afdd9b3ea37bdb9731d77e44863 (diff)
downloadgit-bug-dad61892cea320cd28c23c73fdf65a90404c6099.tar.gz
commands: migrate the open/close commands under the "status" command
Diffstat (limited to 'commands')
-rw-r--r--commands/status_close.go (renamed from commands/close.go)6
-rw-r--r--commands/status_open.go (renamed from commands/open.go)6
2 files changed, 6 insertions, 6 deletions
diff --git a/commands/close.go b/commands/status_close.go
index 890702dd..55e47c22 100644
--- a/commands/close.go
+++ b/commands/status_close.go
@@ -7,7 +7,7 @@ import (
"github.com/spf13/cobra"
)
-func runCloseBug(cmd *cobra.Command, args []string) error {
+func runStatusClose(cmd *cobra.Command, args []string) error {
if len(args) > 1 {
return errors.New("Only closing one bug at a time is supported")
}
@@ -40,9 +40,9 @@ func runCloseBug(cmd *cobra.Command, args []string) error {
var closeCmd = &cobra.Command{
Use: "close <id>",
Short: "Mark the bug as closed",
- RunE: runCloseBug,
+ RunE: runStatusClose,
}
func init() {
- RootCmd.AddCommand(closeCmd)
+ statusCmd.AddCommand(closeCmd)
}
diff --git a/commands/open.go b/commands/status_open.go
index db6a5909..15108ddf 100644
--- a/commands/open.go
+++ b/commands/status_open.go
@@ -7,7 +7,7 @@ import (
"github.com/spf13/cobra"
)
-func runOpenBug(cmd *cobra.Command, args []string) error {
+func runStatusOpen(cmd *cobra.Command, args []string) error {
if len(args) > 1 {
return errors.New("Only opening one bug at a time is supported")
}
@@ -40,9 +40,9 @@ func runOpenBug(cmd *cobra.Command, args []string) error {
var openCmd = &cobra.Command{
Use: "open <id>",
Short: "Mark the bug as open",
- RunE: runOpenBug,
+ RunE: runStatusOpen,
}
func init() {
- RootCmd.AddCommand(openCmd)
+ statusCmd.AddCommand(openCmd)
}