mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Replace Fprintf calls with SetText calls
This commit is contained in:
parent
f3cda409aa
commit
ec7514e592
4
Makefile
4
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)"
|
go install -ldflags="-s -w -X main.version=$(shell git describe --always --abbrev=6) -X main.date=$(shell date +%FT%T%z)"
|
||||||
which wtf
|
which wtf
|
||||||
|
|
||||||
|
lint:
|
||||||
|
structcheck ./...
|
||||||
|
varcheck ./...
|
||||||
|
|
||||||
run: build
|
run: build
|
||||||
bin/wtf
|
bin/wtf
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
func (widget *Widget) display(clocks []Clock) {
|
func (widget *Widget) display(clocks []Clock) {
|
||||||
if len(clocks) == 0 {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ func (widget *Widget) display() {
|
|||||||
|
|
||||||
project := widget.currentGerritProject()
|
project := widget.currentGerritProject()
|
||||||
if project == nil {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user