feat: merge v3dev into main

This commit is contained in:
Gordon
2023-07-12 15:12:23 +08:00
123 changed files with 7377 additions and 10288 deletions
+12
View File
@@ -543,3 +543,15 @@ func Batch[T any, V any](fn func(T) V, ts []T) []V {
}
return res
}
func InitSlice[T any](val *[]T) {
if val != nil && *val == nil {
*val = []T{}
}
}
func InitMap[K comparable, V any](val *map[K]V) {
if val != nil && *val == nil {
*val = map[K]V{}
}
}