MCPcopy
hub / github.com/MadAppGang/dingo / Stop

Method Stop

pkg/ui/simple_build_ui.go:78–100  ·  view source on GitHub ↗

Stop ends animation and shows final mascot (only on success)

()

Source from the content-addressed store, hash-verified

76
77// Stop ends animation and shows final mascot (only on success)
78func (ui *SimpleBuildUI) Stop() {
79 ui.mu.Lock()
80 if !ui.running {
81 ui.mu.Unlock()
82 return
83 }
84 ui.running = false
85 state := ui.state
86 ui.mu.Unlock()
87
88 if ui.isTTY {
89 // Show cursor
90 fmt.Print("\033[?25h")
91 }
92
93 // Print mascot on success or failure (but not during normal operation)
94 // Only print once per UI instance
95 ui.stopOnce.Do(func() {
96 if state == mascot.StateSuccess || state == mascot.StateFailed {
97 ui.printMascot()
98 }
99 })
100}
101
102// SetStatus updates mascot state and status
103func (ui *SimpleBuildUI) SetStatus(state mascot.MascotState, status, detail string) {

Callers 4

runUpdateFunction · 0.95
runGoCommandFunction · 0.95
runTranspileFunction · 0.95
RunWithSpinnerMethod · 0.45

Calls 1

printMascotMethod · 0.95

Tested by

no test coverage detected