Architecture with golang

I will create a structure with golang artificial intelligence and which architecture should I use for this project layout

Use the project layout that suits your app best.

Really, there are no fixed rules about a Go project layout, only some best practices that have accumulated over the years.

By “project layout”, I’m assuming you’re talking about the directory structure.
AFAIK, there is no standard directory structure in Go other than a single directory translates into a single package and translate into a single compilation unit (not 100% true, though).
When you’re not sure you are building, my advice is just do it whatever you want first. For me, when I don’t know what I’m doing, I will put everything in a single package in the root project directory. Later, when the project grows, I’ll see the pattern. Which part coupled with which part, and start refactoring from there. But, if I already know what I’m doing, I can foresee what are the components I need and create a good project layout from the beginning.

If you’re asking for suggested directory/package structure, I’d suggest to start reading this

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.