(env *execenv.Env)
| 9 | ) |
| 10 | |
| 11 | func newBugDeselectCommand(env *execenv.Env) *cobra.Command { |
| 12 | cmd := &cobra.Command{ |
| 13 | Use: "deselect", |
| 14 | Short: "Clear the implicitly selected bug", |
| 15 | Example: `git bug select 2f15 |
| 16 | git bug comment |
| 17 | git bug status |
| 18 | git bug deselect |
| 19 | `, |
| 20 | PreRunE: execenv.LoadBackend(env), |
| 21 | RunE: execenv.CloseBackend(env, func(cmd *cobra.Command, args []string) error { |
| 22 | return runBugDeselect(env) |
| 23 | }), |
| 24 | } |
| 25 | |
| 26 | return cmd |
| 27 | } |
| 28 | |
| 29 | func runBugDeselect(env *execenv.Env) error { |
| 30 | err := _select.Clear(env.Backend, bug.Namespace) |
no test coverage detected