Skip to content
This repository was archived by the owner on Sep 21, 2022. It is now read-only.

Commit 274aca0

Browse files
authored
fix bug with r.Options.Config
r.Options.Config always nil. https://github.com/gernest/utron/blob/master/router/routes.go#L362
1 parent 90d9e38 commit 274aca0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/app.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ func (a *App) init() error {
103103
if err != nil {
104104
return err
105105
}
106+
a.Config = appConfig
106107

107108
views, err := view.NewSimpleView(appConfig.ViewsDir)
108109
if err != nil {
@@ -128,8 +129,7 @@ func (a *App) init() error {
128129
}
129130

130131
a.Router.Options = a.options()
131-
a.Router.LoadRoutes(a.ConfigPath) // Load a routes file if available.
132-
a.Config = appConfig
132+
a.Router.LoadRoutes(a.ConfigPath) // Load a routes file if available.
133133
a.isInit = true
134134

135135
// In case the StaticDir is specified in the Config file, register

0 commit comments

Comments
 (0)