1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-25 23:55:18 +00:00

improve parseconfig

This commit is contained in:
astaxie 2013-05-07 23:16:56 +08:00
parent c048efbbf8
commit 581bb65bbc

View File

@ -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)