Documentation ¶
Overview ¶
Package sourcefile sources configuration from file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File implements config.Source to fetch values from a file.
type Option ¶
type Option func(f *File)
Option defines the function signature to apply options.
func FailOnUnknownFields ¶
func FailOnUnknownFields() Option
FailOnUnknownFields tells the file decoder to fail if a key exists in the file but not in the destination.
func MayNotExist ¶
func MayNotExist() Option
MayNotExist tells the file.Unmarshal function to return an error that implements IsTrivial when file does not exists.
Click to show internal directories.
Click to hide internal directories.