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-square10fedilinkarrow-up118arrow-down10
arrow-up118arrow-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-square10fedilink
minus-squarefoehammer@programming.devlinkfedilinkEnglisharrow-up3·1 year agoSome aspects of that repo are actually language features, such as the pkg and internal directories.
minus-squareCodeBlooded@programming.devlinkfedilinkEnglisharrow-up2·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-up1·1 year agoThe language feature is the internal/ directory, and it’s function of restricting dependencies from external programs.
minus-squareCodeBlooded@programming.devlinkfedilinkEnglisharrow-up2·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.
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.