commit | 80cf8b726b885556f959ae547e4b770bd7356107 | [log] [tgz] |
---|---|---|
author | champly <champly@outlook.com> | Tue May 19 11:29:30 2020 +0800 |
committer | champly <champly@outlook.com> | Tue May 19 11:29:30 2020 +0800 |
tree | bc61996b824a6fe6776055662a4ef53132fa6c1e | |
parent | 62debf01640d37f9250211f34c886842a3955f79 [diff] |
fix get attachment lost nil key
diff --git a/request.go b/request.go index 807f73f..9518045 100644 --- a/request.go +++ b/request.go
@@ -23,9 +23,7 @@ "strconv" "strings" "time" -) -import ( perrors "github.com/pkg/errors" ) @@ -337,6 +335,11 @@ dest := make(map[string]string) for k, v := range origin { if kv, ok := k.(string); ok { + if v == nil { + dest[kv] = "" + continue + } + if vv, ok := v.(string); ok { dest[kv] = vv }