Closed RohitRox closed 5 years ago
You should add github.com/gbrlsnchs/jwt/v2
(with the suffix) to your go.mod
file, since it's in v2
already. If you don't, I think you have to specify a v1
version (github.com/gbrlsnchs/jwt@v1.1.0
), otherwise go mod
tries to fetch the most recent commit, which has a /v2
suffix in its go.mod
, thus breaking.
Edit: Actually, when the version is not specified, go mod
tries to fetch the commit pointed by the latest tag, in this case, it's v2.0.0
, which points to commit 808efa0714ba
, in which the module is already declared with a /v2
suffix. That's why I think you need to specify a v1
tag in this case (github.com/gbrlsnchs/jwt@v1.1.0
) or use v2
as github.com/gbrlsnchs/jwt/v2
, what will pull the latest tag, which coincides with being v2.0.0
.
I see what you mean. Thank you for explaining.
Adding
gbrlsnchs/jwt
to ago.mod
file and runninggo mod download
is giving this errorGo Version:
go1.11.4 darwin/amd64