Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDirective = errors.New("malformed directive")
ErrDirective indicates a malformed or misapplied dv8 directive: a bug in the tag, not in the data.
Functions ¶
Types ¶
type Directive ¶ added in v0.4.0
type Directive struct {
Prefixes []string // "each" and "key" prefixes, outermost first
Name string // "notzero", "trim", "tolower", "toupper", "len", "val", "oneof", "regexp", "default", "delegate", "on", "-", or the verbatim text of an unrecognized directive
Operator string // the comparison operator of a "len" or "val" directive
Value string // the operand: the bound, pattern, set of values, default value, or field name
}
Directive is one parsed directive of a dv8 struct tag.
Click to show internal directories.
Click to hide internal directories.