diff options
author | Michael Muré <batolettre@gmail.com> | 2020-07-28 20:24:24 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2020-07-28 20:24:24 +0200 |
commit | ae5c0967cec40a7dcf9804ff592a4d15f1b26569 (patch) | |
tree | 7c1ba7626fd8158be030876d44ba55daf465d694 /commands/label_add.go | |
parent | 51c887ff9dd4f2a5f65d2d3de57f8a7729b1010d (diff) | |
download | git-bug-ae5c0967cec40a7dcf9804ff592a4d15f1b26569.tar.gz |
commands: cleanup the command's usage to avoid warnings when generating the doc
Diffstat (limited to 'commands/label_add.go')
-rw-r--r-- | commands/label_add.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/commands/label_add.go b/commands/label_add.go index 05a27948..ce971f04 100644 --- a/commands/label_add.go +++ b/commands/label_add.go @@ -3,14 +3,14 @@ package commands import ( "github.com/spf13/cobra" - "github.com/MichaelMure/git-bug/commands/select" + _select "github.com/MichaelMure/git-bug/commands/select" ) func newLabelAddCommand() *cobra.Command { env := newEnv() cmd := &cobra.Command{ - Use: "add [<id>] <label>[...]", + Use: "add [ID] LABEL...", Short: "Add a label to a bug.", PreRunE: loadBackendEnsureUser(env), PostRunE: closeBackend(env), @@ -28,7 +28,9 @@ func runLabelAdd(env *Env, args []string) error { return err } - changes, _, err := b.ChangeLabels(args, nil) + added := args + + changes, _, err := b.ChangeLabels(added, nil) for _, change := range changes { env.out.Println(change) |