1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-05-10 06:29:08 -04:00

predicate.Not

This commit is contained in:
Darien Raymond
2016-10-11 12:30:53 +02:00
parent f3a83c57ab
commit da9f1a8013
2 changed files with 16 additions and 6 deletions

View File

@@ -23,3 +23,9 @@ func Any(predicates ...Predicate) Predicate {
return false
}
}
func Not(predicate Predicate) Predicate {
return func() bool {
return !predicate()
}
}