()
| 94 | } |
| 95 | |
| 96 | func newHabitUncompleteCommand() *habitUncompleteCommand { |
| 97 | habitUncompleteCommand := &habitUncompleteCommand{} |
| 98 | habitUncompleteCommand.cmd = &cobra.Command{ |
| 99 | Use: "uncomplete <id>", |
| 100 | Short: "Remove a habit completion for a date", |
| 101 | Example: ` hey habit uncomplete 789 |
| 102 | hey habit uncomplete 789 --date 2024-01-15`, |
| 103 | RunE: habitUncompleteCommand.run, |
| 104 | Args: usageExactOneArg(), |
| 105 | } |
| 106 | |
| 107 | habitUncompleteCommand.cmd.Flags().StringVar(&habitUncompleteCommand.date, "date", "", "Date (YYYY-MM-DD, default: today)") |
| 108 | |
| 109 | return habitUncompleteCommand |
| 110 | } |
| 111 | |
| 112 | func (c *habitUncompleteCommand) run(cmd *cobra.Command, args []string) error { |
| 113 | if err := requireAuth(); err != nil { |
no test coverage detected