Earlier quoted context omitted.
You can put your project in ~/work/my-go-project but then symlink it to ~/go/src/github.com/joshklien/my-go-project (assuming your $GOPATH is ~/go). But yes, with modules you don't need to do this anymore. go mod init github.com/joshklien/my-go-project
Where in your gopath are you supposed to put your source code if you never intend to upload it? All gopath tutorials I see say to put your github in the path like you did, and never say what to do if its not public.
Using Go Modules
121–124 of 124 posts
Re: Using Go Modules
#122Earlier quoted context omitted.
we should form a club or something. we’ll call it the gopher 8th light seekers and drink sparkling water + bitch about go while the rest invent the future. in go :)
hah. What kind of future are you talking about? :P It still seems that Java and C# and python are dominant in their respective areas, and golang being relegated to devops stuff, those guys can deal with all the shortcomings of the language because they don't know better, but at least it's not infiltrating other areas. Ironic that the golang authors wrote it as a C++ replacement and it completely flopped there, just s…
Re: Using Go Modules
#123Google API's latest semantic version is behind the doc site (godoc.org/google.golang.org/api). Is this standard practice in Go? I was coincidentally converting my Go project to use Go modules yesterday. I depended on a Google API which was originally retrieved via 'Go get', corresponded to docs and worked fine as this pulled from HEAD. `go mod` did not work out of the box, as it required the latest semantic version (…
Ah. The trick is to substitute in the go.mod file's require block.: s/$SEMANTIC_VERSION_BRANCH/$BRANCH In this case, $BRANCH == 'master'. 'go build' will resolve 'master' to a specific commit hash version.
Re: Using Go Modules
#124How do you reference local go modules that are under development? The equivalent in node is `npm link`.