package
Version:
v0.5.1
Opens a new window with list of versions in this module.
Published: Dec 13, 2022
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
toml
The toml package provides a config Decoder that unmarshals values from TOML formatted sources.
Example usage:
import (
"fmt"
"github.com/warthog618/config"
"github.com/warthog618/config/blob"
"github.com/warthog618/config/blob/decoder/toml"
"github.com/warthog618/config/blob/loader/file"
)
func main() {
c := config.New(blob.New(file.New("config.toml"), toml.NewDecoder()))
s := c.MustGet("nested.string").String()
fmt.Println("s:", s)
// ....
}
Documentation
¶
Package toml provides a TOML format decoder for config.
Decoder provides the Decoder API required by config.Source.
NewDecoder returns a TOML decoder.
Decode unmarshals an array of bytes containing TOML text.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.