Live data from Hacker News

Go Modules Cheat Sheet

encore.dev

1–10 of 52 posts

Re: Go Modules Cheat Sheet

#4
post #3
post #2

Ahhhh.... relief. The Go docs are vague on day-today tasks like this. Also how were those nifty arrows done?

vague? https://github.com/golang/go/wiki/Modules#daily-workflow

But I am millennial. I do not have time to read any document. There must be a way to just know about this or any other thing without ever learning about it.

Re: Go Modules Cheat Sheet

#5
post #4
post #3

Earlier quoted context omitted.

vague? https://github.com/golang/go/wiki/Modules#daily-workflow

But I am millennial. I do not have time to read any document. There must be a way to just know about this or any other thing without ever learning about it.

Arguably updating packages could be a bit more obvious than

  go get (-d) -u ./... && go mod tidy

Re: Go Modules Cheat Sheet

#7
post #4

Earlier quoted context omitted.

But I am millennial. I do not have time to read any document. There must be a way to just know about this or any other thing without ever learning about it.

Arguably updating packages could be a bit more obvious than go get (-d) -u ./... && go mod tidy

In 99% of cases you only need

    go get -u

Re: Go Modules Cheat Sheet

#10

Question: Why is go so integrated(?) with github? I mean, why can't I (or can I?) go get from my own personal gitlab server?

You can. If you have a `.git` in your import path, it should just work OOTB, using Git as expected. Otherwise, whatever code hosting service has to implement support for returning a proprietary meta tag when serving a ?go-get=1 query - and Gitlab already does that, IIRC.

https://golang.org/cmd/go/#hdr-Remote_import_paths

Post reply on HN