Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is a type to mirror viper.Config, but with better custom type support. This stems from the closure of github.com/spf13/viper#271.
func New ¶
New returns a Config for the given Config file name (without extension) and list of valid directories for that file to be found in.
func (*Config) Get ¶
Get gets the value at k. If the default value has been set using SetDefault, the data will be converted to the same type as the default value.
func (*Config) SetDefault ¶
SetDefault sets the type and the default value for the data at k.
type Opener ¶
type Opener interface { Open(path string) (f io.ReadCloser, err error) Create(path string) (f io.WriteCloser, err error) }
Opener is a type which can read files.
Click to show internal directories.
Click to hide internal directories.