From a6026cc684ec30fa6002972a0784d90f75e385a4 Mon Sep 17 00:00:00 2001 From: john Date: Tue, 19 Jun 2018 10:03:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dghttp.BuildParams=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=96=B9=E6=B3=95=E6=9E=84=E9=80=A0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- g/net/ghttp/ghttp_func.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/g/net/ghttp/ghttp_func.go b/g/net/ghttp/ghttp_func.go index 1ea8402b3..6fa79afba 100644 --- a/g/net/ghttp/ghttp_func.go +++ b/g/net/ghttp/ghttp_func.go @@ -12,6 +12,9 @@ import "gitee.com/johng/gf/g/encoding/gurl" func BuildParams(params map[string]string) string { var s string for k, v := range params { + if len(s) > 0 { + s += "&" + } s += k + "=" + gurl.Encode(v) } return s