all: update exp/slices and fix call sites

slices.SortFunc suffered a late-in-cycle API breakage.

Updates #cleanup

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2023-07-28 10:39:04 -07:00
committed by Dave Anderson
parent 90a7d3066c
commit 52212f4323
16 changed files with 91 additions and 50 deletions

View File

@@ -298,8 +298,8 @@ func (pm *profileManager) writePrefsToStore(key ipn.StateKey, prefs ipn.PrefsVie
// Profiles returns the list of known profiles.
func (pm *profileManager) Profiles() []ipn.LoginProfile {
profiles := pm.matchingProfiles(func(*ipn.LoginProfile) bool { return true })
slices.SortFunc(profiles, func(a, b *ipn.LoginProfile) bool {
return a.Name < b.Name
slices.SortFunc(profiles, func(a, b *ipn.LoginProfile) int {
return strings.Compare(a.Name, b.Name)
})
out := make([]ipn.LoginProfile, 0, len(profiles))
for _, p := range profiles {