mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 14:20:54 +00:00
fix: re-parse config in windows
This commit is contained in:
parent
1c434dc6f4
commit
7aa307bd24
3
beego.go
3
beego.go
@ -3,6 +3,7 @@ package beego
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"path"
|
"path"
|
||||||
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/astaxie/beego/middleware"
|
"github.com/astaxie/beego/middleware"
|
||||||
@ -68,7 +69,7 @@ func InsertFilter(pattern string, pos int, filter FilterFunc) *App {
|
|||||||
|
|
||||||
func Run() {
|
func Run() {
|
||||||
// if AppConfigPath not In the conf/app.conf reParse config
|
// if AppConfigPath not In the conf/app.conf reParse config
|
||||||
if AppConfigPath != path.Join(AppPath, "conf", "app.conf") {
|
if AppConfigPath != filepath.Join(AppPath, "conf", "app.conf") {
|
||||||
err := ParseConfig()
|
err := ParseConfig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// configuration is critical to app, panic here if parse failed
|
// configuration is critical to app, panic here if parse failed
|
||||||
|
Loading…
Reference in New Issue
Block a user