找到反射获取数组每一项数据类型的方法

This commit is contained in:
2025-02-08 21:27:40 +08:00
parent fce39068ca
commit 81975350c1
4 changed files with 24 additions and 11 deletions

View File

@ -197,10 +197,10 @@ func (g *Generate) AddComponentsSchema(pkgPath string, inputType reflect.Type) {
return
}
// 数组
if inputType.Kind() == reflect.Slice {
if inputType.Kind() == reflect.Slice || inputType.Kind() == reflect.Array {
inputType.Comparable()
}
// 结构体
if inputType.Kind() == reflect.Struct {
}
}