From 13f0442ee4d98c73f7d3f09a70aaca87b38a67b7 Mon Sep 17 00:00:00 2001 From: Roi Martin Date: Mon, 3 Oct 2016 11:10:50 +0200 Subject: [PATCH] Minor style changes --- gui.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gui.go b/gui.go index 476c7ff..e363872 100644 --- a/gui.go +++ b/gui.go @@ -246,16 +246,15 @@ func (g *Gui) DeleteKeybinding(viewname string, key interface{}, mod Modifier) e return errors.New("keybinding not found") } -// DeleteKeybindings deletes all keybindings of view +// DeleteKeybindings deletes all keybindings of view. func (g *Gui) DeleteKeybindings(viewname string) { - - var res []*keybinding + var s []*keybinding for _, kb := range g.keybindings { if kb.viewName != viewname { - res = append(res, kb) + s = append(s, kb) } } - g.keybindings = res + g.keybindings = s } // getKey takes an empty interface with a key and returns the corresponding