Question: Not grabbing latest changes
jackiereh opened this issue · 5 comments
I've cleared out my entire modcache trying to solve this problem. Whenever I do a go build
, it gets the pkg but when actually building it, it complains it can't find the new method.
pkg/server/server.go:153:5: lmt.SetOverrideDefaultResponseWriter undefined (type *limiter.Limiter has no field or method SetOverrideDefaultResponseWriter)
When I go into the cache it doesn't look to have the newest changes.
I've also tried to do a go get -u github.com/didip/tollbooth@master
and a few other's like this with the commit hash.
All result is something like the following:
go get github.com/didip/tollbooth@master: github.com/didip/tollbooth@v1.0.1-0.20201003170357-36f42d50610c: invalid version: go.mod has post-v1 module path "github.com/didip/tollbooth/v6" at revision 36f42d50610c
I'm not crazy familiar with tagging, but could this have something to do with the releases, and the new changes not being in any of the new releases?
I wanted to know if this was something I was doing incorrectly from my side, that I could fix?
Thank you in advance.
damn it, I keep forgetting to create a new tag.
v6.0.2 is published. You should be able to fetch your changes now.
Hey @didip, one last question.
When I do try to pull this down, it seems to always put me back to version 4.0.2.
I've cleared my modcache, and have tried a few things like the following to fix it, but for some reason it won't grab 6.0.2.
go get -u github.com/didip/tollbooth@v6.0.2
returned back : go get github.com/didip/tollbooth@v6.0.2: github.com/didip/tollbooth@v6.0.2: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v6
I don't know if the mod file needs to be updated? Or if this is something I'm doing wrong...?
I think your go.mod version has to be specifically updated to use tollbooth v6.
This is probably my fault for not having done this before... but I solved it by adding the version to the actual files I was using it in.
"github.com/didip/tollbooth/v6"
"github.com/didip/tollbooth/v6/limiter"
I had original tried to do anything and everything including manually putting it in go.mod, but nothing was working.
But specifying it in the actual .go files I used it in, did the trick.