Versions in this module Expand all Collapse all v1 v1.0.0 Nov 11, 2021 Changes in this version + const DEFAULT_SECTION + var LineBreak = "\n" + func SaveConfigData(c *ConfigFile, out io.Writer) (err error) + func SaveConfigFile(c *ConfigFile, filename string) (err error) + type ConfigFile struct + BlockMode bool + func LoadConfigFile(fileName string, moreFiles ...string) (c *ConfigFile, err error) + func LoadFromData(data []byte) (c *ConfigFile, err error) + func LoadFromReader(in io.Reader) (c *ConfigFile, err error) + func (c *ConfigFile) AppendFiles(files ...string) error + func (c *ConfigFile) Bool(section, key string) (bool, error) + func (c *ConfigFile) DeleteKey(section, key string) bool + func (c *ConfigFile) DeleteSection(section string) bool + func (c *ConfigFile) Float64(section, key string) (float64, error) + func (c *ConfigFile) GetKeyComments(section, key string) (comments string) + func (c *ConfigFile) GetKeyList(section string) []string + func (c *ConfigFile) GetSection(section string) (map[string]string, error) + func (c *ConfigFile) GetSectionComments(section string) (comments string) + func (c *ConfigFile) GetSectionList() []string + func (c *ConfigFile) GetValue(section, key string) (string, error) + func (c *ConfigFile) Int(section, key string) (int, error) + func (c *ConfigFile) Int64(section, key string) (int64, error) + func (c *ConfigFile) MustBool(section, key string, defaultVal ...bool) bool + func (c *ConfigFile) MustFloat64(section, key string, defaultVal ...float64) float64 + func (c *ConfigFile) MustInt(section, key string, defaultVal ...int) int + func (c *ConfigFile) MustInt64(section, key string, defaultVal ...int64) int64 + func (c *ConfigFile) MustValue(section, key string, defaultVal ...string) string + func (c *ConfigFile) MustValueArray(section, key, delim string) []string + func (c *ConfigFile) MustValueRange(section, key, defaultVal string, candidates []string) string + func (c *ConfigFile) MustValueSet(section, key string, defaultVal ...string) (string, bool) + func (c *ConfigFile) Reload() (err error) + func (c *ConfigFile) ReloadData(in io.Reader) (err error) + func (c *ConfigFile) SetKeyComments(section, key, comments string) bool + func (c *ConfigFile) SetPrettyFormat(pretty bool) + func (c *ConfigFile) SetSectionComments(section, comments string) bool + func (c *ConfigFile) SetValue(section, key, value string) bool + type GetError struct + Name string + Reason ParseError + func (err GetError) Error() string + type ParseError int + const ERR_BLANK_SECTION_NAME + const ERR_COULD_NOT_PARSE + const ERR_KEY_NOT_FOUND + const ERR_SECTION_NOT_FOUND + type ReadError struct + Content string + Reason ParseError + func (err ReadError) Error() string