MCPcopy Create free account
hub / github.com/basecamp/hey-cli / newHabitUncompleteCommand

Function newHabitUncompleteCommand

internal/cmd/habit.go:96–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94}
95
96func 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
112func (c *habitUncompleteCommand) run(cmd *cobra.Command, args []string) error {
113 if err := requireAuth(); err != nil {

Callers 1

newHabitCommandFunction · 0.85

Calls 1

usageExactOneArgFunction · 0.85

Tested by

no test coverage detected