mirror of
https://github.com/tailscale/tailscale.git
synced 2025-07-30 07:43:42 +00:00

In this PR we add viewer/cloner codegen support for the following field types, where View is an existing, likely generated, view type and T is a struct (rather than a pointer to struct). - []T - []View - map[K]View To support []T, we introduce the generic view type view.ValueSliceView[T, P, V]. Here, P (i.e. *T) implements ViewCloner[*T, V], and V is the concrete view type for T. For the slices and maps of views we use existing views.Slice and view.Map view types. This is mostly done in a preparation for generating netmap.NetworkMapView. Updates #12614 Updates tailscale/corp#27502 Signed-off-by: Nick Khyl <nickk@tailscale.com>