diff --git a/tools/asynq/cmd/dash/dash.go b/tools/asynq/cmd/dash/dash.go index f1506ee..422550c 100644 --- a/tools/asynq/cmd/dash/dash.go +++ b/tools/asynq/cmd/dash/dash.go @@ -64,8 +64,6 @@ type Options struct { PollInterval time.Duration } -var baseStyle = tcell.StyleDefault.Background(tcell.ColorReset).Foreground(tcell.ColorReset) - func Run(opts Options) { s, err := tcell.NewScreen() if err != nil { diff --git a/tools/asynq/cmd/dash/draw.go b/tools/asynq/cmd/dash/draw.go index 8fea400..a4552bc 100644 --- a/tools/asynq/cmd/dash/draw.go +++ b/tools/asynq/cmd/dash/draw.go @@ -18,6 +18,11 @@ import ( "github.com/mattn/go-runewidth" ) +var ( + baseStyle = tcell.StyleDefault.Background(tcell.ColorReset).Foreground(tcell.ColorReset) + labelStyle = baseStyle.Foreground(tcell.ColorLightGray) +) + // drawer draws UI with the given state. type drawer interface { Draw(state *State) @@ -259,7 +264,6 @@ func drawQueueSummary(d *ScreenDrawer, state *State) { d.Println("ERROR: Press q to go back", baseStyle) return } - labelStyle := baseStyle.Foreground(tcell.ColorLightGray) d.Print("Name: ", labelStyle) d.Println(q.Queue, baseStyle) d.Print("Size: ", labelStyle)