-
Notifications
You must be signed in to change notification settings - Fork 131
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
Wrong module path in go.mod #115
Comments
I'm not quite sure how to fix this (go modules are somewhat new to me). I want to avoid copying everything in a new |
If you are referring to this https://blog.golang.org/v2-go-modules#TOC_4. I don't believe this is the suggested way of doing it. I have never seen a project with a v2 directory. I believe just appending /v2 to the URL in your go.mod should do it. Examples: |
Also replacing |
Thank you both! @gudvinr You mean replacing the import path in every single file that uses it? What do you both think about just using versions like |
That's correct
If v2 contains breaking changes, it'll break working code for v1 users after update. It should be safe to do so if it's not. In theory you only need to replace import path in the library itself. Right now v2 can only be fetched either for users who use older Go version or if person manages to get code from master branch. If v2 contains backward incompatible changes it is not unnecessary work though and should be quite trivial to do from any text editor |
Well technically v2 contains breaking changes against v1, but those changes were already a few years old at that point. I will merge #116 though. |
@Philipp15b Hey, any word on merging this in? |
Merged it now, thanks for the reminder. |
@Philipp15b I also suggest you to add retraction for It will instruct go tools to avoid |
@gudvinr Thanks for the pointer. I have just released https://github.com/Philipp15b/go-steam/releases/tag/v2.0.1. Hopefully everything finally works as intended. |
pkg.go.dev now showing correct version:
|
As per documention:
Since go-steam has
go.mod
file at git tagv2.0.0
it must havemodule github.com/Philipp15b/go-steam/v2
ingo.mod
and notmodule github.com/Philipp15b/go-steam
.Because of that it cannot be shown in htttps://pkg.go.dev/ for example.
The text was updated successfully, but these errors were encountered: