// SetCondition updates a list of conditions with the provided condition
SetCondition updates a list of conditions with the provided condition
// SetCondition updates a list of conditions with the provided condition
func (brs *BuildRunStatus) SetCondition(condition *Condition) {
	var idx = -1
	for i, c := range brs.Conditions {
		if c.Type == condition.Type {
			idx = i
			break
		}
	}
	if idx != -1 {
		brs.Conditions[idx] = *condition
	} else {
		brs.Conditions = append(brs.Conditions, *condition)
	}
}
func ( brs * BuildRunStatus ) SetCondition ( condition * Condition ) { var idx = - 1 for i , c := range brs . Conditions { if c . Type == condition . Type { idx = i break } } if idx != - 1 { brs . Conditions [ idx ] = * condition } else { brs . Conditions = append ( brs . Conditions , * condition ) } }
SetCondition updates a list of conditions with the provided condition
SetCondition updates a list of conditions with the provided condition