Versions in this module Expand all Collapse all v1 v1.0.2 Jan 27, 2021 Changes in this version + const BlankSection + const CouldNotParse + const MaxDepthReached + const OptionNotFound + const SectionNotFound + var BoolStrings = map[string]bool + var DefaultSection = "default" + var DepthValues = 200 + type ConfigFile struct + func NewConfigFile() *ConfigFile + func ReadConfigBytes(conf []byte) (c *ConfigFile, err error) + func ReadConfigFile(fname string) (c *ConfigFile, err error) + func (c *ConfigFile) AddOption(section string, option string, value string) bool + func (c *ConfigFile) AddSection(section string) bool + func (c *ConfigFile) GetBool(section string, option string) (value bool, err error) + func (c *ConfigFile) GetFloat64(section string, option string) (value float64, err error) + func (c *ConfigFile) GetInt(section string, option string) (value int, err error) + func (c *ConfigFile) GetOptions(section string) (options []string, err error) + func (c *ConfigFile) GetRawString(section string, option string) (value string, err error) + func (c *ConfigFile) GetSections() (sections []string) + func (c *ConfigFile) GetString(section string, option string) (value string, err error) + func (c *ConfigFile) HasOption(section string, option string) bool + func (c *ConfigFile) HasSection(section string) bool + func (c *ConfigFile) Read(reader io.Reader) (err error) + func (c *ConfigFile) RemoveOption(section string, option string) bool + func (c *ConfigFile) RemoveSection(section string) bool + func (c *ConfigFile) Write(writer io.Writer, header string) (err error) + func (c *ConfigFile) WriteConfigBytes(header string) (config []byte) + func (c *ConfigFile) WriteConfigFile(fname string, perm uint32, header string) (err error) + type GetError struct + Option string + Reason int + Section string + Value string + ValueType string + func (err GetError) Error() string + type ReadError struct + Line string + Reason int + func (err ReadError) Error() string