Refactor handlers into separate packages and implement dependency injection.
IDK if this shit is good or even logical, but it works and I can wrap my head around it.
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
package internal
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"gorm.io/gorm"
|
||||
// "github.com/gin-gonic/gin"
|
||||
// "gorm.io/gorm"
|
||||
)
|
||||
|
||||
type AppWebContext struct {
|
||||
Db *gorm.DB
|
||||
GinEngine *gin.Engine
|
||||
|
||||
}
|
||||
// type AppWebContext struct {
|
||||
// Db *gorm.DB
|
||||
// GinEngine *gin.Engine
|
||||
// }
|
Reference in New Issue
Block a user