优化any -> string

This commit is contained in:
zhangdeman committed 2023-12-06 21:32:22 +08:00
1 parent 1dd7ccf026
commit a427bc63c5
1 file changed
+2 -1
+2 -1
View File
@@ -8,6 +8,7 @@
package wrapper
import (
"fmt"
"git.zhangdeman.cn/zhangdeman/serialize"
"reflect"
)
@@ -96,7 +97,7 @@ func (at *AnyType) ToString() String {
case DataTypePtr:
return String(serialize.JSON.MarshalForString(at.data))
}
return String("")
return String(fmt.Sprintf("%v", at.data))
}
// ToObject 任意类型转为对象
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.