pgolang·Golangbypillow Is there a repository of best practices when it comes to Go? (project/file structure, decoupling)View original on programming.dev18Comments10
CodeBlooded programming.dev4Hide 4 repliesApparently this repo is NOT any sort of standard, yet a lot of people are fooled to believe that based on the repo’s account name and the project’s name. I see this mentioned whenever this is asked… just an FYI…5
ffoehammer replyprogramming.dev3Hide 3 repliesSome aspects of that repo are actually language features, such as the pkg and internal directories.3
CodeBlooded replyprogramming.dev2Hide 2 repliespkg/ isn't a language feature. It's just a popular convention that used to be used in the Go standard library.2
ffoehammer replyprogramming.dev1Hide 1 replyThe language feature is the internal/ directory, and it's function of restricting dependencies from external programs.1
CodeBlooded replyprogramming.devThat is correct, internal/ is a feature. I was just clarifying that the pkg/ folder isn’t any sort of language feature as you had said it was.2
aaustin programming.devNot quite what you’re looking for, but Google does have an official style guide which may be slightly helpful5
Oliver Lowe lemmy.sdf.orgI often point to Upspin as it's a real-world Go project by folks closely related to the Go project (including Rob Pike).1
23Ro programming.devThe folks over at changelog have made a quite nice podcast episode about it on gotime: https://changelog.com/gotime/278 I found the conversation to be quite insightful.1
Apparently this repo is NOT any sort of standard, yet a lot of people are fooled to believe that based on the repo’s account name and the project’s name. I see this mentioned whenever this is asked… just an FYI…
Some aspects of that repo are actually language features, such as the pkg and internal directories.
pkg/isn't a language feature. It's just a popular convention that used to be used in the Go standard library.The language feature is the
internal/directory, and it's function of restricting dependencies from external programs.That is correct,
internal/is a feature. I was just clarifying that thepkg/folder isn’t any sort of language feature as you had said it was.Not quite what you’re looking for, but Google does have an official style guide which may be slightly helpful
I often point to Upspin as it's a real-world Go project by folks closely related to the Go project (including Rob Pike).
The folks over at changelog have made a quite nice podcast episode about it on gotime: https://changelog.com/gotime/278
I found the conversation to be quite insightful.