()
| 286 | } |
| 287 | |
| 288 | func newTodoDeleteCommand() *todoDeleteCommand { |
| 289 | todoDeleteCommand := &todoDeleteCommand{} |
| 290 | todoDeleteCommand.cmd = &cobra.Command{ |
| 291 | Use: "delete <id>", |
| 292 | Short: "Delete a todo", |
| 293 | Example: ` hey todo delete 456`, |
| 294 | RunE: todoDeleteCommand.run, |
| 295 | Args: usageExactOneArg(), |
| 296 | } |
| 297 | |
| 298 | return todoDeleteCommand |
| 299 | } |
| 300 | |
| 301 | func (c *todoDeleteCommand) run(cmd *cobra.Command, args []string) error { |
| 302 | if err := requireAuth(); err != nil { |
no test coverage detected