table of contents
other versions
- buster 0.0.3-1+b10
- buster-backports 1.1.2-1~bpo10+1
- testing 1.1.2-1+b4
- unstable 1.1.2-1+b5
COBRA-ADD(1) | Cobra Manual | COBRA-ADD(1) |
NAME¶
cobra-add - Add a command to a Cobra ApplicationSYNOPSIS¶
cobra add [OPTIONS]DESCRIPTION¶
Add (cobra add) will create a new command, with a license and the appropriate structure for a Cobra-based CLI application, and register it to its parent (default RootCmd).If you want your command to be public, pass in the command name with an initial uppercase letter.
Example: cobra add server -> resulting in a new cmd/server.go
OPTIONS¶
-p, --parent="RootCmd" name of parent command for this commandOPTIONS INHERITED FROM PARENT COMMANDS¶
-a, --author="YOUR NAME" Author name for copyright attribution--config="" config file (default is $HOME/.cobra.yaml)
-l, --license="" Name of license for the project (can provide licensetext in config)
-b, --projectbase="" base project directory, e.g. github.com/spf13/
--viper[=true] Use Viper for configuration
SEE ALSO¶
cobra(1)Dec 2015 | github.com/spf13/cobra |