-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--pkg-name is needed? #901
Comments
Hi @pookah-net! This is being addressed in #878 nad #888. #891 is also related. To achieve the behaviour you expect, you need to use either:
or mkdir github.com/pookah-net/test
cd github.com/pookah-net/test
cobra init --pkg-name=github.com/pookah-net/test @jharshman, would |
Ah, I see! I must have used the wrong search terms, because I didn't see those others. Thanks! |
@umarcor, yes but would still require @pookah-net documentation on the cobra generator is being updated. In the meantime you can refer to the issues that @umarcor linked as well as #817 |
So, GOPATH is completely deprecated? I.e, even if |
@umarcor correct, the generator no longer cares about the GOPATH. |
@jharshman, thanks! @pookah-net, can you please close this issue? I believe that it is solved already. |
Thanks! |
you'd think a cli generator should not have issues with it's own cli :) |
Hi, I tried using the following:
cobra init github.com/pookah-net/test
, fromgo/src
, as specified in the README, to create a new Golang project using Cobra, and it kept telling meError: required flag(s) "pkg-name" not set
and giving me the help text.I finally (!) figured out that
cobra init --pkg-name github.com/pookah-net/test
was needed, instead. Is it supposed to be that way?(Oh, it didn't create the
src/github.com/pookah-net/test
folder. Instead, it createdsrc/cmd/root.go
, andsrc/main.go
andsrc/LICENSE
files and folders!)Thanks
Ian
The text was updated successfully, but these errors were encountered: