mirror of
https://github.com/safing/portbase
synced 2025-09-02 02:29:59 +00:00
20 lines
299 B
Go
20 lines
299 B
Go
package query
|
|
|
|
// Not negates the supplied condition.
|
|
func Not(c Condition) Condition {
|
|
return ¬Cond{
|
|
notC: c,
|
|
}
|
|
}
|
|
|
|
type notCond struct {
|
|
notC Condition
|
|
}
|
|
|
|
func (c *notCond) complies(f Fetcher) bool {
|
|
return !c.notC.complies(f)
|
|
}
|
|
|
|
func (c *notCond) check() error {
|
|
return c.notC.check()
|
|
}
|