From 11a8f396b7f4a2343e8fb870ca63966b65784874 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Thu, 26 Sep 2019 18:10:44 -0700 Subject: [PATCH] Minor cleanup in HIBP module --- modules/hibp/widget.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/hibp/widget.go b/modules/hibp/widget.go index fe7cdc76..135d6d4a 100644 --- a/modules/hibp/widget.go +++ b/modules/hibp/widget.go @@ -67,16 +67,18 @@ func (widget *Widget) content() (string, string, bool) { if widget.err != nil { return title, widget.err.Error(), true } + title = title + widget.sinceDateForTitle() str := "" - for _, stat := range widget.data { + for _, status := range widget.data { color := widget.settings.colors.ok - if stat.HasBeenCompromised() { + + if status.HasBeenCompromised() { color = widget.settings.colors.pwned } - str += fmt.Sprintf(" [%s]%s[white]\n", color, stat.Account) + str += fmt.Sprintf(" [%s]%s[white]\n", color, status.Account) } return title, str, false