MapResponse optimalisations, peer list integration tests (#1254)
Co-authored-by: Allen <979347228@qq.com>
This commit is contained in:
parent
bb786ac8e4
commit
a5562850a7
7 changed files with 362 additions and 85 deletions
10
utils.go
10
utils.go
|
@ -269,16 +269,6 @@ func stringToIPPrefix(prefixes []string) ([]netip.Prefix, error) {
|
|||
return result, nil
|
||||
}
|
||||
|
||||
func containsStr(ts []string, t string) bool {
|
||||
for _, v := range ts {
|
||||
if v == t {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func contains[T string | netip.Prefix](ts []T, t T) bool {
|
||||
for _, v := range ts {
|
||||
if reflect.DeepEqual(v, t) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue