Documentation ¶
Overview ¶
Package conf is a configuration package. It can be used to store configuration data in multiple different pluggable backends
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
ErrNotFound is the error returned when a config item isn't found
Functions ¶
Types ¶
type Data ¶
type Data interface { // SetInt sets the config value at name to i, overwriting if it already exists SetInt(name string, i int) // GetInt gets the config value at name. Returns 0, ErrNotFound if not such value found GetInt(name string) (int, error) }
Data is the core config interface
Default is an in-memory config backend. It's used in the SetInt and GetInt calls, and it's the optional singleton. Some packages export this name and others don't. If it's exported, it's the library user's responsibility to set it correctly and avoid concurrency issues (like setting it from two different goroutines, which would be a race condition)
Click to show internal directories.
Click to hide internal directories.