feat: host support domain and multiple ips
This commit is contained in:
11
common/utils/slice.go
Normal file
11
common/utils/slice.go
Normal file
@ -0,0 +1,11 @@
|
||||
package utils
|
||||
|
||||
func Filter[T comparable](tSlice []T, filter func(t T) bool) []T {
|
||||
result := make([]T, 0)
|
||||
for _, t := range tSlice {
|
||||
if filter(t) {
|
||||
result = append(result, t)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
Reference in New Issue
Block a user