Documentation
¶
Index ¶
- Constants
- func Decode(out, in any) error
- func DecodeJSON(out, in any) error
- func DecodeWithConfig(dc *mapstructure.DecoderConfig, in any) error
- func NewDecoderConfig(out any, opts ...Option) *mapstructure.DecoderConfig
- type DM
- func (dm *DM) Data() map[string]any
- func (dm *DM) Decode(out any, keys ...string) error
- func (dm *DM) DecodeJSON(out any, keys ...string) error
- func (dm *DM) DecodeWithConfig(dc *mapstructure.DecoderConfig, keys ...string) error
- func (dm *DM) Get(keys ...string) (any, error)
- func (dm *DM) LoadFile(name string) error
- func (dm *DM) LoadJSON(data []byte) error
- func (dm *DM) LoadJSONFile(name string) error
- func (dm *DM) LoadYAML(data []byte) error
- func (dm *DM) LoadYAMLFile(name string) error
- func (dm *DM) Merge(in map[string]any) error
- func (dm *DM) Name() string
- func (dm *DM) Set(value any, keys ...string) error
- type Option
Constants ¶
View Source
const (
ErrKeyNotFound = failure.Sentinel("key not found")
)
Variables ¶
This section is empty.
Functions ¶
func DecodeJSON ¶
func DecodeWithConfig ¶
func DecodeWithConfig(dc *mapstructure.DecoderConfig, in any) error
func NewDecoderConfig ¶
func NewDecoderConfig(out any, opts ...Option) *mapstructure.DecoderConfig
Types ¶
type DM ¶
type DM struct {
// contains filtered or unexported fields
}
func (*DM) DecodeWithConfig ¶
func (dm *DM) DecodeWithConfig(dc *mapstructure.DecoderConfig, keys ...string) error
func (*DM) LoadJSONFile ¶
func (*DM) LoadYAMLFile ¶
type Option ¶
type Option func(*mapstructure.DecoderConfig)
func WithDefaults ¶
func WithDefaults() Option
Click to show internal directories.
Click to hide internal directories.