cobra: Cannot init on new module
I’m not sure what I’m doing wrong here.
I’ve installed cobra via: go install github.com/spf13/cobra/cobra
Now, when I run a cobra init, anywhere I get just
Error: exit status 1
I don’t even see where logs are going, or how I can try and debug this. Really, this error code isn’t giving me much at all to go off.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 17 (2 by maintainers)
I solved it by these steps:
go mod tidyandgo mod vendorcobra-cli initcobra-cli initmust be run inside of a directory with an existinggo.mod. Try runninggo mod init <MODNAME>first and thencobra-cli init.Facing the same issue. go1.19.1