Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
Parse reads text from the specified `io.Reader` and parses it into a two-level map. The top level of the map is the section name, and the second layer map is the key-value map for that section.
config, err := goini.Parse(someReader) if err != nil { panic(err) } for sectionName, sectionMap := range config { fmt.Printf("[%s]\n", sectionName) for key, value := range sectionMap { fmt.Printf("%s = %s\n", key, value) } }
func ParseFile ¶
ParseFile reads text from the file specified by the `pathname` and parses it into a two-level map. The top level of the map is the section name, and the second layer map is the key-value map for that section.
config, err := goini.ParseFile(configPathname) if err != nil { panic(err) } for sectionName, sectionMap := range config { fmt.Printf("[%s]\n", sectionName) for key, value := range sectionMap { fmt.Printf("%s = %s\n", key, value) } }
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.