Documentation
¶
Overview ¶
Package value provides types and functionality to work with config values.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Integer ¶
type Integer struct {
// contains filtered or unexported fields
}
Integer represents config integer value that can be configured with issue type level to alert on linting.
func NewInteger ¶
NewInteger creates a new config integer value with issue type level and exact value.
type Pattern ¶
type Pattern struct {
// contains filtered or unexported fields
}
Pattern represents config regexp pattern value that can be configured with issue type level to alert on linting.
func NewPattern ¶
NewPattern creates a new config regexp pattern value with issue type level and compiled regexp expression.
func (Pattern) Match ¶
Match defines whether the compiled regexp expression matches the provided string.
type Range ¶
type Range struct {
// contains filtered or unexported fields
}
Range represents an inclusive integer interval [min, max] that can be configured with an issue type level to alert on linting.
Range is immutable and validates its invariant on every method call: min must not be greater than max.
func (Range) Above ¶
Above reports whether n is strictly greater than the upper bound of the interval.
Panics if min is greater than max.
func (Range) Below ¶
Below reports whether n is strictly less than the lower bound of the interval.
Panics if min is greater than max.
func (Range) Empty ¶
Empty defines whether the range is empty (min and max are zeros).
Panics if min is greater than max.
func (Range) Fit ¶
Fit reports whether n falls within the inclusive interval [min, max].
Panics if min is greater than max.
type String ¶
type String struct {
// contains filtered or unexported fields
}
String represents config string value that can be configured with issue type level to alert on linting.
type Strings ¶
type Strings struct {
// contains filtered or unexported fields
}
Strings represents a config value that is a slice of strings that can be configured with an issue type level to alert on linting.
func NewStrings ¶
NewStrings creates a new config value from a slice of string values with the given issue type level.