Skip to content

Commit

Permalink
Replace Fprintf calls with SetText calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Cummer committed Aug 3, 2018
1 parent 389d3cb commit b5bdaf3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion clocks/display.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion gerrit/display.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit b5bdaf3

Please sign in to comment.