Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
Parse parses a .ini style file in the form:
key1 = value key2 = value
Values that contain newlines ("\n" or "\r\n") need to be escaped by ending the previous line with a '\' character. Lines starting with ';' or '#' are considered comments and ignored. Empty lines are ignored too. If a non-empty, non-comment line does not contain a '=' an error is returned.
func ParseOptions ¶
ParseOptions works like Parse, but allows the caller to specify the strings which represent separators and comments. If opts is nil, this function acts like Parse. If Separator is empty, it defaults to '='. If Comment is empty, no lines are considered comments.
Types ¶
type Options ¶
type Options struct {
// Separator indicates the characters used as key-value separator.
// If empty, "=" is used.
Separator string
// Comment indicates the characters used to check if a line is a comment.
// Lines starting with any character in this string are ignored.
// If empty, all lines are parsed.
Comment string
}
Options specify the options for ParseOptions.
Click to show internal directories.
Click to hide internal directories.