GetTaskErrorByID returns the Task error for a given id
(ID int)
| 264 | |
| 265 | // GetTaskErrorByID returns the Task error for a given id |
| 266 | func (list *List) GetTaskErrorByID(ID int) (error, error) { |
| 267 | list.Lock() |
| 268 | defer list.Unlock() |
| 269 | |
| 270 | for _, task := range list.tasks { |
| 271 | if task.ID == ID { |
| 272 | return task.err, nil |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | return nil, fmt.Errorf("could not find task with id %v", ID) |
| 277 | } |
no outgoing calls
no test coverage detected