// doSieve uses a function to accept or ignore resources from a list.
// If list is nil, returns immediately.
// It's a filter obviously, but that term is overloaded here.
doSieve uses a function to accept or ignore resources from a list.
If list is nil, returns immediately.
It's a filter obviously, but that term is overloaded here.
// doSieve uses a function to accept or ignore resources from a list . // If list is nil returns immediately . // It ' s a filter obviously but that term is overloaded here .
func doSieve(list []*resource.Resource, fn sieveFunc) (s []*resource.Resource) {
	for _, r := range list {
		if fn(r) {
			s = append(s, r)
		}
	}
	return
}
func doSieve ( list [ ] * resource . Resource , fn sieveFunc ) ( s [ ] * resource . Resource ) { for _ , r := range list { if fn ( r ) { s = append ( s , r ) } } return }
doSieve uses a function to accept or ignore resources from a list.
doSieve uses a function to accept or ignore resources from a list .