Documentation
¶
Index ¶
- Variables
- type Config
- func (c *Config) Bool(name string, idx int) (bool, error)
- func (c *Config) Child(name string, idx int) (*Config, error)
- func (c *Config) CountField(name string) (int, error)
- func (c *Config) Float(name string, idx int) (float64, error)
- func (c *Config) GetFields() []string
- func (c *Config) HasField(name string) bool
- func (c *Config) Int(name string, idx int) (int64, error)
- func (c *Config) Merge(from interface{}, options ...Option) error
- func (c *Config) SetBool(name string, idx int, value bool)
- func (c *Config) SetChild(name string, idx int, value *Config)
- func (c *Config) SetFloat(name string, idx int, value float64)
- func (c *Config) SetInt(name string, idx int, value int64)
- func (c *Config) SetString(name string, idx int, value string)
- func (c *Config) String(name string, idx int) (string, error)
- func (c *Config) Unpack(to interface{}, options ...Option) error
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissing = errors.New("field name missing") ErrTypeNoArray = errors.New("field is no array") ErrTypeMismatch = errors.New("type mismatch") ErrKeyTypeNotString = errors.New("key must be a string") ErrIndexOutOfRange = errors.New("index out of range") ErrPointerRequired = errors.New("requires pointer for unpacking") ErrArraySizeMistach = errors.New("Array size mismatch") ErrExpectedObject = errors.New("expected object") ErrNilConfig = errors.New("config is nil") ErrNilValue = errors.New("unexpected nil value") ErrTODO = errors.New("TODO - implement me") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) CountField ¶
number of elements for this field. If config value is a list, returns number of elements in list
Click to show internal directories.
Click to hide internal directories.