Documentation
¶
Index ¶
- Variables
- func Bool(keys ...string) bool
- func BoolOr(defaultVal bool, keys ...string) bool
- func Exists(keys ...string) bool
- func Float(keys ...string) float64
- func FloatOr(defaultVal float64, keys ...string) float64
- func Int(keys ...string) int
- func IntOr(defaultVal int, keys ...string) int
- func Interface(keys ...string) interface{}
- func Map(keys ...string) map[string]interface{}
- func MustExist(key string)
- func Reset()
- func String(keys ...string) string
- func StringOr(defaultVal string, keys ...string) string
- func StringSlice(keys ...string) []string
- func StringSliceOr(defaultVal []string, keys ...string) []string
- func Struct(addr interface{}, keys ...string)
Constants ¶
This section is empty.
Variables ¶
var EnvironmentOrder = []string{"prod", "dev", "config"}
var ExtensionOrder = []string{".yaml", ".json"}
var FolderOrder = []string{"./config/", ""}
var ShowFiles = true
ShowFiles if set to true, will output the files to StdOut which were read to build the overall configuration
Functions ¶
func BoolOr ¶
BoolOr returns the bool value at the given key. If key is missing it returns defaultVal
func FloatOr ¶
FloatOr returns the float64 value at the given key. If key is missing it returns defaultVal
func Interface ¶
func Interface(keys ...string) interface{}
Interface returns the generic value corresponding to a key.
func MustExist ¶
func MustExist(key string)
MustExist panics if the given configuration key is missing
func StringOr ¶
StringOr returns the string value at the given key. If key is missing it returns defaultVal
func StringSlice ¶
StringSlice returns a splice of string at the given key. Panics if the key is not present.
func StringSliceOr ¶
StringSliceOr returns a splice of string at the given key. If key is missing it returns defaultVal.
Types ¶
This section is empty.