描述解析支持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" TagValidate = "validate"
TagErr = "err" TagErr = "err"
TagMsg = "msg" TagMsg = "msg"
TagDc = "dc"
TagDesc = "desc" TagDesc = "desc"
TagDescription = "description" TagDescription = "description"
TagD = "d" TagD = "d"

View File

@ -50,7 +50,7 @@ func (psf parseStructFieldTag) GetParamName(structField reflect.StructField) str
// //
// Date : 22:01 2025/2/11 // Date : 22:01 2025/2/11
func (psf parseStructFieldTag) GetParamDesc(structField reflect.StructField) string { 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 { for _, tag := range descTagList {
tagVal := structField.Tag.Get(tag) tagVal := structField.Tag.Get(tag)
if tagVal != "" { if tagVal != "" {