Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: no way to `go get` source code for editing in module mode #31529
What version of Go are you using (
There is currently some question as to what to do about
Yep, that behavior is expected and intended. We want the choice to use an unreleased version (when released alternatives exist) to be explicit.
You can always
Generally we're trying to move the
The alternative for developers is to run
(See also #18387.)
changed the title
cmd/go: There appears to be no way to `go get` source code while honoring go.mod
Apr 19, 2019
Thanks @bcmills for taking a quick look at this.
(Sorry for the close+open earlier; my trackpad sometimes does phantom clicks.)
I had always viewed
But now with GO111MODULE=on, and with Go 1.13, I will need to view it almost solely as a dependency manager. (This is a significant change that I think is not obvious.)
I agree it seems like a good idea to not get pre-releases by default... just makes the transition awkward since our beta release is the first to try using modules.
@thepudds gave this 5-star explanation in Slack:
So now I think I have something I can tell the community, many of whom are currently having trouble building Caddy from source:
Thank you for the help, coming to understand this.
I'll leave the issue open since being able to consolidate those steps into one command (like it has always been before) would be convenient, especially if one (like me!
One last question: in the future, GOPATH is still where module dependencies will be stored (read-only); will it still be recommended and good practice to store working copies of repos in GOPATH? I ask because I really like its structure, but if it messes with go tooling + modules, I should try to avoid that...
@bcmills can you explain in more details why was this behavior changed?
I really liked the simple instructions to build a binary
didn't need to think what is my PWD and didn't need to create all parent folders etc.