Documentation ¶
Overview ¶
Package fconfig provides support to load config files and expand secrets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
LoadConfig loads the configuration from a given file and unmarshal it into the provided config. It maps the fields using `mapstructure` tag.
Example:
type Config struct { Env string `mapstructure:env` DBUri string `mapstructure:db_uri` }
It expands the environment variables if the value matches `${ENV_NAME}`. It fetches the secret if the value matches gSecret://uri.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.