A simple config loader written in go.
- Unicode support (uses go runes, not bytes)
- Very efficient (implementation based on a state machine)
Still a prototype.
# a comment
key1 = value1
key2=value2 # another comment
#eof
import "github.com/cbuschka/config4go"
func doIt() (map[string]string, error) {
configReader := NewConfigReader()
config, err := configReader.ReadConfigFromFile("example.conf")
if err != nil {
return nil, err
}
return config.ToMap(), nil
}
Config4Go is an open source project, and contributions are welcome! Feel free to raise an issue or submit a pull request.
Copyright (c) 2016 by Cornelius Buschka.