pillow to GolangEnglish · 1 year agoIs there a repository of best practices when it comes to Go? (project/file structure, decoupling)message-squaremessage-square8fedilinkarrow-up119arrow-down10
arrow-up119arrow-down1message-squareIs there a repository of best practices when it comes to Go? (project/file structure, decoupling)pillow to GolangEnglish · 1 year agomessage-square8fedilink
minus-squarefoehammerlinkfedilinkEnglisharrow-up3·1 year agoSome aspects of that repo are actually language features, such as the pkg and internal directories.
minus-squareCodeBloodedlinkfedilinkEnglisharrow-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-squarefoehammerlinkfedilinkEnglisharrow-up1·1 year agoThe language feature is the internal/ directory, and it’s function of restricting dependencies from external programs.
minus-squareCodeBloodedlinkfedilinkEnglisharrow-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.