diff options
Diffstat (limited to 'main/pathfilter.go')
-rw-r--r-- | main/pathfilter.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/main/pathfilter.go b/main/pathfilter.go index b64872e..7e21efe 100644 --- a/main/pathfilter.go +++ b/main/pathfilter.go @@ -12,10 +12,10 @@ func (filter AnySegmentPathFilter) accept() bool { return false } -type GroupPathFilter struct { - filters []PathFilterState +type OrPathFilter struct { + filters [2]PathFilterState } -func (filter GroupPathFilter) eat(segment PathSegment) map[PathFilterState]struct{} { +func (filter OrPathFilter) eat(segment PathSegment) map[PathFilterState]struct{} { res := make(map[PathFilterState]struct{}) for _, f := range filter.filters { for r := range f.eat(segment) { @@ -24,7 +24,7 @@ func (filter GroupPathFilter) eat(segment PathSegment) map[PathFilterState]struc } return res } -func (filter GroupPathFilter) accept() bool { +func (filter OrPathFilter) accept() bool { for _, f := range filter.filters { if f.accept() { return true |