Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is a config provider that reads from a JSON file or io.Reader and scans into the specified struct.
func New ¶
func New() *Provider
New is the default way to create a json Provider. The entire file is read when New is called and a reader created from the buffer. If there is an error reading the file it is stored in Provider and returned during Parse.
func WithPath ¶
WithPath allows for a non-standard configuration file to be specified at runtime. If there is an error reading the file it is stored in Provider and returned during Parse.
func WithReader ¶
WithReader accepts a reader and returns a json Provider.
Click to show internal directories.
Click to hide internal directories.