Documentation
¶
Index ¶
- Constants
- type Config
- type OptionsMap
- func (o *OptionsMap) Bool(k string) (bool, error)
- func (o *OptionsMap) Float64(k string) (float64, error)
- func (o *OptionsMap) GetBool(k string) (bool, error)
- func (o *OptionsMap) GetFloat(k string) (float64, error)
- func (o *OptionsMap) GetInt(k string) (int, error)
- func (o *OptionsMap) GetString(k string) (string, error)
- func (o *OptionsMap) Int(k string) (int, error)
- func (o *OptionsMap) Len() int
- func (o *OptionsMap) String(k string) (string, error)
Constants ¶
View Source
const ( COMMENT = ';' SEPARATOR = '=' ERR_KEY_NOT_EXISTS = "Key not exist" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is the representation of configuration settings.
func LoadConfig ¶
func (*Config) GetSection ¶
func (cfg *Config) GetSection(s string) *OptionsMap
func (*Config) GetSectionList ¶
type OptionsMap ¶
type OptionsMap struct {
// contains filtered or unexported fields
}
func (*OptionsMap) Float64 ¶
func (o *OptionsMap) Float64(k string) (float64, error)
synonym for GetFloat
func (*OptionsMap) GetBool ¶
func (o *OptionsMap) GetBool(k string) (bool, error)
Get value as a bool, uses this mapping from string to bool "t": true, "true": true, "y": true, "yes": true, "on": true, "1": true, "f": false, "false": false, "n": false, "no": false, "off": false, "0": false,
func (*OptionsMap) GetFloat ¶
func (o *OptionsMap) GetFloat(k string) (float64, error)
Get value as float64
func (*OptionsMap) GetString ¶
func (o *OptionsMap) GetString(k string) (string, error)
Get value as a string, remove quotes if value was quoted into " or '
func (*OptionsMap) Len ¶
func (o *OptionsMap) Len() int
Click to show internal directories.
Click to hide internal directories.