MCPcopy Create free account
hub / github.com/cli/cli / startTextualProgressIndicator

Method startTextualProgressIndicator

pkg/iostreams/iostreams.go:342–358  ·  view source on GitHub ↗
(label string)

Source from the content-addressed store, hash-verified

340}
341
342func (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,

Callers 1

Calls 2

ColorSchemeMethod · 0.95
CyanMethod · 0.80

Tested by

no test coverage detected