(t *task)
| 638 | ) |
| 639 | |
| 640 | func spinner(t *task) string { |
| 641 | switch t.status { |
| 642 | case api.Done: |
| 643 | return SuccessColor(spinnerDone) |
| 644 | case api.Warning: |
| 645 | return WarningColor(spinnerWarning) |
| 646 | case api.Error: |
| 647 | return ErrorColor(spinnerError) |
| 648 | default: |
| 649 | return CountColor(t.spinner.String()) |
| 650 | } |
| 651 | } |
| 652 | |
| 653 | func colorFn(s api.EventStatus) colorFunc { |
| 654 | switch s { |