aboutsummaryrefslogtreecommitdiffstats
path: root/event/filter
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-13 03:36:45 +0800
committerobscuren <geffobscura@gmail.com>2015-01-13 03:36:45 +0800
commit34689cb3f369ad71164b81d0c05238d78cb67945 (patch)
tree63b0d68be8d3d719e3a46ef73d39bb49b6de9f5f /event/filter
parent8a1b51c716abdc21a8af43282e106d77eda3706b (diff)
downloadgo-tangerine-34689cb3f369ad71164b81d0c05238d78cb67945.tar.gz
go-tangerine-34689cb3f369ad71164b81d0c05238d78cb67945.tar.zst
go-tangerine-34689cb3f369ad71164b81d0c05238d78cb67945.zip
Added manual triggering of filters
Diffstat (limited to 'event/filter')
-rw-r--r--event/filter/filter.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/event/filter/filter.go b/event/filter/filter.go
index 9817d5782..ca767f413 100644
--- a/event/filter/filter.go
+++ b/event/filter/filter.go
@@ -68,3 +68,11 @@ out:
}
}
}
+
+func (self *Filters) Match(a, b Filter) bool {
+ return reflect.TypeOf(a) == reflect.TypeOf(b) && a.Compare(b)
+}
+
+func (self *Filters) Get(i int) Filter {
+ return self.watchers[i]
+}