PKGBUILD/pkg/internal/collect/errors.go

17 lines
261 B
Go
Raw Normal View History

package collect
func Errors(errorChannel <-chan error) []error {
errorList := make([]error, 0)
for {
select {
case err, more := <-errorChannel:
if more {
errorList = append(errorList, err)
continue
}
default:
return errorList
}
}
}