Documentation ¶
Index ¶
- type Config
- func (cfg *Config) Any(v any) bool
- func (cfg *Config) AnyE(v any) error
- func (cfg *Config) Array(v any, tag ...string) bool
- func (cfg *Config) ArrayE(v any, tag ...string) error
- func (cfg *Config) Load() *Config
- func (cfg *Config) Map(v any) bool
- func (cfg *Config) MapE(v any) error
- func (cfg *Config) Slice(v any) bool
- func (cfg *Config) SliceE(v any) error
- func (cfg *Config) Struct(v any) bool
- func (cfg *Config) StructE(v any) error
- func (cfg *Config) Validate(out any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Tag // tag scope to valid struct field // `tag:"k1:v1;k2:v2;k3:v3"` Tag string // OnErrorStop // stop check immediately when tag error or valid error // return false when call Any, Array, Map, Slice, Struct // return error when call Any, ArrayE, MapE, SliceE, StructE OnErrorStop bool // IgnoreTagError // skip check field when tag format error, raise no error IgnoreTagError bool // IndirectValue // can apply field tag validator to pointer,any value IndirectValue bool // AllowEmbedStruct AllowEmbedStruct bool // AllowUnexported AllowUnexported bool // FloatPrecision // set default precision by -1 // for example: set 6 is after point six bit FloatPrecision int // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.