-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
cmd/go: go.mod file got overridden after go build #32332
Comments
the |
If you do not wish to for your
You can also use vendored deps, by using the
|
Thanks, but why the versions of other packages are not changed? Build changes only the line with gocloak.
|
On possible reason could be because you have
to
This is documented here: |
Why build doesn't override the |
Update your
May I recommend opening a help topic in the golang forums?, it seems like this is not an issue with the go project. I'll follow up there when time permitting, the forums can be located here: |
I think the reason this is happening is because https://github.com/Nerzal/gocloak/blob/v2.0.1/go.mod#L1 I'd suggest opening an issue on that repository. #31543 and other issues cover making this a bit clearer. (See "Factor 2" section in #31543 for a bit more). |
This is a new requirement, so in order to facilitate backwards compatibility with repos that already had The I think we can close this issue in favor of #31543. |
Guys, thank you so much for the help, it's little bit unclear |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I'm trying to add gocloak module to mine as a dependency but something strange happens. Can you please explain to me what I'm doing wrong and why this is the result?
add the import in my go file like this
import "github.com/Nerzal/gocloak"
add this to my go.mod file
require github.com/Nerzal/gocloak v2.0.0
I build with go build and my go.mod file got overridden like this
require github.com/Nerzal/gocloak v0.0.0-20190525151100-dfd1e50572f8
What did you expect to see?
require github.com/Nerzal/gocloak v2.0.0
What did you see instead?
require github.com/Nerzal/gocloak v0.0.0-20190525151100-dfd1e50572f8
The text was updated successfully, but these errors were encountered: