Open l3x opened 7 years ago
I had a similar error when referencing google cloud. Now this needs to be a feature request, but Glide Cache was the issue. Some of the core golang packages do not use semantic versioning which makes it difficult for Glide to know when to update the cache. For example golang.org/x/net
is a huge culprit. Manually clear the cache for any suspect packages (let me know if there is a better way to do this -- that's the feature request - perhaps a time expiry like 2 weeks would be nice).
Anyway here is how I cleared the cache for golang.org/x/net.
rm -rf ~/.glide/cache/src/https-golang.org-x-net
. Perhaps do that for all golang and google packages.
You will have to clear those entries from your glide.lock too, and hopefully you don't have any hashes for those explicit in your glide.yaml. Hope that helps!
Looks like glide is pulling from a different repo than go get uses for the Google Cloud storage package.
Now, replace the go api folders in vendor (installed by glide) with those from go get command:
Snippet from glide.lock:
... which seem to be almost identical to files downloaded by go get -d cloud.google.com/go/storage ... but older.
FILE: go/storage/copy.go
The code with error (from google.golang.org/api):
The code without the error (from cloud.google.com/go/storage):