From 424976201a4bd4a14825e5c943a34451f547d3fc Mon Sep 17 00:00:00 2001 From: sunqida Date: Thu, 18 Aug 2016 22:46:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9query=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E3=80=81=E6=97=B6=E9=97=B4=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E3=80=82=E5=A6=82=EF=BC=9Aquery=3DxxTime.lt:2016-01-01T23:22:2?= =?UTF-8?q?1+08:00?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- g_controllers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g_controllers.go b/g_controllers.go index 412abd9..79ed554 100644 --- a/g_controllers.go +++ b/g_controllers.go @@ -255,7 +255,7 @@ func (c *{{controllerName}}Controller) GetAll() { // query: k:v,k:v if v := c.GetString("query"); v != "" { for _, cond := range strings.Split(v, ",") { - kv := strings.Split(cond, ":") + kv := strings.SplitN(cond, ":", 2) if len(kv) != 2 { c.Data["json"] = errors.New("Error: invalid query key/value pair") c.ServeJSON()