You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func (q *Queue) Tasks() []*Task {
tasks := make([]*Task, len(q.Raw.Items))
for i, t := range q.Raw.Items {
tasks[i] = &Task{Jenkins: q.Jenkins, Queue: q, Raw: &t} //This function is still wrong, because &t will always stay the same pointer. You have to use: &q.Raw.Items[i]
}
return tasks
}
I claim, that there is no test for this function.
The text was updated successfully, but these errors were encountered:
func (q *Queue) Tasks() []*Task {
tasks := make([]*Task, len(q.Raw.Items))
for i, t := range q.Raw.Items {
tasks[i] = &Task{Jenkins: q.Jenkins, Queue: q, Raw: &t} //This function is still wrong, because &t will always stay the same pointer. You have to use: &q.Raw.Items[i]
}
return tasks
}
I claim, that there is no test for this function.
The text was updated successfully, but these errors were encountered: