Documentation ¶
Index ¶
- Variables
- type ConfigMap
- func (c ConfigMap) AddKeyVal(section, key, val string)
- func (c ConfigMap) AddSection(section string)
- func (c ConfigMap) GetValue(section, key string) (val string, present bool)
- func (c ConfigMap) GetValueDefault(section, key, value string) (val string)
- func (c ConfigMap) ListSections() (sections []string)
- func (c ConfigMap) SectionInConfig(section string) bool
- func (c ConfigMap) SectionKeys(section string) (keys []string, present bool)
- func (c ConfigMap) WriteFile(filename string) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSection = "default"
DefaultSection is the label for the default ini file section.
Functions ¶
This section is empty.
Types ¶
type ConfigMap ¶
ConfigMap is shorthand for the type used as a config struct.
func ParseReader ¶
ParseReader reads a configuration from an io.Reader.
func (ConfigMap) AddSection ¶
AddSection creates a new section in the config map.
func (ConfigMap) GetValueDefault ¶
GetValueDefault retrieves the value from a key map if present, otherwise the default value.
func (ConfigMap) ListSections ¶
ListSections returns the list of sections in the config map.
func (ConfigMap) SectionInConfig ¶
SectionInConfig determines whether a section is in the configuration.
func (ConfigMap) SectionKeys ¶
SectionKeys returns the sections in the config map.
Click to show internal directories.
Click to hide internal directories.