top | item 17737627

'Go mod download' (to cache) and 'go mod why' added

76 points| soroso | 7 years ago |golang.org

11 comments

order

chx|7 years ago

That's real funny. Remember https://twitter.com/_rsc/status/1022589123482267650 ?

> If we just put 'go dep' as the hook to current draft dep, then users would need to run things like 'go dep ensure' and so on, and those would be the first ever go sub-sub-commands. That feels not quite right to me.

lclarkmichalek|7 years ago

`go mod download` is for explicitly populating the cache. If you just run `go build`, the cache will be implicitly populated. You don't need to run `go mod download` before doing a build.

secure|7 years ago

go mod started out with a bunch of flags, and was only later converted to the current syntax: https://github.com/golang/go/commit/6121987a10b2c54bc4c48473...

From the commit message:

> We've avoided subcommands in the go command to date, and we should continue to avoid adding them unless it really makes the experience significantly better. In this case, it does.

So, I don’t see it as a contradiction to the mail you’re quoting :)

stochastic_monk|7 years ago

“go mod why” sounds shockingly close to “Oh god why”. I’d assume this is intentional, but it still strikes me as odd.

andrewchambers|7 years ago

I don't know why you would assume that at all.

frakturfreund|7 years ago

go mod why generics

(main module does not need package generics)