mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Remove complexity from a lot of string display statements
This commit is contained in:
@@ -8,14 +8,11 @@ import (
|
||||
|
||||
func (widget *Widget) display() {
|
||||
if ok == false {
|
||||
widget.View.SetText(fmt.Sprintf("%s", errorText))
|
||||
widget.View.SetText(errorText)
|
||||
return
|
||||
}
|
||||
|
||||
str := ""
|
||||
str += summaryText(&widget.summaryList, &widget.TextColors)
|
||||
|
||||
widget.View.SetText(fmt.Sprintf("%s", str))
|
||||
widget.View.SetText(summaryText(&widget.summaryList, &widget.TextColors))
|
||||
}
|
||||
|
||||
func summaryText(list *summaryList, colors *TextColors) string {
|
||||
|
||||
@@ -37,7 +37,8 @@ func (widget *Widget) Refresh() {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
widget.View.SetText(fmt.Sprintf("%s", contentFrom(positions)))
|
||||
|
||||
widget.View.SetText(contentFrom(positions))
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
Reference in New Issue
Block a user