mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
Replace min/max helpers with built-in min/max
We upgraded our minimum Go version to 1.21 in commit
57ac9c2189
. We can now replace our
`utils.Min` and `utils.Max` functions with the built-in `min` and `max`.
Reference: https://go.dev/ref/spec#Min_and_max
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
@ -5,7 +5,6 @@ import (
|
||||
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||
"github.com/jesseduffield/lazygit/pkg/theme"
|
||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||
)
|
||||
|
||||
// note: items option is mutated by this function
|
||||
@ -31,7 +30,7 @@ func (gui *Gui) createMenu(opts types.CreateMenuOptions) error {
|
||||
item.LabelColumns[0] = fmt.Sprintf("%s...", item.LabelColumns[0])
|
||||
}
|
||||
|
||||
maxColumnSize = utils.Max(maxColumnSize, len(item.LabelColumns))
|
||||
maxColumnSize = max(maxColumnSize, len(item.LabelColumns))
|
||||
}
|
||||
|
||||
for _, item := range opts.Items {
|
||||
|
Reference in New Issue
Block a user