1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-07 22:02:56 +03:00

Update to go 1.24

This commit is contained in:
Kevin Radloff
2025-03-08 10:40:10 -05:00
parent 19ac926116
commit be7583dd40
11 changed files with 44 additions and 42 deletions

View File

@@ -11,9 +11,12 @@
package cheatsheet
import (
"cmp"
"fmt"
"log"
"os"
"slices"
"strings"
"github.com/jesseduffield/generics/maps"
"github.com/jesseduffield/lazycore/pkg/utils"
@@ -23,7 +26,6 @@ import (
"github.com/jesseduffield/lazygit/pkg/gui/types"
"github.com/jesseduffield/lazygit/pkg/i18n"
"github.com/samber/lo"
"golang.org/x/exp/slices"
)
type bindingSection struct {
@@ -164,11 +166,11 @@ func getBindingSections(bindings []*types.Binding, tr *i18n.TranslationSet) []*b
},
)
slices.SortFunc(bindingGroups, func(a, b headerWithBindings) bool {
slices.SortFunc(bindingGroups, func(a, b headerWithBindings) int {
if a.header.priority != b.header.priority {
return a.header.priority > b.header.priority
return cmp.Compare(b.header.priority, a.header.priority)
}
return a.header.title < b.header.title
return strings.Compare(a.header.title, b.header.title)
})
return lo.Map(bindingGroups, func(hb headerWithBindings, _ int) *bindingSection {