From another programming language and recently picking in GO. I'm trying to understand how do you do things let suppose i have many services and storage,handler one things i often hear is that dependencies should flow in one direction and that components should depend on interfaces rather than concrete implementations. My confusion is about wiring everything together . If i have many services,handlers storage, then should i have to dump every things in main like initiating each storage in main then passing db pool , initiating each services then passing that storage to each of them as fallows handlers. Does this is the way i have to do or what ? doesn't it will make main function large , do you do the same for production code too. I'm also curious about what architectures people actually use in production go codebase
thanks!