diff --git a/init.go b/init.go index 8572bf1..f59eee1 100644 --- a/init.go +++ b/init.go @@ -18,8 +18,6 @@ var ( JSON *ownJSON // String ... String *stringOperate - // Struct ... - Struct *ownStruct // Calculate ... Calculate *calculate // Project ... @@ -40,7 +38,6 @@ func init() { Hash = &hash{} JSON = &ownJSON{} String = &stringOperate{} - Struct = &ownStruct{} Calculate = &calculate{} Project = &project{} Array = &array{} diff --git a/struct.go b/struct.go deleted file mode 100644 index 5addc86..0000000 --- a/struct.go +++ /dev/null @@ -1,38 +0,0 @@ -// Package util ... -// -// Description : util ... -// -// Author : go_developer@163.com<白茶清欢> -// -// Date : 2021-03-14 11:11 下午 -package util - -import "encoding/json" - -// 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 (os *ownStruct) ToMap(data interface{}) (map[string]interface{}, error) { - var ( - byteData []byte - err error - result map[string]interface{} - ) - if byteData, err = json.Marshal(data); nil != err { - return nil, err - } - if err = json.Unmarshal(byteData, &result); nil != err { - return nil, err - } - return result, nil -}