Skip to content

Implementation for Python's ConfigParser ini file format in Go.

Notifications You must be signed in to change notification settings

mikelikespie/configparser-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

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

About

Implementation for Python's ConfigParser ini file format in Go.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages