Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
Build is the main utility from this package. It expects the following:
- a defaults map with all the needed key-value pairs, the keys being in snake_case, with the only required key being config, pointing at the default path of the config file **relative** to $XDG_CONFIG_DIR (on linux, ~/.config)
- a flagSet, defined with the flags in kebab-case (the default values here will be ignored) and the -config flag must exist
For free, it reads from the environment the values of the defaults map keys, transformed in SCREAMING_SNAKE_CASE. The rules of precedence, from less to more important, are: defaults, config file, env, flags.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.