提交 56ad5bd9 authored 作者: gukai's avatar gukai

签名去除空格

上级 49499ac9
...@@ -12,6 +12,7 @@ import ( ...@@ -12,6 +12,7 @@ import (
"github.com/gogf/gf/text/gregex" "github.com/gogf/gf/text/gregex"
"github.com/gogf/gf/util/gconv" "github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/util/grand" "github.com/gogf/gf/util/grand"
"regexp"
"sort" "sort"
"strings" "strings"
) )
...@@ -80,7 +81,8 @@ func (c *Config) Sign(ctx context.Context, pubilcParams PubilcParams, params g.M ...@@ -80,7 +81,8 @@ func (c *Config) Sign(ctx context.Context, pubilcParams PubilcParams, params g.M
allMaps["secret"] = secret allMaps["secret"] = secret
for k, v := range params { for k, v := range params {
allMaps[k] = gconv.String(v) re3, _ := regexp.Compile(`\s`)
allMaps[k] = re3.ReplaceAllString(gconv.String(v), "")
} }
keys := make([]string, 0) keys := make([]string, 0)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论