-
Notifications
You must be signed in to change notification settings - Fork 18k
proposal: cmd/go: rename go mod init to go init #26801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Have you seen @bcmills' answer - #26581 (comment) ? |
@agnivade I had not but I've read that thread now. I don't think any of the other sub-sub-commands necessarily need moving. They'd be nice to move, especially @rajender made the same suggestion in #26581 (comment) as I am here, rename |
Once developing Go outside of GOPATH becomes common for new projects, I think it much more likely that they will just write out "module path/name" in go.mod. |
@gopherbot, please add label modules |
In general the I realize that there is |
Going to close this issue for now. It does seem to me that as we come to understand modules better over the next few releases, we may decide they are so central to the use of the go command to merit elevation to 'go init'. But the moment it would at least be premature. |
What version of Go are you using (
go version
)?Proposal
In the latest version of
go mod
that's available ontip
,go mod -init
has becomego mod init
. I propose that the concept of initializing a module be so core to developing in go, and something so core and critical to developing a new package, that it should be onlygo init
.Why
One of the goals that has been expressed for versioning in Go, is for it to be a part of using the go tool without needing to learn an extra tool. For general day-to-day development the engineer shouldn't need to research up on what
go mod
,vgo
, ormodules
are. When I write new Go code I want to initialize my folder so it has what I need to get going with a new package. Ideally running something likego init
does that, without me needing to learn what the concept ofmod
is, until such time as it's relevant to me.The text was updated successfully, but these errors were encountered: