diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2022-09-21 19:37:02 +0100 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2022-09-21 19:37:02 +0100 |
commit | 96812b9ea732cc7ae26efce4568c19aec0000abc (patch) | |
tree | 7a5f55230ac15648c6b66dfc0870e19a1c12a78b /main/filter.go | |
parent | cfbe645715114234510bda068d2f30ffbe208eae (diff) | |
download | stred-go-96812b9ea732cc7ae26efce4568c19aec0000abc.tar |
Adds some new commands
Diffstat (limited to 'main/filter.go')
-rw-r--r-- | main/filter.go | 8 |
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 } |