Documentation
¶
Overview ¶
Package config provides configured values for all parts of the application.
Configuration values are read from the file "config.json" in the initial directory of the running program. This means in particular that for test programs, the file "config.json" is searched in the package directory.
Index ¶
- Variables
- func Int(key string) (ret int, err error)
- func IntOr(key string, byDefault int) (ret int, err error)
- func String(key string) (ret string, err error)
- func StringOr(key string, byDefault string) (ret string, err error)
- func Value(key string, ret interface{}) (err error)
- func ValueOr(key string, ret interface{}, byDefault interface{}) (err error)
- type KeyNotFound
Constants ¶
This section is empty.
Variables ¶
View Source
var Ok bool
Ok is true iff the configuration file has successfully been read. It may be false after init() has been called if no configuration file has been found.
Functions ¶
Types ¶
type KeyNotFound ¶
type KeyNotFound string
Error returned when the key is not found in the configuration.
func (KeyNotFound) Error ¶
func (self KeyNotFound) Error() string
Click to show internal directories.
Click to hide internal directories.