Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • I don't think your file structure should have a significant effect on your architecture. You can separate concerns perfectly well no matter where you files are placed on disk, and you can convert to microservices no matter where your files are placed on disk. Commented Oct 4, 2020 at 18:56
  • @PhilipKendall In theory yes, but because Go heavily emphasizes packages I'm not sure if this correct as each folder is a package. Packages influence the scope of different structs and functions. I'm asking for a Go idiomatic Clean Code architecture, not just a normal Clean architecture. Commented Oct 4, 2020 at 19:13
  • File and folder structure is largely a matter of taste. Architectures are generally unaffected by it. Commented Oct 4, 2020 at 20:36
  • @RobertHarvey Isn't the file structure a big aspect of the architecture itself ? In "The principles of clean architecture", Uncle Bob states "this is a rails app because of the file structure [...] why does the file structure tell me what the framework this application is using, why doesn't it tell me what the application does ?". Commented Oct 4, 2020 at 20:39
  • 1
    @Steve: I think the point is that the folder structure doesn't inform the architecture, except in the sense that (if you choose to do so), you pick a folder structure that tracks with the architectural structure for convenience reasons. Commented Oct 4, 2020 at 21:24