util/set: add OfSliceView constructor and Set.AddSliceView
Building a Set from a views.Slice previously required set.Of(v.AsSlice()...), which allocates an intermediate slice copy before allocating the set. Add OfSliceView and AddSliceView to populate a set directly from the view, mirroring the existing AddSlice/AddSeq/AddSet family. Updates tailscale/corp#45499 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com> Change-Id: I3f2a9d417c60be8e5f1acd42708e2f9a4d6c1b7e
B
Brad Fitzpatrick committed
d0b4d44963d5ea6ce2f8bd312de749dd2e5afa7d
Parent: e48e7b7
Committed by Brad Fitzpatrick <brad@danga.com>
on 7/27/2026, 11:30:30 PM