How to avoid circular dependency in golang projects
Dec 10, 2023
Sometimes we encounter circular dependency in your project. Reason for this dependency hell is unclear structure. To avoid circular dependency , follow a linear structure.
Steps to avoid the circular dependency
1.A function should do only one thing and do it well
2. Architecture based clarity.
Some hint about project structure:
- models : The database layer to get and set data from database.