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

@changrui changrui commented Aug 27, 2019

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

This comment has been minimized.

Copy link
Member

@bcmills 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 Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.