Documentation ¶
Index ¶
- Variables
- func BoolOrDefault(path string, def bool) bool
- func Float64OrDefault(path string, def float64) float64
- func Get(path string) (interface{}, error)
- func GetDefault(path string, def interface{}) interface{}
- func GetPath(path []string) (interface{}, error)
- func HasGlobalConfig(code string) bool
- func IntOrDefault(path string, def int) int
- func SetGlobalConfig(code string, conf Config)
- func String(path string) string
- func StringOrDefault(path string, def string) string
- type Config
- func From(c interface{}) (Config, error)
- func FromData(data []byte, dtype string) (conf Config, err error)
- func FromFile(filename, ftype string) (Config, error)
- func FromQuick(c interface{}) (Config, error)
- func Global() Config
- func GlobalByFile(filename, ftype string) (Config, error)
- func GlobalByName(code string) Config
- func New() Config
- func Set(path string, value interface{}) Config
- func SetGlobalByFile(code, filename, ftype string) (Config, error)
- func SetPath(path []string, value interface{}) Config
- func (conf Config) BoolOrDefault(path string, def bool) bool
- func (conf Config) Float64OrDefault(path string, def float64) float64
- func (conf Config) Get(path string) (interface{}, error)
- func (conf Config) GetDefault(path string, def interface{}) interface{}
- func (conf Config) GetPath(path []string) (interface{}, error)
- func (conf Config) IntOrDefault(path string, def int) int
- func (conf Config) JSON() ([]byte, error)
- func (conf Config) JSONPrettify() ([]byte, error)
- func (conf Config) Prepare(escLeft, escRight string)
- func (conf Config) Set(path string, value interface{}) Config
- func (conf Config) SetPath(fullpath []string, value interface{}) Config
- func (conf Config) String(path string) string
- func (conf Config) StringOrDefault(path string, def string) string
- func (conf Config) Update(conf2 Config) Config
- func (conf Config) UpdateByPath(path string) Config
- type ConfigArr
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func BoolOrDefault ¶
func Float64OrDefault ¶
func GetDefault ¶
func GetDefault(path string, def interface{}) interface{}
func HasGlobalConfig ¶
func IntOrDefault ¶
func SetGlobalConfig ¶
func StringOrDefault ¶
Types ¶
type Config ¶
type Config map[string]interface{}
func GlobalByFile ¶
func GlobalByName ¶
func SetGlobalByFile ¶
func (Config) Float64OrDefault ¶
func (Config) GetDefault ¶
func (Config) JSONPrettify ¶
func (Config) UpdateByPath ¶
Click to show internal directories.
Click to hide internal directories.