调整struct
This commit is contained in:
14
struct.go
14
struct.go
@@ -1,4 +1,4 @@
|
||||
// Package util...
|
||||
// Package util ...
|
||||
//
|
||||
// Description : util ...
|
||||
//
|
||||
@@ -9,12 +9,20 @@ package util
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// StructToMap 结构体转为map
|
||||
// ownStruct ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 15:19 2022/5/14
|
||||
type ownStruct struct {
|
||||
}
|
||||
|
||||
// ToMap 结构体转为map
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 11:12 下午 2021/3/14
|
||||
func StructToMap(data interface{}) (map[string]interface{}, error) {
|
||||
func (os *ownStruct) ToMap(data interface{}) (map[string]interface{}, error) {
|
||||
var (
|
||||
byteData []byte
|
||||
err error
|
||||
|
||||
Reference in New Issue
Block a user