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-squareCodeBloodedlinkfedilinkEnglisharrow-up5·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-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.
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.