Practical pipeline “traversal → collection → filtering → sorting”: collect results from
WalkDir into
[]Item, write predicates based on
strings.HasPrefix/
HasSuffix/
Contains, compose conditions through the
Filter function, and then make the output deterministic with
sort.Slice and
sort.SliceStable, including a tie-breaker (for example, by path).