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

big golangci-lint cleanup

This commit is contained in:
Jesse Duffield
2020-03-09 11:34:10 +11:00
parent 8f68ac2129
commit e47ad846c4
34 changed files with 141 additions and 243 deletions

View File

@ -162,15 +162,15 @@ func (gui *Gui) getKeyDisplay(name string) string {
func GetKeyDisplay(key interface{}) string {
keyInt := 0
switch key.(type) {
switch key := key.(type) {
case rune:
keyInt = int(key.(rune))
keyInt = int(key)
case gocui.Key:
value, ok := keyMapReversed[key.(gocui.Key)]
value, ok := keyMapReversed[key]
if ok {
return value
}
keyInt = int(key.(gocui.Key))
keyInt = int(key)
}
return string(keyInt)