diff options
| author | Brad Fitzpatrick <bradfitz@tailscale.com> | 2022-12-05 18:22:53 -0800 |
|---|---|---|
| committer | Brad Fitzpatrick <brad@danga.com> | 2022-12-05 18:50:24 -0800 |
| commit | 1598cd0361f3ca74fd052d4d804e052cb091cab9 (patch) | |
| tree | 099b1722413f92b09756b052c7a50a0f7ae2848a /types | |
| parent | 4b34c88426de324255f0906db8ae6ecb6da5d107 (diff) | |
| download | tailscale-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.go | 3 |
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. |
