From 2f75445520d55cbb11862372086ff51e3913574c Mon Sep 17 00:00:00 2001 From: astaxie Date: Sun, 10 Nov 2013 23:42:07 +0800 Subject: [PATCH] when runmode is dev it will show warning ingo if have a attack url, the info is --- router.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/router.go b/router.go index f2cf53b0..3a8cb4e6 100644 --- a/router.go +++ b/router.go @@ -461,7 +461,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) file := staticDir + r.URL.Path[len(prefix):] finfo, err := os.Stat(file) if err != nil { - Warn(err) + if RunMode == "dev" { + Warn(err) + } http.NotFound(w, r) return }