Return nip.Rule struct from Evaluate function in itemfilter (#14)

* Return Rule from –Evaluate in itemfilter

* Return Rule as the first argument
This commit is contained in:
13413j1j13j5315n13
2024-03-31 02:57:42 +02:00
committed by GitHub
parent d5d0f0a51f
commit 58b995842d
3 changed files with 7 additions and 6 deletions

View File

@@ -55,7 +55,8 @@ func (w *Watcher) Start(ctx context.Context) error {
d := w.gr.GetData()
for _, i := range d.Items.ByLocation(item.LocationGround) {
if !itemfilter.Evaluate(i, w.rules) {
_, match := itemfilter.Evaluate(i, w.rules)
if !match {
continue
}