Documentation ¶
Index ¶
- func Parse(src io.Reader) (map[string]interface{}, error)
- type Config
- func (k *Config) Get(key string) interface{}
- func (k *Config) GetBool(key string, def ...bool) bool
- func (k *Config) GetDefault(key string, def interface{}) interface{}
- func (k *Config) GetFloat64(key string, def ...float64) float64
- func (k *Config) GetInt(key string, def ...int) int
- func (k *Config) GetInt64(key string, def ...int) int64
- func (k *Config) GetString(key string, def ...string) string
- func (k *Config) Set(key string, value interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config - This will store all the configurations we have.
func NewFromFile ¶
NewFromFile - read a file and return the configuration.
func NewFromMap ¶
NewFromMap return configuration from kira.Map type
func (*Config) GetDefault ¶
GetDefault return value by key, if the value empty set a default value.
func (*Config) GetFloat64 ¶
GetFloat64 - return config as float64 type.
Click to show internal directories.
Click to hide internal directories.