diff --git a/internal/ui/statusbar.go b/internal/ui/statusbar.go index 5cc27e6..9772ae9 100644 --- a/internal/ui/statusbar.go +++ b/internal/ui/statusbar.go @@ -20,21 +20,21 @@ type statusbar struct { } func newStatusbar() *statusbar { - obj := statusbar{ + value := statusbar{ TextView: tview.NewTextView(), duration: 5 * time.Second, } - obj.SetDynamicColors(true).SetBorder(false).SetBorderPadding(0, 0, 1, 1) + value.SetDynamicColors(true).SetBorder(false).SetBorderPadding(0, 0, 1, 1) - return &obj + return &value } -func (s *statusbar) displayMessage(category statusbarLogLevel, message string) { +func (s *statusbar) displayMessage(level statusbarLogLevel, message string) { go func() { var colour string - switch category { + switch level { case infoLevel: colour = "green" case errorLevel: