Hacker News new | ask | show | jobs
by sjroot 1356 days ago
Why is this published in a GitHub org called "golang-standards"?

As someone who has worked with Go for years in a professional capacity, more than half of these folders are not necessary or convention in any sense. They usually introduce complexity into a language and ecosystem that tries very hard to prevent it.

Folks reading this without Go experience, really the only ones that are important are "internal" and "vendor" folders. The former cannot be imported into consuming packages, and the latter is the output of "go mod vendor" (commonly required in corporate environments). "pkg" is also mostly a convention because of projects like Kubernetes, but is not idiomatic either. (A Git repository itself represents a Go package or collection of packages based on the presence of a go.mod or go.work file)

1 comments

Assume you know about this https://github.com/golang-standards/project-layout/issues/11...

We could ignore this repo and construct our own project structure based on our requirements.

The fact that the organization name and this repository hasn't been updated to reflect the discussion in that thread is telling. The author must just want to be able to add "created standard Go project layout used by X developers and companies" to their resume.