Documentation
¶
Overview ¶
Package config provides set of utilities for configuration parsing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Node ¶
type Node struct {
// Name is the first string at node's line.
Name string
// Args are any strings placed after the node name.
Args []string
// Children slice contains all children blocks if node is a block. Can be nil.
Children []Node
// Snippet indicates whether current parsed node is a snippet. Always false
// for all nodes returned from Read because snippets are expanded before it
// returns.
Snippet bool
// Macro indicates whether current parsed node is a macro. Always false
// for all nodes returned from Read because macros are expanded before it
// returns.
Macro bool
// File is the name of node's source file.
File string
// Line is the line number where the directive is located in the source file. For
// blocks this is the line where "block header" (name + args) resides.
Line int
}
Node struct describes a parsed configurtion block or a simple directive.
name arg0 arg1 {
children0
children1
}
Click to show internal directories.
Click to hide internal directories.