Documentation ¶
Index ¶
- Constants
- func FileExists(name string) bool
- type Config
- func (receiver *Config) AddPath(path string, morePath ...string)
- func (receiver *Config) Bool(key string) (bool, bool)
- func (receiver *Config) DefaultBool(key string, defaultVal bool) bool
- func (receiver *Config) DefaultInt(key string, defaultVal int) int
- func (receiver *Config) DefaultInt64(key string, defaultVal int64) int64
- func (receiver *Config) DefaultString(key string, defaultVal string) string
- func (receiver *Config) Get(key string) (interface{}, bool)
- func (receiver *Config) GetCurrentCache() map[string]map[string]interface{}
- func (receiver *Config) Int(key string) (int, bool)
- func (receiver *Config) Int64(key string) (int64, bool)
- func (receiver *Config) SetDefaultSplitStr(str string)
- func (receiver *Config) SetMaxFileWatch(num int8)
- func (receiver *Config) SetReadOrder(first ReadOrder, more ...ReadOrder)
- func (receiver *Config) String(key string) (string, bool)
- func (receiver *Config) StringList(key string) ([]string, error)
- func (receiver *Config) WatchChange(isOpen bool)
- type ReadOrder
Constants ¶
View Source
const ( PkgName = "配置读取" PkgVersion = "v1.0.0" )
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
FileExists reports whether the named file or directory exists.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func NewConfigWithPath ¶
func (*Config) DefaultInt64 ¶
func (*Config) DefaultString ¶
func (*Config) GetCurrentCache ¶
func (*Config) SetDefaultSplitStr ¶
func (*Config) SetMaxFileWatch ¶
func (*Config) SetReadOrder ¶
func (*Config) WatchChange ¶
Click to show internal directories.
Click to hide internal directories.