Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
Get first tries to read the passed files and then overrides the .env file parameters with the environment variables in memory. this is useful in order to have a base configuration that is within a file that can contain like a common password for every econ, but must override its econ address (IP:Port) with an environment variable. The passed filenames can be omitted, but may be used to pass a list of files.
func Parse ¶
Parse uses my simple-configo package that allows to easily parse environment maps and do proper value conversions as well as setting your configuration's struct fields after parsing the values. All you do is define a Configuration struct, add any of the common struct field values, implement the Options() configo.Options function and you are ready to parse any arbitrary environment format like string, regex match, integer, bool, time ranges, etc. filenames is an optional parameter, if it is left empty, the underlying library will try to open the .env file in the same directory first and then parse those values afterwards the environment variables override any value from that file.
Types ¶
This section is empty.