Returns the firstmost (by task index) error as discovered by all previous Reap() calls.
()
| 108 | // Returns the firstmost (by task index) error as |
| 109 | // discovered by all previous Reap() calls. |
| 110 | func (trs *TaskResultSet) FirstError() error { |
| 111 | for _, result := range trs.results { |
| 112 | if result.Error != nil { |
| 113 | return result.Error |
| 114 | } |
| 115 | } |
| 116 | return nil |
| 117 | } |
| 118 | |
| 119 | //---------------------------------------- |
| 120 | // Parallel |
no outgoing calls