Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend that loads a configuration from a file. It supports json and yaml formats.
func NewBackend ¶
NewBackend creates a configuration loader that loads from a file. The content will get decoded based on the file extension. If optional parameter is set to true, calling Unmarshal won't return an error if the file doesn't exist.
func NewOptionalBackend ¶
NewOptionalBackend implementation is exactly the same as NewBackend except that if the file is not found, backend.ErrNotFound will be returned.
Click to show internal directories.
Click to hide internal directories.