filter return Containers with elements to match predicate
(predicates ...containerPredicate)
| 168 | |
| 169 | // filter return Containers with elements to match predicate |
| 170 | func (containers Containers) filter(predicates ...containerPredicate) Containers { |
| 171 | var filtered Containers |
| 172 | for _, c := range containers { |
| 173 | if matches(c, predicates...) { |
| 174 | filtered = append(filtered, c) |
| 175 | } |
| 176 | } |
| 177 | return filtered |
| 178 | } |
| 179 | |
| 180 | // forEachContainerConcurrent runs fn for every container concurrently and waits for all goroutines. |
| 181 | func forEachContainerConcurrent(ctx context.Context, containers Containers, fn func(context.Context, container.Summary) error) error { |
no test coverage detected