Documentation ¶
Overview ¶
Package cfg provides configuration file loaders for Go applications.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UserConfigPath ¶
UserConfigPath returns ~/.config/appName/fileName.
Types ¶
type Loader ¶
Loader is the configuration loader.
func DefaultLoader ¶
DefaultLoader returns a chain of loading ini files from: 1. ~/.config/appName/config 2. System environments variable with appName_ prefix
func NewOverridingChain ¶
NewOverridingChain returns a Loader which loads all configurations in the chain. Keys in later chain will override the same key from previous chain.
Click to show internal directories.
Click to hide internal directories.