Versions in this module Expand all Collapse all v1 v1.0.2 Mar 19, 2021 v1.0.1 Feb 21, 2021 Changes in this version + func ExpandValueEnv(value string) (realValue string) + func ExpandValueEnvForMap(m map[string]interface{}) map[string]interface + func ParseBool(val interface{}) (value bool, err error) + func Register(name string, adapter Config) + func ToString(x interface{}) string + type Config interface + Parse func(key string) (Configer, error) + ParseData func(data []byte) (Configer, error) + type Configer interface + Bool func(key string) (bool, error) + DIY func(key string) (interface{}, error) + DefaultBool func(key string, defaultVal bool) bool + DefaultFloat func(key string, defaultVal float64) float64 + DefaultInt func(key string, defaultVal int) int + DefaultInt64 func(key string, defaultVal int64) int64 + DefaultString func(key string, defaultVal string) string + DefaultStrings func(key string, defaultVal []string) []string + Float func(key string) (float64, error) + GetSection func(section string) (map[string]string, error) + Int func(key string) (int, error) + Int64 func(key string) (int64, error) + SaveConfigFile func(filename string) error + Set func(key, val string) error + String func(key string) string + Strings func(key string) []string + func NewConfig(adapterName, filename string) (Configer, error) + func NewConfigData(adapterName string, data []byte) (Configer, error) + func NewFakeConfig() Configer + type IniConfig struct + func (ini *IniConfig) Parse(name string) (Configer, error) + func (ini *IniConfig) ParseData(data []byte) (Configer, error) + type IniConfigContainer struct + func (c *IniConfigContainer) Bool(key string) (bool, error) + func (c *IniConfigContainer) DIY(key string) (v interface{}, err error) + func (c *IniConfigContainer) DefaultBool(key string, defaultval bool) bool + func (c *IniConfigContainer) DefaultFloat(key string, defaultval float64) float64 + func (c *IniConfigContainer) DefaultInt(key string, defaultval int) int + func (c *IniConfigContainer) DefaultInt64(key string, defaultval int64) int64 + func (c *IniConfigContainer) DefaultString(key string, defaultval string) string + func (c *IniConfigContainer) DefaultStrings(key string, defaultval []string) []string + func (c *IniConfigContainer) Float(key string) (float64, error) + func (c *IniConfigContainer) GetSection(section string) (map[string]string, error) + func (c *IniConfigContainer) Int(key string) (int, error) + func (c *IniConfigContainer) Int64(key string) (int64, error) + func (c *IniConfigContainer) SaveConfigFile(filename string) (err error) + func (c *IniConfigContainer) Set(key, value string) error + func (c *IniConfigContainer) String(key string) string + func (c *IniConfigContainer) Strings(key string) []string + type JSONConfig struct + func (js *JSONConfig) Parse(filename string) (Configer, error) + func (js *JSONConfig) ParseData(data []byte) (Configer, error) + type JSONConfigContainer struct + func (c *JSONConfigContainer) Bool(key string) (bool, error) + func (c *JSONConfigContainer) DIY(key string) (v interface{}, err error) + func (c *JSONConfigContainer) DefaultBool(key string, defaultval bool) bool + func (c *JSONConfigContainer) DefaultFloat(key string, defaultval float64) float64 + func (c *JSONConfigContainer) DefaultInt(key string, defaultval int) int + func (c *JSONConfigContainer) DefaultInt64(key string, defaultval int64) int64 + func (c *JSONConfigContainer) DefaultString(key string, defaultval string) string + func (c *JSONConfigContainer) DefaultStrings(key string, defaultval []string) []string + func (c *JSONConfigContainer) Float(key string) (float64, error) + func (c *JSONConfigContainer) GetSection(section string) (map[string]string, error) + func (c *JSONConfigContainer) Int(key string) (int, error) + func (c *JSONConfigContainer) Int64(key string) (int64, error) + func (c *JSONConfigContainer) SaveConfigFile(filename string) (err error) + func (c *JSONConfigContainer) Set(key, val string) error + func (c *JSONConfigContainer) String(key string) string + func (c *JSONConfigContainer) Strings(key string) []string