Stop terminates the SpinnerPrinter immediately. The SpinnerPrinter will not resolve into anything.
()
| 181 | // Stop terminates the SpinnerPrinter immediately. |
| 182 | // The SpinnerPrinter will not resolve into anything. |
| 183 | func (s *SpinnerPrinter) Stop() error { |
| 184 | if !s.IsActive { |
| 185 | return nil |
| 186 | } |
| 187 | s.IsActive = false |
| 188 | if RawOutput { |
| 189 | return nil |
| 190 | } |
| 191 | if s.RemoveWhenDone { |
| 192 | fClearLine(s.Writer) |
| 193 | Fprinto(s.Writer) |
| 194 | } else { |
| 195 | Fprintln(s.Writer) |
| 196 | } |
| 197 | return nil |
| 198 | } |
| 199 | |
| 200 | // GenericStart runs Start, but returns a LivePrinter. |
| 201 | // This is used for the interface LivePrinter. |