MCPcopy Index your code
hub / github.com/aptly-dev/aptly / GetTaskErrorByID

Method GetTaskErrorByID

task/list.go:266–277  ·  view source on GitHub ↗

GetTaskErrorByID returns the Task error for a given id

(ID int)

Source from the content-addressed store, hash-verified

264
265// GetTaskErrorByID returns the Task error for a given id
266func (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}

Callers 1

maybeRunTaskInBackgroundFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected