From 261f50d7ea278c751c07b27268d43bc3ca33923c Mon Sep 17 00:00:00 2001 From: Jussi Tiira Date: Mon, 15 Nov 2021 21:07:37 +0000 Subject: [PATCH] cleanup: if instead of switch-case with single case --- ui/views/views.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/views/views.go b/ui/views/views.go index b6e922f..611d21e 100644 --- a/ui/views/views.go +++ b/ui/views/views.go @@ -67,8 +67,7 @@ func (v *Views) Layout(g *gocui.Gui, maxX, maxY int) error { current := g.CurrentView() if current != nil { - switch current.Name() { - case v.Menu.Name(): + if current.Name() == v.Menu.Name() { err = v.Menu.Set(g, 0, 6, 10, maxY) if err != nil { return err