Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeTOML ¶
DecodeTOML decodes toml from r in to v. Requires strict field matches and returns full toml.StrictMissingError details.
func NamedMultiErrorList ¶
Types ¶
type ErrInvalid ¶
func NewErrDuplicate ¶
func NewErrDuplicate(name string, value any) ErrInvalid
NewErrDuplicate returns an ErrInvalid with a standard duplicate message.
func (ErrInvalid) Error ¶
func (e ErrInvalid) Error() string
type ErrMissing ¶
func (ErrMissing) Error ¶
func (e ErrMissing) Error() string
type ErrOverride ¶
type ErrOverride struct {
Name string
}
func (ErrOverride) Error ¶
func (e ErrOverride) Error() string
type UniqueStrings ¶
type UniqueStrings map[string]struct{}
UniqueStrings is a helper for tracking unique values in string form.
func (UniqueStrings) IsDupe ¶
func (u UniqueStrings) IsDupe(s *string) bool
IsDupe returns true if the set already contains the string, otherwise false. Non-nil/empty strings are added to the set.
type Validated ¶
type Validated interface { // ValidateConfig returns nil if the config is valid, otherwise an error describing why it is invalid. // // For implementations: // - Use package multierr to accumulate all errors, rather than returning the first encountered. // - If an anonymous field also implements ValidateConfig(), it must be called explicitly! ValidateConfig() error }
Validated configurations impose constraints that must be checked.
Click to show internal directories.
Click to hide internal directories.