package
0.8.3
Repository: https://github.com/lalamove/konfig.git
Documentation: pkg.go.dev

# README

KV Parser

KV parser is a key value parser to parse an io.Reader's content of key/values with a configurable separator and add it into a konfig.Store.

Ex:

bar=foo
foo=bar

Will add the following key/value to the config

"foo" => "bar"
"bar" => "foo"

Usage

func main() {
	var v = konfig.Values{}
	var p = kpkeyval.New(&kpkeyval.Config{})

	p.Parse(strings.NewReader(
		"bar=foo\nfoo=bar",
	), v)

	fmt.Println(v) // map[bar:foo foo:bar]
}

# Functions

New creates a new parser with the given config.

# Constants

DefaultSep is the default key value separator.

# Variables

ErrInvalidConfigFileFormat is the error returned when a problem is encountered when parsing the config file.

# Structs

Config is the configuration of the key value parser.
Parser implements fileloader.Parser It parses a file of key/values with a specific separator and stores in the konfig.Store.