Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: go mod -sync fails although go get succeeds #26601
go version devel +5f5402b Tue Jul 24 23:54:08 2018 +0000 linux/amd64
What did you do?
I created a module, did a
Given that the
"go get" downloads and builds the packages you named, just as it always has.
"go mod -sync" makes sure that everything in the main (current) module and its dependencies is buildable.
Note that typically you shouldn't need "go get" - just add the import and run "go build".
You did not remark on the fact that x.go imports a path from github.com instead of gopkg.in. Was that intentional?
It's possible that "go get" should do more, but I am not sure how much flexibility we really have here.
Yes, you're right - I had intended to write "gopkg.in", and that explains this behaviour.
I'll close this issue as invalid. Sorry for the noise.