pillow@programming.dev to Golang@programming.devEnglish · 1 year agoIs there a repository of best practices when it comes to Go? (project/file structure, decoupling)message-squaremessage-square9fedilinkarrow-up15arrow-down10
arrow-up15arrow-down1message-squareIs there a repository of best practices when it comes to Go? (project/file structure, decoupling)pillow@programming.dev to Golang@programming.devEnglish · 1 year agomessage-square9fedilink
minus-squareCodeBlooded@programming.devlinkfedilinkEnglisharrow-up1·edit-21 year agoApparently 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…
minus-squarefoehammer@programming.devlinkfedilinkEnglisharrow-up1·1 year agoSome aspects of that repo are actually language features, such as the pkg and internal directories.
minus-squareCodeBlooded@programming.devlinkfedilinkEnglisharrow-up1·1 year agopkg/ isn’t a language feature. It’s just a popular convention that used to be used in the Go standard library.
minus-squarefoehammer@programming.devlinkfedilinkEnglisharrow-up0·1 year agoThe language feature is the internal/ directory, and it’s function of restricting dependencies from external programs.
minus-squareCodeBlooded@programming.devlinkfedilinkEnglisharrow-up1·1 year agoThat 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.
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.