Browse Source

1

herolist
dengbiao 1 week ago
parent
commit
1c6039ac71
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/utils/convert.go

+ 2
- 2
app/utils/convert.go View File

@@ -151,7 +151,7 @@ func interfaceSliceToJSONStyleString(slice []interface{}) string {
case string:
//// 对字符串进行转义并加上双引号
//elements = append(elements, fmt.Sprintf("%q", value))
// TODO::对字符串进行转义并加上双引号
// TODO::只加上双引号,不进行转义
elements = append(elements, `"`+value+`"`)
case bool:
// 直接转换为字符串
@@ -169,7 +169,7 @@ func interfaceSliceToJSONStyleString(slice []interface{}) string {
}

// 使用方括号包裹,并用逗号分隔各个元素
return "[" + strings.Join(elements, ", ") + "]"
return "[" + strings.Join(elements, ",") + "]"
}

func AnyToFloat64(raw interface{}) float64 {


Loading…
Cancel
Save