Skip to content
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

cmd/go: go new/init <goproj> command to build go project template #33865

Closed
changrui opened this issue Aug 27, 2019 · 1 comment
Closed

cmd/go: go new/init <goproj> command to build go project template #33865

changrui opened this issue Aug 27, 2019 · 1 comment

Comments

@changrui
Copy link

What version of Go are you using (go version)?

$ go version
go 1.12.9

Does this issue reproduce with the latest release?

No.

What operating system and processor architecture are you using (go env)?

Windows 10

go env Output
$ go env

What did you do?

What did you expect to see?

A new project directory is build.
mkdir -p /{src/main.go, mod/{mymod1.go, mymod2.go}, .github, readme.md,...}

What did you see instead?

No.

@bcmills bcmills changed the title Why hasn't go new/init <goproj> command to build go project template? cmd/go: go new/init <goproj> command to build go project template Aug 27, 2019
@bcmills
Copy link
Contributor

bcmills commented Aug 27, 2019

There is in general no requirement for a readme.md or other dotfiles for a Go package, and unlike some other package systems there is no particular Go convention of splitting files into src/ and lib/ or mod/ subdirectories.

(Some projects do choose to put binaries in a cmd/ subdirectory, but even that convention often depends on whether there are also public-facing libraries within the module.)

In general go mod init should be enough to get you to a minimal workspace, and from there it's up to you to decide which files to create.

@bcmills bcmills closed this as completed Aug 27, 2019
@golang golang locked and limited conversation to collaborators Aug 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants