-
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
Vgo #817
Vgo #817
Conversation
I ran into what this fixes today. Upvote to anything that lets us use the Go Modules way of life, as some of my projects have been moved over by necessity and I'm missing the generator! |
@ironsalsa Yeah I think there is a lot of desire for this feature, but it's not really getting much attention from the maintainers. |
I'm actually hoping to take a look at all of the vgo PRs today.... hopefully. I know we need it. |
👍 that would be awesome @eparis thanks!! |
👍 |
@eparis were you able to review this PR? |
ping... |
@eparis So it's been a few months now, did you manage to review it? This is a high priority PR... |
I've been using my fork of this for some time just to ensure that the usage makes sense and is stable. |
Still nothing from the maintainers? This feature would be awesome :) |
🏓 |
@jharshman since it doesn't look like we're ever going to hear back from the maintainers on this - can you provide a write-up of how you got this working locally? I tried checking out your branch and doing a "go install ." but the binary doesn't recognize the new flag. I suspect I'm missing something dreadfully obvious. |
@tsal |
@spf13 ping |
Some news about that? |
I hope that the following example is useful to you: #!/bin/sh
cat > run.sh <<-EOF
apk add git
git clone -b vgo https://github.com/jharshman/cobra cobra
cd cobra/cobra
go install
cobra init --pkg-name github.com/pkg/name
EOF
$(command -v winpty) docker run --rm -it golang:alpine sh -c "$(cat run.sh)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I get a review button, I'm gonna use it.
Update Generator Docs to reflect changes brought in spf13#817
Update Generator Docs to reflect changes brought in spf13#817
Moves to resolve Issue #756
This was a re-work of the cobra code generator to allow it to work outside of the GOPATH and hence be compatible with Go modules (vgo) introduced in Go 1.11. This change introduces a new flag to the
init
command and deprecates the--package
flag from theadd
command. With all these changes the flows remains relatively the same. Any exceptions are outlined below.Changes
--pkg-name
flag to the init command which takes a string representing the package name.e.g:
--pkg-name github.com/spf14/hugo