Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type YamlParser ¶
type YamlParser struct { ParseAsDefaults bool // override default flags // contains filtered or unexported fields }
YamlParser is an argument parser for flags package but takes a YAML file instead of a standard INI. This allows it to parse configuration directives in a more complex / hierarhical manner. While the INI file only has two levels, a YAML file can have multiple. And every level can be either a value, a map or a list.
func NewYamlParser ¶
func NewYamlParser(p *flags.Parser) *YamlParser
NewYamlParser creates a new yaml parser for a given flags.Parser.
func (*YamlParser) ParseFile ¶
func (y *YamlParser) ParseFile(filename string) error
ParseFile parses flags from an yaml formatted file. The returned errors can be of the type flags.Error or flags.IniError.
Click to show internal directories.
Click to hide internal directories.