MCPcopy
hub / github.com/pterm/pterm / UpdateText

Method UpdateText

spinner_printer.go:138–145  ·  view source on GitHub ↗

UpdateText updates the message of the active SpinnerPrinter. Can be used live.

(text string)

Source from the content-addressed store, hash-verified

136// UpdateText updates the message of the active SpinnerPrinter.
137// Can be used live.
138func (s *SpinnerPrinter) UpdateText(text string) {
139 s.Text = text
140 if !RawOutput {
141 Fprinto(s.Writer, "\033[K"+s.Style.Sprint(s.currentSequence)+" "+s.MessageStyle.Sprint(s.Text))
142 } else {
143 Fprintln(s.Writer, s.Text)
144 }
145}
146
147// Start the SpinnerPrinter.
148func (s SpinnerPrinter) Start(text ...any) (*SpinnerPrinter, error) {

Callers 6

mainFunction · 0.80
introScreenFunction · 0.80
mainFunction · 0.80

Calls 3

FprintoFunction · 0.85
FprintlnFunction · 0.85
SprintMethod · 0.65