1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-13 17:22:27 +08:00

feat: add FlattenDeep func

This commit is contained in:
dudaodong
2022-01-01 18:14:35 +08:00
parent b42aac53b3
commit 042a00296f
3 changed files with 53 additions and 7 deletions

View File

@@ -52,3 +52,14 @@ func checkSliceCallbackFuncSignature(fn reflect.Value, types ...reflect.Type) bo
}
return true
}
// sliceElemType get slice element type
func sliceElemType(reflectType reflect.Type) reflect.Type {
for {
if reflectType.Kind() != reflect.Slice {
return reflectType
}
reflectType = reflectType.Elem()
}
}