ExperimentalCommand creates an experimental command that is hidden and has the given subcommands.
(subcommands []*serpent.Command)
| 181 | // ExperimentalCommand creates an experimental command that is hidden and has |
| 182 | // the given subcommands. |
| 183 | func ExperimentalCommand(subcommands []*serpent.Command) *serpent.Command { |
| 184 | cmd := &serpent.Command{ |
| 185 | Use: "exp", |
| 186 | Short: "Internal commands for testing and experimentation. These are prone to breaking changes with no notice.", |
| 187 | Handler: func(i *serpent.Invocation) error { |
| 188 | return i.Command.HelpHandler(i) |
| 189 | }, |
| 190 | Hidden: true, |
| 191 | Children: subcommands, |
| 192 | } |
| 193 | return cmd |
| 194 | } |
| 195 | |
| 196 | // RunWithSubcommands runs the root command with the given subcommands. |
| 197 | // It is abstracted to enable the Enterprise code to add commands. |