Documentation
¶
Overview ¶
Package env reads configuration values from an ordered list of sources: the database-stored console config, the process environment, a CF user-provided service, config.properties and /etc/secrets. The first source that has a name wins.
It replaces github.com/govau/cf-common/env (unmaintained since 2020), keeping the API jetstream calls so call sites only change their import.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NoopLookup ¶
NoopLookup finds nothing. It stands in for a source that does not apply, such as a config file that is not there.
Types ¶
type VarSet ¶
type VarSet struct {
// contains filtered or unexported fields
}
VarSet searches its sources in the order they were added.
func (*VarSet) AppendSource ¶
AppendSource adds s after every existing source.
func (*VarSet) MustBool ¶
MustBool returns the value for name parsed by strconv.ParseBool. Unset is false, as with a command-line flag; a value that does not parse panics.
func (*VarSet) MustString ¶
MustString returns the value for name and panics when no source has it.