Live data from Hacker News

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

golang.org

1–10 of 13 posts

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

#2
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.

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

#3
post #2

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.

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 :)

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

#8
post #2

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.

`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.

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

#9
post #2

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.

`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.

Here’s the issue it comes out of: https://github.com/golang/go/issues/26610
Post reply on HN