I want to make a web application on golang using the ozzo framework. If I break the application into some packages, how can I get access to the application settings and the connection instance to the database in these packages?
How best to store my models? In a separate package in the models folder (possibly with subfolders) using the MVC pattern, or do you make completely complete packages with database access in the packages themselves?
1. Вариант /config /controllers /models /server main.go 2. Вариант /config /packages //user //posts //others... /server main.go In the first case, the handlers are separate, the models are separate. In the second case, the packages are full. There and processing and access to the necessary data from the database.