cobra init --pkg-name demo
Error: unknown flag: --pkg-name
Usage:
cobra init [path] [flags]
Aliases:
init, initialize, initialise, create
Flags:
-h, --help help for init
Global Flags:
-a, --author string author name for copyright attribution (default "YOUR NAME")
--config string config file (default is $HOME/.cobra.yaml)
-l, --license string name of license for the project
--viper use Viper for configuration
It shows me this issue. How do i solve this?
You might be using an old version?
Try
cobra init demo
See here and here for more details