map增加toString
This commit is contained in:
11
normal.go
11
normal.go
@ -327,3 +327,14 @@ func (n *normal) ToStruct(receiver interface{}) error {
|
||||
decoder.UseNumber()
|
||||
return decoder.Decode(receiver)
|
||||
}
|
||||
|
||||
// ToString 转字符串
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 20:44 2023/8/15
|
||||
func (n *normal) ToString() string {
|
||||
mapData := n.GetAll()
|
||||
byteData, _ := json.Marshal(mapData)
|
||||
return string(byteData)
|
||||
}
|
||||
|
Reference in New Issue
Block a user