Documentation ¶
Index ¶
- type Config
- func (c *Config) GetBool(key string, opts ...bool) bool
- func (c *Config) GetFloat(key string, opts ...float64) float64
- func (c *Config) GetInt(key string, opts ...int) int
- func (c *Config) GetIntArray(key string) []int
- func (c *Config) GetMapConfig(key string) map[string]Config
- func (c *Config) GetMapFromArray(key string) map[string]interface{}
- func (c *Config) GetString(key string, opts ...string) string
- func (c *Config) GetStringArray(key string) []string
- func (c *Config) GetSubConfig(key string) *Config
- func (c *Config) GetValue(key string, target interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func NewConfigWithFile ¶
func NewConfigWithString ¶
func (*Config) GetIntArray ¶
func (*Config) GetMapConfig ¶
For config as below: keys:
key1: value: xxxxxx key2: value: xxxxxx
we start with the parent key "keys", and locate the subkey "key1" "key2"..., then concatenate to uset the fullpath to get the sub config
func (*Config) GetMapFromArray ¶
For config as below: keys:
- key1: value: xxxxxx
- key2: value: xxxxxx
we start with the parent key "keys", and locate the subkey "key1" "key2"..., then concatenate to uset the fullpath to get the sub config
func (*Config) GetStringArray ¶
func (*Config) GetSubConfig ¶
Click to show internal directories.
Click to hide internal directories.