fix: re-parse config in windows
Showing
1 changed file
with
2 additions
and
1 deletions
| ... | @@ -3,6 +3,7 @@ package beego | ... | @@ -3,6 +3,7 @@ package beego |
| 3 | import ( | 3 | import ( |
| 4 | "net/http" | 4 | "net/http" |
| 5 | "path" | 5 | "path" |
| 6 | "path/filepath" | ||
| 6 | "strings" | 7 | "strings" |
| 7 | 8 | ||
| 8 | "github.com/astaxie/beego/middleware" | 9 | "github.com/astaxie/beego/middleware" |
| ... | @@ -68,7 +69,7 @@ func InsertFilter(pattern string, pos int, filter FilterFunc) *App { | ... | @@ -68,7 +69,7 @@ func InsertFilter(pattern string, pos int, filter FilterFunc) *App { |
| 68 | 69 | ||
| 69 | func Run() { | 70 | func Run() { |
| 70 | // if AppConfigPath not In the conf/app.conf reParse config | 71 | // if AppConfigPath not In the conf/app.conf reParse config |
| 71 | if AppConfigPath != path.Join(AppPath, "conf", "app.conf") { | 72 | if AppConfigPath != filepath.Join(AppPath, "conf", "app.conf") { |
| 72 | err := ParseConfig() | 73 | err := ParseConfig() |
| 73 | if err != nil { | 74 | if err != nil { |
| 74 | // configuration is critical to app, panic here if parse failed | 75 | // configuration is critical to app, panic here if parse failed | ... | ... |
-
Please register or sign in to post a comment