(label string)
| 340 | } |
| 341 | |
| 342 | func (s *IOStreams) startTextualProgressIndicator(label string) { |
| 343 | s.progressIndicatorMu.Lock() |
| 344 | defer s.progressIndicatorMu.Unlock() |
| 345 | |
| 346 | // Default label when spinner disabled is "Working..." |
| 347 | if label == "" { |
| 348 | label = "Working..." |
| 349 | } |
| 350 | |
| 351 | // Add an ellipsis to the label if it doesn't already have one. |
| 352 | ellipsis := "..." |
| 353 | if !strings.HasSuffix(label, ellipsis) { |
| 354 | label = label + ellipsis |
| 355 | } |
| 356 | |
| 357 | fmt.Fprintf(s.ErrOut, "%s%s", s.ColorScheme().Cyan(label), "\n") |
| 358 | } |
| 359 | |
| 360 | // StopProgressIndicator stops the progress indicator if it is running. |
| 361 | // Note that a textual progress indicator does not create a progress indicator, |
no test coverage detected