| 17 | all bool |
| 18 | } |
| 19 | |
| 20 | func newBoxListCommand() *boxesCommand { |
| 21 | command := newBoxesListingCommand("list", ` hey box list |
| 22 | hey box list --limit 5 |
| 23 | hey box list --json`) |
| 24 | command.cmd.Args = cobra.NoArgs |
| 25 | return command |
| 26 | } |
| 27 | |
| 28 | func newBoxesListingCommand(use, example string) *boxesCommand { |
| 29 | command := &boxesCommand{} |
| 30 | command.cmd = &cobra.Command{ |
| 31 | Use: use, |
| 32 | Short: "List your HEY boxes", |
| 33 | Annotations: map[string]string{ |
| 34 | "agent_notes": "Returns all mailbox types. Use --ids-only to pipe IDs to hey box view.", |
| 35 | }, |
| 36 | Example: example, |
| 37 | RunE: command.run, |
| 38 | } |
| 39 | |
| 40 | command.cmd.Flags().IntVar(&command.limit, "limit", 0, "Maximum number of boxes to show") |