Source code layout #6
iliafrenkel
started this conversation in
General
Replies: 1 comment 2 replies
-
|
I've had a long look at your source code. I think the layout is just fine. I personally only include a I'd probably recommend moving static assets out of the src/ folder (which I believe you did after writing this). |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Apparently, organising your code in Go is a bit of a problem. The language and its tool-chain doesn't enforce or even suggest a way to layout your code.
I've read this article by Ben Jonson that gives good advice on how to layout the packages in your project. And I watched a very useful presentation from GopherCon UK 2018: Kat Zien - How do you structure your Go apps?. Below you can see what I think is a good layout for this project (some directories may not exist yet, and I omitted some files for brevity):
Notes:
I will appreciate any feedback, applause or otherwise 😉
Beta Was this translation helpful? Give feedback.
All reactions