summaryrefslogtreecommitdiffhomepage
path: root/types
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@tailscale.com>2022-12-05 18:22:53 -0800
committerBrad Fitzpatrick <brad@danga.com>2022-12-05 18:50:24 -0800
commit1598cd0361f3ca74fd052d4d804e052cb091cab9 (patch)
tree099b1722413f92b09756b052c7a50a0f7ae2848a /types
parent4b34c88426de324255f0906db8ae6ecb6da5d107 (diff)
downloadtailscale-1598cd0361f3ca74fd052d4d804e052cb091cab9.tar.xz
tailscale-1598cd0361f3ca74fd052d4d804e052cb091cab9.zip
net/tsaddr: remove ContainsFunc helpers (they're now in x/exp/slices)
x/exp/slices now has ContainsFunc (golang/go#53983) so we can delete our versions. Change-Id: I5157a403bfc1b30e243bf31c8b611da25e995078 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Diffstat (limited to 'types')
-rw-r--r--types/views/views.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/types/views/views.go b/types/views/views.go
index c8d147a3d..92d230674 100644
--- a/types/views/views.go
+++ b/types/views/views.go
@@ -11,6 +11,7 @@ import (
"errors"
"net/netip"
+ "golang.org/x/exp/slices"
"tailscale.com/net/tsaddr"
)
@@ -213,7 +214,7 @@ func (v IPPrefixSlice) ContainsIP(ip netip.Addr) bool {
// PrefixesContainsFunc reports whether f is true for any IPPrefix in the slice.
func (v IPPrefixSlice) ContainsFunc(f func(netip.Prefix) bool) bool {
- return tsaddr.PrefixesContainsFunc(v.ж.ж, f)
+ return slices.ContainsFunc(v.ж.ж, f)
}
// ContainsExitRoutes reports whether v contains ExitNode Routes.