-
Notifications
You must be signed in to change notification settings - Fork 994
Go Modules support #301
Comments
I would love this as well, but given this library is on v3.2.0 I think there would need to be changes to adhere to the Semantic versioning rules of modules. I think a new package needs to be created in order to adhere to these rules, so that we're importing "github.com/dgrijalva/jwt-go/v3" instead of "github.com/dgrijalva/jwt-go" as we do today. I could be wrong about this... From https://github.com/golang/go/wiki/Modules#semantic-import-versioning
|
@dgrijalva any plans to do this? I think the community would love it. Here are some duplicates: Also as an example looks like @vladimiroff already did something like this in his fork: |
Now that the community seems to have landed on go mod, I think it's time to add support. I don't believe we can do so in a backwards compatible way, so this will land in v4. |
This is landed on v4 branch |
Is there a way to use it v4? I couldn't find a release... |
Hi @omerlh - there is a v4 release and it has a go.mod file here. Hope this helps! |
Sorry, I'm pretty new to go - when trying to run |
No worries @omerlh - I have to run out for a bit, but check out https://blog.golang.org/using-go-modules and the section "Adding a dependency on a new major version". I haven't actually done this yet with jwt-go myself, but believe if you add an import like import jwtv4 "github.com/dgrijalva/jwt-go/v4" and then switch a piece of your code to use jwtv4 and it should automatically go grab the v4 branch... It's that /v4 at the end of the import path that's important |
The v4 branch will undergo a few more changes before it's signed off. See the milestone for the list of remaining tickets. |
Thanks I'll try it out! |
thank you so much. I spent one day for this issue until I saw you answer! :D |
Is there a plan to include go modules support?
I wouldn't mind making a pull request, looks like the project would just need to include a go.mod and go.sum file.
The text was updated successfully, but these errors were encountered: