mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-05 23:07:44 +00:00
types/views: add ContainsExitRoutes to IPPrefixSlice
Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
parent
b493ef5b71
commit
c85694fac4
@ -101,6 +101,11 @@ func (v IPPrefixSlice) ContainsFunc(f func(netaddr.IPPrefix) bool) bool {
|
||||
return tsaddr.PrefixesContainsFunc(v.ж, f)
|
||||
}
|
||||
|
||||
// ContainsExitRoutes reports whether v contains ExitNode Routes.
|
||||
func (v IPPrefixSlice) ContainsExitRoutes() bool {
|
||||
return tsaddr.ContainsExitRoutes(v.ж)
|
||||
}
|
||||
|
||||
// MarshalJSON implements json.Marshaler.
|
||||
func (v IPPrefixSlice) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.ж)
|
||||
|
Loading…
x
Reference in New Issue
Block a user