Versions in this module Expand all Collapse all v0 v0.0.1 Apr 20, 2021 Changes in this version + var ErrUnsupportedFileFormat = errors.New("暂不支持该配置文件格式。") + func Get(keys ...string) interface + func GetArray(keys ...string) []interface + func GetBool(keys ...string) bool + func GetFloat64(keys ...string) float64 + func GetInt(keys ...string) int + func GetInt64(keys ...string) int64 + func GetMap(keys ...string) map[string]interface + func GetString(keys ...string) string + func GetStringArray(keys ...string) []string + func GetStringMap(keys ...string) map[string]string + func GetUint64(keys ...string) uint64 + func LoadFile(file string) error + func LoadMemory(config, t string) error + func LoadOsEnv() error + func Scan(keys []string, value interface{}) error + func Set(key string, value interface{}) + func SetPath(keys []string, value interface{}) + type Config interface + func New() Config + type Getter interface + Get func(keys ...string) interface{} + GetArray func(keys ...string) []interface{} + GetBool func(keys ...string) bool + GetFloat64 func(keys ...string) float64 + GetInt func(keys ...string) int + GetInt64 func(keys ...string) int64 + GetMap func(keys ...string) map[string]interface{} + GetString func(keys ...string) string + GetStringArray func(keys ...string) []string + GetStringMap func(keys ...string) map[string]string + GetUint64 func(keys ...string) uint64 + Scan func(keys []string, value interface{}) error + type JSONConfig struct + func (c *JSONConfig) Get(keys ...string) interface{} + func (c *JSONConfig) GetArray(keys ...string) []interface{} + func (c *JSONConfig) GetBool(keys ...string) bool + func (c *JSONConfig) GetFloat64(keys ...string) float64 + func (c *JSONConfig) GetInt(keys ...string) int + func (c *JSONConfig) GetInt64(keys ...string) int64 + func (c *JSONConfig) GetMap(keys ...string) map[string]interface{} + func (c *JSONConfig) GetString(keys ...string) string + func (c *JSONConfig) GetStringArray(keys ...string) []string + func (c *JSONConfig) GetStringMap(keys ...string) map[string]string + func (c *JSONConfig) GetUint64(keys ...string) uint64 + func (c *JSONConfig) LoadFile(file string) error + func (c *JSONConfig) LoadMemory(config, t string) error + func (c *JSONConfig) LoadOsEnv() error + func (c *JSONConfig) Scan(keys []string, value interface{}) error + func (c *JSONConfig) Set(key string, value interface{}) + func (c *JSONConfig) SetPath(keys []string, value interface{}) + type Loader interface + LoadFile func(file string) error + LoadMemory func(config, t string) error + LoadOsEnv func() error + type Setter interface + Set func(key string, value interface{}) + SetPath func(keys []string, value interface{})