()
| 32 | ) |
| 33 | |
| 34 | func newTestWriter() (*ttyWriter, *bytes.Buffer) { |
| 35 | var buf bytes.Buffer |
| 36 | w := &ttyWriter{ |
| 37 | out: &buf, |
| 38 | info: &buf, |
| 39 | tasks: map[string]*task{}, |
| 40 | done: make(chan bool), |
| 41 | mtx: &sync.Mutex{}, |
| 42 | operation: "pull", |
| 43 | } |
| 44 | return w, &buf |
| 45 | } |
| 46 | |
| 47 | func addTask(w *ttyWriter, id, text, details string, status api.EventStatus) { |
| 48 | t := &task{ |
no outgoing calls
no test coverage detected