Skip to content
Implementation for Python's ConfigParser ini file format in Go.
Go
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
configparser
.gitignore
README.md

README.md

ConfigParser for Go

Implementation of a parser of Python's ConfigParser file format for Go.

The format is similar to win INI's, but key/value pairs can be separated by either ' or :.

Whitespace is trimmed, but newlines are preserved.

Example usage:

package main

import (
    "fmt"
    "github.com/mikelikespie/configparser-go/configparser"
)

func main() {
    // configparser.Parse and configparser.ParseFile also work
    config, _ := configparser.ParseString(`[Hello]
foo = bar
boo : baz`)

    foo := config["Hello"]["foo"]

    fmt.Println(foo)
}
Something went wrong with that request. Please try again.