hoff
hoff copied to clipboard
Ensure that Filter methods return empty slice when nothing matches
- previously if the filter matched nothing, []T(nil) would be returned, rather than an actual empty slice []T{}
- this is because we weren't initializing the out return value, so if nothing matched the filter, it would just return the default value of nil
- add Example and "No Matches" tests