Documentation
¶
Overview ¶
Package config provides config parsing related functions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadEnv ¶
ReadEnv looks up the environment variables provided by the caller in the dirvar and filevar arguments and passes their values to ReadFromDir for further processing. The filenames containted in the filevar environment variable should be separated with commas (i.e. ',' char).
func ReadFiles ¶
ReadFiles tries to parse each of filenames (one after the other in the order stated) into the cnf data structure, aborting on the first encountered error and returning it. Since data is parsed into the same struct over and over again, the last config file to specify a value for any given (sub) setting takes precedence.
func ReadFromDir ¶
ReadFromDir joins the given filenames with the given dir name and then hands those to ReadConfigFiles for parsing.
Types ¶
type PostProcessor ¶
type PostProcessor interface {
PostProcess() error
}
PostProcessor can be implemented by config types to do some processing after parsing.