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:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user