Versions in this module Expand all Collapse all v2 v2.1.0 Aug 22, 2022 Changes in this version + const NoSubsection + type Comment string + type Config struct + Comment *Comment + Includes Includes + Sections Sections + func New() *Config + func (c *Config) AddOption(section string, subsection string, key string, value string) *Config + func (c *Config) HasSection(name string) bool + func (c *Config) RemoveSection(name string) *Config + func (c *Config) RemoveSubsection(section string, subsection string) *Config + func (c *Config) Section(name string) *Section + func (c *Config) SetOption(section string, subsection string, key string, value string) *Config + type Decoder struct + func NewDecoder(r io.Reader) *Decoder + func (d *Decoder) Decode(config *Config) error + type Encoder struct + func NewEncoder(w io.Writer) *Encoder + func (e *Encoder) Encode(cfg *Config) error + type Include struct + Config *Config + Path string + type Includes []*Include + type Option struct + Key string + Value string + func (o *Option) IsKey(key string) bool + type Options []*Option + func (opts Options) Get(key string) string + func (opts Options) GetAll(key string) []string + func (opts Options) GoString() string + func (opts Options) Has(key string) bool + type Section struct + Name string + Options Options + Subsections Subsections + func (s *Section) AddOption(key string, value string) *Section + func (s *Section) HasOption(key string) bool + func (s *Section) HasSubsection(name string) bool + func (s *Section) IsName(name string) bool + func (s *Section) Option(key string) string + func (s *Section) OptionAll(key string) []string + func (s *Section) RemoveOption(key string) *Section + func (s *Section) RemoveSubsection(name string) *Section + func (s *Section) SetOption(key string, value string) *Section + func (s *Section) Subsection(name string) *Subsection + type Sections []*Section + func (s Sections) GoString() string + type Subsection struct + Name string + Options Options + func (s *Subsection) AddOption(key string, value string) *Subsection + func (s *Subsection) HasOption(key string) bool + func (s *Subsection) IsName(name string) bool + func (s *Subsection) Option(key string) string + func (s *Subsection) OptionAll(key string) []string + func (s *Subsection) RemoveOption(key string) *Subsection + func (s *Subsection) SetOption(key string, value ...string) *Subsection + type Subsections []*Subsection + func (s Subsections) GoString() string