support exclude filter #3 (category)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b7df76b76e
commit
8a5541ece4
1 changed files with 8 additions and 0 deletions
8
tree.go
8
tree.go
|
@ -104,6 +104,14 @@ func (t Tree) Filter(filter map[string][]string) (Tree, bool) {
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if negative && option == "category" {
|
||||||
|
for _, category := range f.Category {
|
||||||
|
if category == value {
|
||||||
|
exclude = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
if !negative && strings.Contains(f.Meta[option], value) {
|
if !negative && strings.Contains(f.Meta[option], value) {
|
||||||
addFile = true
|
addFile = true
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue