Versions in this module Expand all Collapse all v1 v1.0.2 Mar 14, 2024 v1.0.1 Mar 14, 2024 Changes in this version + type JSONConfig struct + func (js *JSONConfig) Parse(filename string) (config.Configer, error) + func (js *JSONConfig) ParseData(data []byte) (config.Configer, error) + type JSONConfigContainer struct + func (c *JSONConfigContainer) Bool(key string) (bool, error) + func (c *JSONConfigContainer) DIY(key string) (v interface{}, err error) + func (c *JSONConfigContainer) DefaultBool(key string, defaultVal bool) bool + func (c *JSONConfigContainer) DefaultFloat(key string, defaultVal float64) float64 + func (c *JSONConfigContainer) DefaultInt(key string, defaultVal int) int + func (c *JSONConfigContainer) DefaultInt64(key string, defaultVal int64) int64 + func (c *JSONConfigContainer) DefaultString(key string, defaultVal string) string + func (c *JSONConfigContainer) DefaultStrings(key string, defaultVal []string) []string + func (c *JSONConfigContainer) Float(key string) (float64, error) + func (c *JSONConfigContainer) GetSection(section string) (map[string]string, error) + func (c *JSONConfigContainer) Int(key string) (int, error) + func (c *JSONConfigContainer) Int64(key string) (int64, error) + func (c *JSONConfigContainer) OnChange(key string, fn func(value string)) + func (c *JSONConfigContainer) SaveConfigFile(filename string) (err error) + func (c *JSONConfigContainer) Set(key, val string) error + func (c *JSONConfigContainer) String(key string) (string, error) + func (c *JSONConfigContainer) Strings(key string) ([]string, error) + func (c *JSONConfigContainer) Sub(key string) (config.Configer, error) + func (c *JSONConfigContainer) Unmarshaler(prefix string, obj interface{}, opt ...config.DecodeOption) error