(label string)
| 328 | } |
| 329 | |
| 330 | func (s *IOStreams) startTextualProgressIndicator(label string) { |
| 331 | s.progressIndicatorMu.Lock() |
| 332 | defer s.progressIndicatorMu.Unlock() |
| 333 | |
| 334 | // Default label when spinner disabled is "Working..." |
| 335 | if label == "" { |
| 336 | label = "Working..." |
| 337 | } |
| 338 | |
| 339 | // Add an ellipsis to the label if it doesn't already have one. |
| 340 | ellipsis := "..." |
| 341 | if !strings.HasSuffix(label, ellipsis) { |
| 342 | label = label + ellipsis |
| 343 | } |
| 344 | |
| 345 | fmt.Fprintf(s.ErrOut, "%s%s", s.ColorScheme().Cyan(label), "\n") |
| 346 | } |
| 347 | |
| 348 | // StopProgressIndicator stops the progress indicator if it is running. |
| 349 | // Note that a textual progess indicator does not create a progress indicator, |
no test coverage detected