From 91423fb146e0310e2a0ae2028a4f8434dbcd1e4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Mon, 25 Nov 2024 14:25:26 +0800 Subject: [PATCH] =?UTF-8?q?data=20type=E4=BD=BF=E7=94=A8=E6=9E=9A=E4=B8=BE?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- any.go | 5 +++-- go.mod | 4 ++-- go.sum | 4 ++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/any.go b/any.go index a74a343..bf035f4 100644 --- a/any.go +++ b/any.go @@ -10,6 +10,7 @@ package wrapper import ( "fmt" "git.zhangdeman.cn/zhangdeman/consts" + "git.zhangdeman.cn/zhangdeman/consts/enums" "git.zhangdeman.cn/zhangdeman/serialize" "reflect" ) @@ -34,7 +35,7 @@ func AnyDataType(data any) *AnyType { // Date : 18:19 2023/6/1 type AnyType struct { data any - dataType string + dataType enums.DataType } // IsNil 是否为 nil @@ -62,7 +63,7 @@ func (at *AnyType) IsNil() bool { // Author : go_developer@163.com<白茶清欢> // // Date : 18:22 2023/6/1 -func (at *AnyType) Type() string { +func (at *AnyType) Type() enums.DataType { if len(at.dataType) > 0 { // 已经处理过的,无需在处理 return at.dataType diff --git a/go.mod b/go.mod index 09a75e0..711bdba 100644 --- a/go.mod +++ b/go.mod @@ -5,9 +5,9 @@ go 1.21 toolchain go1.21.4 require ( - git.zhangdeman.cn/zhangdeman/consts v0.0.0-20241104082108-0f97a870bbc3 + git.zhangdeman.cn/zhangdeman/consts v0.0.0-20241125061350-1f5050978fc3 git.zhangdeman.cn/zhangdeman/op_type v0.0.0-20240122104027-4928421213c0 - git.zhangdeman.cn/zhangdeman/serialize v0.0.0-20241104092308-ecb02113459e + git.zhangdeman.cn/zhangdeman/serialize v0.0.0-20241108082010-42ae8fe5ebdc git.zhangdeman.cn/zhangdeman/util v0.0.0-20240618042405-6ee2c904644e github.com/axgle/mahonia v0.0.0-20180208002826-3358181d7394 github.com/mitchellh/mapstructure v1.5.0 diff --git a/go.sum b/go.sum index ff67559..11a0fbf 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,13 @@ git.zhangdeman.cn/zhangdeman/consts v0.0.0-20241104082108-0f97a870bbc3 h1:BiAlBJ+DuRs/xD7nDQD2JT8Oc+V+0Uwt36qZwdXGvzI= git.zhangdeman.cn/zhangdeman/consts v0.0.0-20241104082108-0f97a870bbc3/go.mod h1:IXXaZkb7vGzGnGM5RRWrASAuwrVSNxuoe0DmeXx5g6k= +git.zhangdeman.cn/zhangdeman/consts v0.0.0-20241125061350-1f5050978fc3 h1:/40XIygeSxRhPQc3/7pKGpV5hg8jwrMwh1+YiyCHdNI= +git.zhangdeman.cn/zhangdeman/consts v0.0.0-20241125061350-1f5050978fc3/go.mod h1:IXXaZkb7vGzGnGM5RRWrASAuwrVSNxuoe0DmeXx5g6k= git.zhangdeman.cn/zhangdeman/op_type v0.0.0-20240122104027-4928421213c0 h1:gUDlQMuJ4xNfP2Abl1Msmpa3fASLWYkNlqDFF/6GN0Y= git.zhangdeman.cn/zhangdeman/op_type v0.0.0-20240122104027-4928421213c0/go.mod h1:VHb9qmhaPDAQDcS6vUiDCamYjZ4R5lD1XtVsh55KsMI= git.zhangdeman.cn/zhangdeman/serialize v0.0.0-20241104092308-ecb02113459e h1:A045F67AMSqFKGD9kk2uLa+6c/zpmW8vjjSRmSsdjPs= git.zhangdeman.cn/zhangdeman/serialize v0.0.0-20241104092308-ecb02113459e/go.mod h1:XqgER4jDYwskFgj2riJ9XptIjzgYWubY+Zq8iB2WkY0= +git.zhangdeman.cn/zhangdeman/serialize v0.0.0-20241108082010-42ae8fe5ebdc h1:jtdEMr/xNchJDEoCnvMr4JXT9+biYQu625Cj+dz025w= +git.zhangdeman.cn/zhangdeman/serialize v0.0.0-20241108082010-42ae8fe5ebdc/go.mod h1:XqgER4jDYwskFgj2riJ9XptIjzgYWubY+Zq8iB2WkY0= git.zhangdeman.cn/zhangdeman/util v0.0.0-20240618042405-6ee2c904644e h1:Q973S6CcWr1ICZhFI1STFOJ+KUImCl2BaIXm6YppBqI= git.zhangdeman.cn/zhangdeman/util v0.0.0-20240618042405-6ee2c904644e/go.mod h1:VpPjBlwz8U+OxZuxzHQBv1aEEZ3pStH6bZvT21ADEbI= github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0=