package
0.5.1
Repository: https://github.com/warthog618/config.git
Documentation: pkg.go.dev

# README

ini

GoDoc

The ini package provides a config Decoder that unmarshals values from INI formatted sources.

Example usage:

import (
    "fmt"

    "github.com/warthog618/config"
    "github.com/warthog618/config/blob"
    "github.com/warthog618/config/blob/decoder/ini"
    "github.com/warthog618/config/blob/loader/file"
)

func main() {
    c := config.New(blob.New(file.New("config.ini"), ini.NewDecoder()))
    s := c.MustGet("nested.string").String()
    fmt.Println("s:", s)
    // ....
}

The following option can be applied to ini.NewDecoder:

The WithListSeparator option provides a string used to split list values into elements. The default list separator is ",".

# Functions

NewDecoder returns a INI decoder.
WithListSeparator sets the separator between slice fields in the ini space.

# Structs

Decoder provides the Decoder API required by config.Source.

# Type aliases

Option is a function that modifies the Decdoder during construction, returning any error that may have occurred.