Documentation ¶
Index ¶
- type Config
- func (conf *Config) Bool(key string) (bool, error)
- func (conf *Config) DIY(key string) (interface{}, error)
- func (conf *Config) DefaultBool(key string, defaultval bool) bool
- func (conf *Config) DefaultFloat(key string, defaultval float64) float64
- func (conf *Config) DefaultInt(key string, defaultval int) int
- func (conf *Config) DefaultInt64(key string, defaultval int64) int64
- func (conf *Config) DefaultString(key string, defaultval string) string
- func (conf *Config) DefaultStrings(key string, defaultval []string) []string
- func (conf *Config) Float(key string) (float64, error)
- func (conf *Config) FormatBeauty() []byte
- func (conf *Config) GetSection(sectionName string) (map[string]string, error)
- func (conf *Config) Int(key string) (int, error)
- func (conf *Config) Int64(key string) (int64, error)
- func (conf *Config) SaveConfigFile(filename string) error
- func (conf *Config) Set(key, value string) error
- func (conf *Config) String(key string) string
- func (conf *Config) Strings(key string) []string
- type Line
- type Section
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config ini config
func NewConfigFromData ¶
NewConfigFromData create ini config from data.
func (*Config) DefaultBool ¶
DefaultBool returns the boolean value for a given key. if err != nil return defaultval
func (*Config) DefaultFloat ¶
DefaultFloat returns float64 value for a given key. if err != nil return defaultval
func (*Config) DefaultInt ¶
DefaultInt returns the integer value for a given key. if err != nil return defaultval
func (*Config) DefaultInt64 ¶
DefaultInt64 returns the int64 value for a given key. if err != nil return defaultval
func (*Config) DefaultString ¶
DefaultString returns the string value for a given key. if err != nil return defaultval
func (*Config) DefaultStrings ¶
DefaultStrings returns the []string value for a given key. if err != nil return defaultval
func (*Config) FormatBeauty ¶
FormatBeauty format beauty style
func (*Config) GetSection ¶
GetSection returns map for given section
func (*Config) SaveConfigFile ¶
SaveConfigFile save config to file.