MCPcopy
hub / github.com/esm-dev/esm.sh / startSpinner

Method startSpinner

cli/command_add.go:430–441  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

428}
429
430func (ui *subModuleSelectUI) startSpinner() {
431 if ui.spinnerTimer != nil {
432 ui.spinnerTimer.Stop()
433 }
434 fps := 5
435 ui.spinnerTimer = time.AfterFunc(time.Second/time.Duration(fps), ui.startSpinner)
436 ui.spinnerIndex++
437 if ui.spinnerIndex >= len(ui.spinnerChars) {
438 ui.spinnerIndex = 0
439 }
440 ui.render(true)
441}
442
443func (ui *subModuleSelectUI) isPending() bool {
444 return slices.Contains(ui.state, 2)

Callers 1

showMethod · 0.95

Calls 2

renderMethod · 0.95
StopMethod · 0.80

Tested by

no test coverage detected