Skip to content

Commit

Permalink
Fix ineffectual assignment in spinner example
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Mar 12, 2021
1 parent b6c7f93 commit f981b99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/spinners/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,14 @@ func (m *model) resetSpinner() {
}

func (m model) View() (s string) {
gap := " "
var gap string
switch m.index {
case 1:
gap = ""
default:
gap = " "
}

s += fmt.Sprintf("\n %s%s%s\n\n", m.spinner.View(), gap, textStyle("Spinning..."))
s += helpStyle("h/l, ←/→: change spinner • q: exit\n")
return
Expand Down

0 comments on commit f981b99

Please sign in to comment.