Awesome Go

go-ini

CategoryConfiguration
SubcategoryConfiguration
Stars0

A Go package that marshals and unmarshals INI-files

About go-ini

PkgGoDev Go Report Card

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)

Frequently Asked Questions

What is go-ini?

go-ini is a Configuration library for the Go programming language. A Go package that marshals and unmarshals INI-files

How do I install go-ini?

Install go-ini with the Go module system using `go get subpop/go-ini`. Check the repository for the current installation instructions.

What category does go-ini belong to?

go-ini is listed under Configuration, specifically Configuration.

← Back to Configuration