优化any -> string
This commit is contained in:
parent
1dd7ccf026
commit
a427bc63c5
3
any.go
3
any.go
@ -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 任意类型转为对象
|
||||
|
Loading…
Reference in New Issue
Block a user