From e1e2a2e421de0e3ca3a4e956f2ebd4833d71cf60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Tue, 9 Jul 2024 21:41:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=9F=BA=E7=A1=80=E7=9A=84=E6=8C=87=E9=92=88=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data_type.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/data_type.go b/data_type.go index 39b4f6c..35bbc12 100644 --- a/data_type.go +++ b/data_type.go @@ -56,6 +56,11 @@ const ( DataTypeMapStrSlice = "map[string][]any" // map -> map[string][]any DataTypeMapStrSliceWithMarshal = "map[string][]any_marshal" // map -> map[string][]any, json 序列化之后的结果 DataTypeAny = "any" // 任意类型 -> any + DataTypeStringPtr = "string_ptr" // *string, 字符串指针 + DataTypeIntPtr = "int_ptr" // *int64, int64指针 + DataTypeUintPtr = "uint_ptr" // *uint64, uint64指针 + DataTypeFloatPtr = "float_ptr" // *float64, float64指针 + DataTypeBoolPtr = "bool_ptr" // *bool, 字符串指针 ) const ( @@ -139,6 +144,13 @@ var ( getDataTypeDesc(DataTypeSliceMapStringAnyWithMarshal, "[][]map[string]any json序列化之后的结果"), getDataTypeDesc(DataTypeSliceMapAnyAny, "[]map[any]any"), getDataTypeDesc(DataTypeSliceMapAnyAnyWithMarshal, "[]map[any]any json序列化之后的结果"), + + // 基础类型的指针类型 + getDataTypeDesc(DataTypeStringPtr, "*string, 字符串指针"), + getDataTypeDesc(DataTypeUintPtr, "*int64, int64指针"), + getDataTypeDesc(DataTypeIntPtr, "*int64, *uint64, uint64指针"), + getDataTypeDesc(DataTypeFloatPtr, "*float64, float64指针"), + getDataTypeDesc(DataTypeBoolPtr, "*bool, 字符串指针"), } )