<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/main/filter.go
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2022-09-21 19:37:02 +0100
committerCharlie Stanton <charlie@shtanton.xyz>2022-09-21 19:37:02 +0100
commit96812b9ea732cc7ae26efce4568c19aec0000abc (patch)
tree7a5f55230ac15648c6b66dfc0870e19a1c12a78b /main/filter.go
parentcfbe645715114234510bda068d2f30ffbe208eae (diff)
downloadstred-go-96812b9ea732cc7ae26efce4568c19aec0000abc.tar
Adds some new commands
Diffstat (limited to 'main/filter.go')
-rw-r--r--main/filter.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/main/filter.go b/main/filter.go
index 796f558..f69d01a 100644
--- a/main/filter.go
+++ b/main/filter.go
@@ -69,6 +69,14 @@ func (filter AndFilter) exec(space WalkItem) bool {
return filter.left.exec(space) && filter.right.exec(space)
}
+type OrFilter struct {
+ left Filter
+ right Filter
+}
+func (filter OrFilter) exec(space WalkItem) bool {
+ return filter.left.exec(space) || filter.right.exec(space)
+}
+
type NotFilter struct {
content Filter
}