types/views: add generic Slice[T] and remove StringSlice

Also make IPPrefixSliceOf use Slice[netaddr.IPPrefix] as it also
provides additional functions besides the standard ones provided by
Slice[T].

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2022-03-16 21:45:19 -07:00
committed by Maisem Ali
parent d8953bf2ba
commit 6b9d938c1a
5 changed files with 48 additions and 52 deletions

View File

@@ -112,7 +112,7 @@ type PeerStatus struct {
// Tags are the list of ACL tags applied to this node.
// See tailscale.com/tailcfg#Node.Tags for more information.
Tags *views.StringSlice `json:",omitempty"`
Tags *views.Slice[string] `json:",omitempty"`
// PrimaryRoutes are the routes this node is currently the primary
// subnet router for, as determined by the control plane. It does