Method
Start
cmd/display/tty.go:158–175
· cmd/display/tty.go::ttyWriter.Start
(ctx context.Context, operation string)
Source from the content-addressed store, hash-verified
| 156 | } |
| 157 | |
| 158 | func (w *ttyWriter) Start(ctx context.Context, operation string) { |
| 159 | w.ticker = time.NewTicker(100 * time.Millisecond) |
| 160 | w.operation = operation |
| 161 | go func() { |
| 162 | for { |
| 163 | select { |
| 164 | case <-ctx.Done(): |
| 165 | // interrupted |
| 166 | w.ticker.Stop() |
| 167 | return |
| 168 | case <-w.done: |
| 169 | return |
| 170 | case <-w.ticker.C: |
| 171 | w.print() |
| 172 | } |
| 173 | } |
| 174 | }() |
| 175 | } |
| 176 | |
| 177 | func (w *ttyWriter) Done(operation string, success bool) { |
| 178 | w.print() |
Callers
nothing calls this directly
Tested by
no test coverage detected