This commit is contained in:
兔子
2023-08-26 17:36:50 +08:00
parent c088498118
commit 062b2bb768
24 changed files with 294 additions and 448 deletions

View File

@@ -46,7 +46,7 @@ func ArrayUnique[T any](array []T) (slice []any) {
// ArrayEmpty - 数组去空
func ArrayEmpty[T any](array []T) (slice []any) {
for _, item := range array {
if !IsEmpty(item) {
if !Is.Empty(item) {
slice = append(slice, item)
}
}
@@ -59,7 +59,7 @@ func ArrayMapWithField(array []map[string]any, field any) (slice []any) {
// 获取字段
keys := cast.ToStringSlice(Unity.Keys(field))
if IsEmpty(keys) {
if Is.Empty(keys) {
return cast.ToSlice(array)
}