Documentation
¶
Overview ¶
Package confx reads settings from environment variables.
Every problem is collected instead of returned immediately: the application fails with the full list of bad or missing variables rather than one per restart.
Index ¶
- type Loader
- func (l *Loader) Bool(name string, def bool) bool
- func (l *Loader) Duration(name string, def time.Duration) time.Duration
- func (l *Loader) Err() error
- func (l *Loader) Int(name string, def int) int
- func (l *Loader) Key(name string) string
- func (l *Loader) Required(name string) string
- func (l *Loader) String(name, def string) string
- func (l *Loader) Strings(name string, def []string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader reads variables sharing a prefix and accumulates errors.
func (*Loader) Required ¶
Required returns the value and records an error when the variable is unset.
Click to show internal directories.
Click to hide internal directories.