描述解析支持dc标签,适配gf框架风格习惯
This commit is contained in:
parent
db15e16f99
commit
8cd00367e4
@ -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"
|
||||||
|
@ -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 != "" {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user