openshift/openshift-copies.go
func newAggregate(errlist []error) error {
	if len(errlist) == 0 {
		return nil
	}
	// In case of input error list contains nil
	var errs []error
	for _, e := range errlist {
		if e != nil {
			errs = append(errs, e)
		}
	}
	if len(errs) == 0 {
		return nil
	}
	return aggregateErr(errs)
}
func newAggregate(errlist []error) error {
	if len(errlist) == 0 {
		return nil
	}
	// In case of input error list contains nil
	var errs []error
	for _, e := range errlist {
		if e != nil {
			errs = append(errs, e)
		}
	}
	if len(errs) == 0 {
		return nil
	}
	return aggregateErr(errs)
}
func newAggregate ( errlist [ ] error ) error { if len ( errlist ) == 0 { return nil } // In case of input error list contains nil var errs [ ] error for _ , e := range errlist { if e != nil { errs = append ( errs , e ) } } if len ( errs ) == 0 { return nil } return aggregateErr ( errs ) }
// newAggregate is a modified copy of k8s.io/apimachinery/pkg/util/errors.NewAggregate.
// NewAggregate converts a slice of errors into an Aggregate interface, which
// is itself an implementation of the error interface.  If the slice is empty,
// this returns nil.
// It will check if any of the element of input error list is nil, to avoid
// nil pointer panic when call Error().
newAggregate is a modified copy of k8s . io / apimachinery / pkg / util / errors . NewAggregate . NewAggregate converts a slice of errors into an Aggregate interface which is itself an implementation of the error interface . If the slice is empty this returns nil . It will check if any of the element of input error list is nil to avoid nil pointer panic when call Error () .