From 8cd00367e4b0d9375a8159c3b2e9473d14adf3d7 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, 18 Feb 2025 14:56:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=8F=E8=BF=B0=E8=A7=A3=E6=9E=90=E6=94=AF?= =?UTF-8?q?=E6=8C=81dc=E6=A0=87=E7=AD=BE,=E9=80=82=E9=85=8Dgf=E6=A1=86?= =?UTF-8?q?=E6=9E=B6=E9=A3=8E=E6=A0=BC=E4=B9=A0=E6=83=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- define/tag.go | 1 + struct_field.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/define/tag.go b/define/tag.go index 060295c..d8463e3 100644 --- a/define/tag.go +++ b/define/tag.go @@ -17,6 +17,7 @@ const ( TagValidate = "validate" TagErr = "err" TagMsg = "msg" + TagDc = "dc" TagDesc = "desc" TagDescription = "description" TagD = "d" diff --git a/struct_field.go b/struct_field.go index f7f3561..ceac038 100644 --- a/struct_field.go +++ b/struct_field.go @@ -50,7 +50,7 @@ func (psf parseStructFieldTag) GetParamName(structField reflect.StructField) str // // Date : 22:01 2025/2/11 func (psf parseStructFieldTag) GetParamDesc(structField reflect.StructField) string { - descTagList := []string{define.TagDesc, define.TagDescription} + descTagList := []string{define.TagDc, define.TagDesc, define.TagDescription} for _, tag := range descTagList { tagVal := structField.Tag.Get(tag) if tagVal != "" {