📚 go-ini - Awesome Go Library for Configuration
A Go package that marshals and unmarshals INI-files.
🏷️ Configuration
📂 Libraries for configuration parsing.
⭐ 14 stars
Detailed Description of go-ini
go-ini
A Go package that encodes and decodes INI-files.
Usage
data := `[settings]
username=root
password=swordfish
shell[unix]=/bin/sh
shell[win32]=PowerShell.exe
`
var config struct {
Settings struct {
Username string `ini:"username"`
Password string `ini:"password"`
Shell map[string]string `ini:"shell"`
} `ini:"settings"`
}
if err := ini.Unmarshal(data, &config); err != nil {
fmt.Println(err)
}
fmt.Println(config)