MCPcopy
hub / github.com/cli/cli / startTextualProgressIndicator

Method startTextualProgressIndicator

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

Source from the content-addressed store, hash-verified

328}
329
330func (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,

Callers 1

Calls 2

ColorSchemeMethod · 0.95
CyanMethod · 0.80

Tested by

no test coverage detected