SetError sets an error on the current step.
(err string)
| 104 | |
| 105 | // SetError sets an error on the current step. |
| 106 | func (w *WorktreeSpinner) SetError(err string) { |
| 107 | w.errMsg = err |
| 108 | idx := int(w.currentStep) |
| 109 | if idx < len(w.steps) { |
| 110 | w.steps[idx].errMsg = err |
| 111 | w.steps[idx].active = false |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | // HasError returns true if there is an error. |
| 116 | func (w *WorktreeSpinner) HasError() bool { |
no outgoing calls