Go-clean-template is a Golang template project based on Robert

Go-clean-template: Clean Architecture template for Golang services

submited by
Style Pass
2021-07-13 10:00:07

Go-clean-template is a Golang template project based on Robert "Uncle Bob" Martin’s Clean Architecture principles, ready for you to clone and use as a starting point for your next Golang app.

The Clean Architecture is a way of arranging complex — or potentially-complex — systems which, like most good sets of architectural principles, promotes a strict separation of concerns.

That is, software is broken down into independent functional components which interface with one another only through well-defined and reliable means, with only the state and resources which need to be exchanged in order to perform the task at hand passed between them.

A strict separation of concerns can help minimise the complexity of each component, reducing the likelihood of bugs being introduced, and making them easier to fix when they do arise — provided the offending component can be readily identified. A separation of concerns is key to adhering to the least privilege security principle.

This is all in contrast to monolithic software, where all of the code for the system is in effect bundled together and given access to all of the same resources with equal privilege, and so properly-functioning monolithic systems ultimately rely upon people not making mistakes (which, inevitably, they do).

Leave a Comment