| 1 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 2 | |
| 3 | package main |
| 4 | |
| 5 | import ( |
| 6 | "fmt" |
| 7 | |
| 8 | "github.com/spf13/cobra" |
| 9 | ) |
| 10 | |
| 11 | // stubCmd returns a placeholder cobra command for subcommands scheduled in |
| 12 | // later sprints. The sprint identifier is surfaced in the error so an |
| 13 | // operator who hits the stub knows which sprint adds the implementation. |
| 14 | func stubCmd(name, short, sprint string) *cobra.Command { |
| 15 | return &cobra.Command{ |
| 16 | Use: name, |
| 17 | Short: fmt.Sprintf("%s (planned in %s)", short, sprint), |
| 18 | RunE: func(cmd *cobra.Command, args []string) error { |
| 19 | return fmt.Errorf("%s: not yet implemented (planned in sprint %s)", name, sprint) |
| 20 | }, |
| 21 | } |
| 22 | } |
| 23 |