mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 20:10:56 +00:00
improve parseconfig
This commit is contained in:
parent
c048efbbf8
commit
581bb65bbc
12
beego.go
12
beego.go
@ -180,10 +180,12 @@ func FilterPrefixPath(path string, filter http.HandlerFunc) *App {
|
||||
}
|
||||
|
||||
func Run() {
|
||||
err := ParseConfig()
|
||||
if err != nil {
|
||||
if RunMode == "dev" {
|
||||
Warn(err)
|
||||
if AppConfigPath != path.Join(AppPath, "conf", "app.conf") {
|
||||
err := ParseConfig()
|
||||
if err != nil {
|
||||
if RunMode == "dev" {
|
||||
Warn(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
if PprofOn {
|
||||
@ -194,7 +196,7 @@ func Run() {
|
||||
GlobalSessions, _ = session.NewManager(SessionProvider, SessionName, SessionGCMaxLifetime, SessionSavePath)
|
||||
go GlobalSessions.GC()
|
||||
}
|
||||
err = BuildTemplate(ViewsPath)
|
||||
err := BuildTemplate(ViewsPath)
|
||||
if err != nil {
|
||||
if RunMode == "dev" {
|
||||
Warn(err)
|
||||
|
Loading…
Reference in New Issue
Block a user