Fix ineffectual assignment in spinner example

This commit is contained in:
Christian Muehlhaeuser
2021-03-12 02:07:50 +01:00
parent b6c7f93d9a
commit f981b991c0

View File

@@ -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