From cf60a3f463e041b9b1461b8d2512861f0a0cfac7 Mon Sep 17 00:00:00 2001 From: astaxie Date: Thu, 11 Apr 2013 11:07:32 +0800 Subject: [PATCH] warn views can't find when runmode is dev --- beego.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/beego.go b/beego.go index 3349587f..abcdf823 100644 --- a/beego.go +++ b/beego.go @@ -52,7 +52,7 @@ func init() { HttpAddr = "" HttpPort = 8080 AppName = "beego" - RunMode = "prod" //default runmod + RunMode = "dev" //default runmod AutoRender = true RecoverPanic = true PprofOn = false @@ -80,7 +80,7 @@ func init() { if runmode := AppConfig.String("runmode"); runmode != "" { RunMode = runmode } else { - RunMode = "prod" + RunMode = "dev" } if ar, err := AppConfig.Bool("autorender"); err != nil { AutoRender = true @@ -245,7 +245,9 @@ func Run() { } err := BuildTemplate(ViewsPath) if err != nil { - Warn(err) + if RunMode == "dev" { + Warn(err) + } } BeeApp.Run() }