描述解析支持dc标签,适配gf框架风格习惯

This commit is contained in:
白茶清欢 2025-02-18 14:56:18 +08:00
parent db15e16f99
commit 8cd00367e4
2 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@ const (
TagValidate = "validate"
TagErr = "err"
TagMsg = "msg"
TagDc = "dc"
TagDesc = "desc"
TagDescription = "description"
TagD = "d"

View File

@ -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 != "" {