Discover Packages
github.com/omeid/uconfig
plugins
file
package
Version:
v0.7.0
Opens a new window with list of versions in this module.
Published: Mar 14, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 5
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package file provides config file support for uconfig
NewReader returns a uconfig plugin that unmarshals the content of
the provided io.Reader into the config using the provided unmarshal
function. The src will be closed if it is an io.Closer.
type Config struct {
Optional bool
}
Config describes the options required for a file.
Files represents a set of file paths and the appropriate
unmarshal function for the given file.
Plugins constructs a slice of Plugin from the Files list of
paths and unmarshal functions.
type Unmarshal func(src []byte , v interface{}) error
Unmarshal is any function that maps the source bytes to the provided
config.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.