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:
@@ -9,10 +9,9 @@ import (
|
||||
)
|
||||
|
||||
func (widget *Widget) display() {
|
||||
|
||||
repoData := widget.currentData()
|
||||
if repoData == nil {
|
||||
fmt.Fprintf(widget.View, "%s", " Git repo data is unavailable (1)")
|
||||
widget.View.SetText(" Git repo data is unavailable ")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -27,7 +26,7 @@ func (widget *Widget) display() {
|
||||
str = str + "\n"
|
||||
str = str + widget.formatCommits(repoData.Commits)
|
||||
|
||||
widget.View.SetText(fmt.Sprintf("%s", str))
|
||||
widget.View.SetText(str)
|
||||
}
|
||||
|
||||
func (widget *Widget) formatChanges(data []string) string {
|
||||
|
||||
Reference in New Issue
Block a user