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

Function newTodoListCommand

internal/cmd/todo.go:43–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41}
42
43func newTodoListCommand() *todoListCommand {
44 todoListCommand := &todoListCommand{}
45 todoListCommand.cmd = &cobra.Command{
46 Use: "list",
47 Short: "List todos",
48 Example: ` hey todo list
49 hey todo list --limit 10
50 hey todo list --json`,
51 RunE: todoListCommand.run,
52 }
53
54 todoListCommand.cmd.Flags().IntVar(&todoListCommand.limit, "limit", 0, "Maximum number of todos to show")
55 todoListCommand.cmd.Flags().BoolVar(&todoListCommand.all, "all", false, "Fetch all results (override --limit)")
56
57 return todoListCommand
58}
59
60func (c *todoListCommand) run(cmd *cobra.Command, args []string) error {
61 if err := requireAuth(); err != nil {

Callers 1

newTodoCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected