mirror of
https://github.com/spf13/cobra
synced 2024-11-24 22:57:12 +00:00
update user_guide
initialize -^> reset
This commit is contained in:
parent
fbdc1d8295
commit
a2edfa4d9a
1 changed files with 1 additions and 1 deletions
|
@ -534,7 +534,7 @@ around it. In fact, you can provide your own if you want.
|
||||||
|
|
||||||
Cobra supports grouping of available commands in the help output. To group commands, each group must be explicitly
|
Cobra supports grouping of available commands in the help output. To group commands, each group must be explicitly
|
||||||
defined using `AddGroup()` on the parent command. Then a subcommand can be added to a group using the `GroupID` element
|
defined using `AddGroup()` on the parent command. Then a subcommand can be added to a group using the `GroupID` element
|
||||||
of that subcommand. `RemoveGroup()` can be used to remove groups and initialize the GroupID of commands belonging to the removed group. The groups will appear in the help output in the same order as they are defined using different
|
of that subcommand. `RemoveGroup()` can be used to remove groups and reset the GroupID of commands belonging to the removed group. The groups will appear in the help output in the same order as they are defined using different
|
||||||
calls to `AddGroup()`. If you use the generated `help` or `completion` commands, you can set their group ids using
|
calls to `AddGroup()`. If you use the generated `help` or `completion` commands, you can set their group ids using
|
||||||
`SetHelpCommandGroupId()` and `SetCompletionCommandGroupId()` on the root command, respectively.
|
`SetHelpCommandGroupId()` and `SetCompletionCommandGroupId()` on the root command, respectively.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue