support exclude filter #3 (category)
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Arnas Udovic 2024-08-09 12:43:20 +03:00
parent b7df76b76e
commit 8a5541ece4

View file

@ -104,6 +104,14 @@ func (t Tree) Filter(filter map[string][]string) (Tree, bool) {
}
continue
}
if negative && option == "category" {
for _, category := range f.Category {
if category == value {
exclude = true
}
}
continue
}
if !negative && strings.Contains(f.Meta[option], value) {
addFile = true
continue