/
githubmirror
/
lazygit
Обзор
Документация
Войти
/
githubmirror
/
lazygit
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
pkg/gui/controllers/menu_key.go
11 строк
469 B
Stefan Haller
Use a slice of keys for each binding
25 май 2026, 16:18
25 май 2026, 16:18
3d18ee8
Код
Авторство
О чём код?
package controllers import "github.com/jesseduffield/lazygit/pkg/gocui" // menuKey is a shorthand for constructing a key value for a menu item from a single rune literal, // avoiding the noise of `[]gocui.Key{gocui.NewKeyRune('a')}` at every call site. There is an // intentionally identical helper in the helpers package so that callers in either package can use // the unqualified form. func menuKey(r rune) []gocui.Key { return []gocui.Key{gocui.NewKeyRune(r)} }