MCPcopy
hub / github.com/restic/restic / Run

Method Run

internal/ui/termstatus/status.go:197–205  ·  view source on GitHub ↗

Run updates the screen. It should be run in a separate goroutine. When ctx is cancelled, the status lines are cleanly removed.

(ctx context.Context)

Source from the content-addressed store, hash-verified

195// Run updates the screen. It should be run in a separate goroutine. When
196// ctx is cancelled, the status lines are cleanly removed.
197func (t *Terminal) Run(ctx context.Context) {
198 defer close(t.closed)
199 if t.canUpdateStatus {
200 t.run(ctx)
201 return
202 }
203
204 t.runWithoutStatus(ctx)
205}
206
207// run listens on the channels and updates the terminal screen.
208func (t *Terminal) run(ctx context.Context) {

Callers 15

buildFunction · 0.80
testFunction · 0.80
buildFunction · 0.80
compressFunction · 0.80
downloadModulesFunction · 0.80
runFunction · 0.80
extractTarFunction · 0.80
sha256sumsFunction · 0.80
TestAppendOpenFunction · 0.80
TestAppendSealFunction · 0.80
testRewindReaderFunction · 0.80
TestShellSplitterFunction · 0.80

Implementers 2

MockTerminalinternal/ui/mock.go
Terminalinternal/ui/termstatus/status.go

Calls 2

runMethod · 0.95
runWithoutStatusMethod · 0.95

Tested by 15

TestAppendOpenFunction · 0.64
TestAppendSealFunction · 0.64
testRewindReaderFunction · 0.64
TestShellSplitterFunction · 0.64
TestShellSplitterInvalidFunction · 0.64
TestRoundtripFunction · 0.64
TestFilesFunction · 0.64
TestFileLoadFunction · 0.64
TestDefaultLayoutFunction · 0.64
TestRESTLayoutFunction · 0.64
TestRESTLayoutURLsFunction · 0.64
TestParseFallbackFunction · 0.64