Documentation ¶
Index ¶
- Constants
- func SetDelimiters(d string)
- type Conf
- type Config
- func (c *Config) Get(k string) []*Entry
- func (c *Config) GetArg(k string) (string, error)
- func (config *Config) GetSection(name string) *Section
- func (config *Config) GetSections(name string) []*Section
- func (c *Config) Has(k string) bool
- func (c *Config) Merge(c1 *Config)
- func (c *Config) Missing(strs []string) []string
- func (c *Config) Parse(k string, f string, a ...interface{}) (int, error)
- func (c *Config) ParseFile(file string) error
- type Entry
- type Section
Constants ¶
View Source
const Global = "global"
Variables ¶
This section is empty.
Functions ¶
func SetDelimiters ¶
func SetDelimiters(d string)
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func ParseString ¶
func (*Config) GetSection ¶
Get the first section.
func (*Config) GetSections ¶
type Entry ¶
type Entry struct { Keyword string Filename string Lineno int Line string Args string // String following keyword Tokens []string }
Entry, one for each keyword.
type Section ¶
type Section struct { Name string // contains filtered or unexported fields }
The entries associated with a single section. The default section is named 'global'.
func (*Section) GetEntries ¶
Click to show internal directories.
Click to hide internal directories.