MCPcopy
hub / github.com/perkeep/perkeep / IntConstraint

Struct IntConstraint

pkg/search/query.go:487–494  ·  view source on GitHub ↗

An IntConstraint specifies constraints on an integer.

Source from the content-addressed store, hash-verified

485
486// An IntConstraint specifies constraints on an integer.
487type IntConstraint struct {
488 // Min and Max are both optional and inclusive bounds.
489 // Zero means don't check.
490 Min int64 `json:"min,omitempty"`
491 Max int64 `json:"max,omitempty"`
492 ZeroMin bool `json:"zeroMin,omitempty"` // if true, min is actually zero
493 ZeroMax bool `json:"zeroMax,omitempty"` // if true, max is actually zero
494}
495
496func (c *IntConstraint) hasMin() bool { return c.Min != 0 || c.ZeroMin }
497func (c *IntConstraint) hasMax() bool { return c.Max != 0 || c.ZeroMax }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected