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

# README

properties

GoDoc

The properties package provides a config Decoder that unmarshals values from Properties formatted sources.

Example usage:

import (
    "fmt"

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

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

The following option can be applied to properties.NewDecoder:

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

# Functions

NewDecoder returns a properties decoder.
WithListSeparator sets the separator between slice fields in the properties 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.