重新整理思路
# Conflicts: # srv/cmd/gatekeeper/wire.go # srv/internal/application/appliceation.go
This commit is contained in:
@@ -35,8 +35,11 @@ func (app *Application) Stop() {
|
||||
}
|
||||
}
|
||||
|
||||
func NewApplication(ct Ctrl, p *sql.DB) *Application {
|
||||
func NewApplication(cs []Ctrl, p *sql.DB) *Application {
|
||||
route := gin.Default()
|
||||
for _, ctrl := range cs {
|
||||
ctrl.RegisterRoutes(route)
|
||||
}
|
||||
srv := &http.Server{
|
||||
Addr: ":8443",
|
||||
Handler: route,
|
||||
|
||||
Reference in New Issue
Block a user