From 9c665afc0437d91317f01f3568e710cbae5aa0d8 Mon Sep 17 00:00:00 2001 From: astaxie Date: Mon, 8 Dec 2014 14:57:45 +0800 Subject: [PATCH] improve the error tips --- router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router.go b/router.go index 79111226..a26a8309 100644 --- a/router.go +++ b/router.go @@ -153,7 +153,7 @@ func (p *ControllerRegistor) Add(pattern string, c ControllerInterface, mappingM if val := reflectVal.MethodByName(colon[1]); val.IsValid() { methods[strings.ToUpper(m)] = colon[1] } else { - panic(colon[1] + " method doesn't exist in the controller " + t.Name()) + panic("'" + colon[1] + "' method doesn't exist in the controller " + t.Name()) } } else { panic(v + " is an invalid method mapping. Method doesn't exist " + m)