Notes on applying "The Clean Architecture" in Go
Having had an appetite for experimenting with a REST API in Go, my research indicated that Robert "Uncle Bob" Martin's Clean Architecture is something like the "architecture of choice" among Gophers. However, I have found that there is a lack of good resources out there for applying it in Go. So here is my attempt to fill that gap...
Note: I am not an Architect, and I've only applied this pattern on one application - so please take everything I'm about to say with a big pinch of salt.
You can find the example REST API I implemented here
So, what is this "Clean Architecture" thing anyway?
How do I know where to put my Code?
How do I structure my packages?
The "Wire" Package/Layer
JSON struct tags
I found The Clean Architecture to work very well for a REST API, and for Go. It takes a fair bit of time to set up, but what you are left with is a very modular and easy to change structure. I will definitely use it for my web apps GOing forward. ;)