diff --git a/Makefile b/Makefile index bde2f7a7..dfa59a84 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,10 @@ install: go install -ldflags="-s -w -X main.version=$(shell git describe --always --abbrev=6) -X main.date=$(shell date +%FT%T%z)" which wtf +lint: + structcheck ./... + varcheck ./... + run: build bin/wtf diff --git a/clocks/display.go b/clocks/display.go index d59e243a..44fedbbf 100644 --- a/clocks/display.go +++ b/clocks/display.go @@ -8,7 +8,7 @@ import ( func (widget *Widget) display(clocks []Clock) { if len(clocks) == 0 { - fmt.Fprintf(widget.View, "\n%s", " no timezone data available") + widget.View.SetText(fmt.Sprintf("\n%s", " no timezone data available")) return } diff --git a/gerrit/display.go b/gerrit/display.go index 6a9cd499..24645197 100644 --- a/gerrit/display.go +++ b/gerrit/display.go @@ -10,7 +10,7 @@ func (widget *Widget) display() { project := widget.currentGerritProject() if project == nil { - fmt.Fprintf(widget.View, "%s", " Gerrit project data is unavailable (1)") + widget.View.SetText(fmt.Sprintf("%s", " Gerrit project data is unavailable (1)")) return }