Go: cmd/go: add/provide resources to a comprehensive go modules guide

Created on 12 Mar 2019  路  4Comments  路  Source: golang/go

Pulling my effing hair out trying to sort thru the nightmare go dependencies are.

After we finally got our package working with dep.. we now have to move to go modules because dep ensure was an absolute nightmare in our CI/CD system with all the kubernetes packages.

I can't find a single example or document or blog that isn't just some simple helloworld example regurgitated from the go modules documentation.

Is there a doc or example of doing this with a complex directory structure with many go packages at varying depths?

Documentation FrozenDueToAge WaitingForInfo modules

Most helpful comment

Not some simple single directory helloworld joke?

Pulling my effing hair out trying to sort thru the nightmare go dependencies are.

If you'd like better examples and documentation, I don't think calling the current ones a joke is the way forward. Software can be frustrating, but your issues aren't going to be productive if they read like rants.

Having said that, there are plenty of real-world examples out there to look at, such as:

https://github.com/gohugoio/hugo
https://github.com/golang/tools
https://github.com/etcd-io/etcd
https://github.com/prometheus/prometheus
https://github.com/junegunn/fzf

All 4 comments

Hi.

Somewhat related: #28215 (website: Update "How to Write Go Code" with go modules). It's targeted Go1.13, since it's when modules will be on by default.

Since it's possible that something like what you're requesting here could be written as part of a doc fix for that issue, you could also give your feedback (i.e. vocalize your request for a more detailed, real-world example of modules use) in that thread.

Not some simple single directory helloworld joke?

Pulling my effing hair out trying to sort thru the nightmare go dependencies are.

If you'd like better examples and documentation, I don't think calling the current ones a joke is the way forward. Software can be frustrating, but your issues aren't going to be productive if they read like rants.

Having said that, there are plenty of real-world examples out there to look at, such as:

https://github.com/gohugoio/hugo
https://github.com/golang/tools
https://github.com/etcd-io/etcd
https://github.com/prometheus/prometheus
https://github.com/junegunn/fzf

Does that above examples give you what you need ?

Regarding documentation, the modules wiki is a pretty comprehensive and up-to-date doc. If you have any specific suggestions, please redirect them to https://github.com/golang/go/issues/28215 or feel free to update the wiki itself.

Hello @rhugga, hope that @mvdan and @agnivade's references were able to get you using go modules alright.
Thank you @mvdan and @agnivade for those guides and for your patience.

@rhugga given that this issue has had prescriptive responses and references, I shall close it.

Was this page helpful?
0 / 5 - 0 ratings