kelseyhightower / envconfig

Golang library for managing configuration data from environment variables
MIT License
5.06k stars 382 forks source link

Initial work on NewReader for envfiles (fixes issue #99) #100

Closed xor-gate closed 6 years ago

xor-gate commented 6 years ago

For more info see #99

teepark commented 6 years ago

Hi @xor-gate, thanks for the contribution!

envconfig is really focused on configuring an application from environment variables. This diff essentially makes it also a parser for a bespoke (albeit extremely simple) config file format, which is out of scope.

If you're dying to use envconfig and put configuration in a file, you could load up a file like this into the environment with a wrapper script (and get a lot more functionality in the configuration):

#!/bin/sh
. config_file.sh
exec my_binary
xor-gate commented 6 years ago

I understand your project decisions, but for my projects I would like to use it also from a file. Thank you for the project and I will branch of on yours. Thanks again!