Documentation ¶
Index ¶
- Variables
- func AddConfigPath(p string)
- func BoolOrDefault(key string, defVal bool) bool
- func Get(key string) interface{}
- func GetBool(key string) bool
- func GetInt(key string) int
- func GetInt64(key string) int64
- func GetString(key string) string
- func Int32OrDefault(key string, defVal int32) int32
- func Int64OrDefault(key string, defVal int64) int64
- func IntOrDefault(key string, defVal int) int
- func Milliseconds(key string) time.Duration
- func MillisecondsOrDefault(key string, defVal time.Duration) time.Duration
- func Minutes(key string) time.Duration
- func MinutesOrDefault(key string, defVal time.Duration) time.Duration
- func ReadConfig(r io.Reader) error
- func ReadConfigFile() error
- func Seconds(key string) time.Duration
- func SecondsOrDefault(key string, defVal time.Duration) time.Duration
- func Set(key string, value interface{})
- func SetConfigFile(p string)
- func SetEnvKeyReplacer(r *strings.Replacer)
- func SetEnvPrefix(p string)
- func StringOrDefault(key, defVal string) string
- type FileNotFoundError
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCast = errors.New("unable to cast")
Functions ¶
func AddConfigPath ¶
func AddConfigPath(p string)
func BoolOrDefault ¶
func Int32OrDefault ¶
func Int64OrDefault ¶
func IntOrDefault ¶
func Milliseconds ¶
func MillisecondsOrDefault ¶
func ReadConfig ¶
func ReadConfigFile ¶
func ReadConfigFile() error
func SetConfigFile ¶
func SetConfigFile(p string)
func SetEnvKeyReplacer ¶
func SetEnvPrefix ¶
func SetEnvPrefix(p string)
func StringOrDefault ¶
Types ¶
type FileNotFoundError ¶
type FileNotFoundError struct {
// contains filtered or unexported fields
}
func (FileNotFoundError) Error ¶
func (f FileNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.