Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions list.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (p *PathList) filter(filter func(*Path) bool) {
*p = res
}

// FilterOutPrefix remove all entries having the specified prefixes
// FilterOutPrefix remove all entries having one of the specified prefixes
func (p *PathList) FilterOutPrefix(prefixes ...string) {
filterFunction := func(path *Path) bool {
return !path.HasPrefix(prefixes...)
Expand All @@ -117,15 +117,15 @@ func (p *PathList) FilterPrefix(prefixes ...string) {
p.filter(filterFunction)
}

// FilterOutSuffix remove all entries having the specified suffix
// FilterOutSuffix remove all entries having one of the specified suffixes
func (p *PathList) FilterOutSuffix(suffixies ...string) {
filterFunction := func(path *Path) bool {
return !path.HasSuffix(suffixies...)
}
p.filter(filterFunction)
}

// FilterSuffix remove all entries not having the specified prefix
// FilterSuffix remove all entries not having one of the specified suffixes
func (p *PathList) FilterSuffix(suffixies ...string) {
filterFunction := func(path *Path) bool {
return path.HasSuffix(suffixies...)
Expand Down