~spc/go-ini

Moved to https://github.com/subpop/go-ini
79fde341 — Link Dupont 9 months ago
docs: add package deprecation to go.mod and README
b07add64 — Link Dupont 9 months ago
refactor(tests): use Buffer.String() comparsion
871e47a0 — dependabot[bot] 9 months ago
Bump github.com/google/go-cmp from 0.5.5 to 0.6.0

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~spc/go-ini
read/write
git@git.sr.ht:~spc/go-ini

You can also use your local clone with git send-email.

PkgGoDev Go Report Card

#⚠️ This package has moved: use github.com/subpop/go-ini instead. ⚠️

#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)