kelseyhightower / envconfig

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

convert to a two phase approach and add usage capability #62

Closed davidkbainbridge closed 7 years ago

davidkbainbridge commented 8 years ago

there is now a GatherInformation phase and then two second phases, Process to populate the structure, and Usage to output usage information.

The GatherInformation and associated structure VarInfo are public / exposed so that additional behavior can be written outside of the core package if desired.

johanbrandhorst commented 7 years ago

What is the status of this pull request?

davidkbainbridge commented 7 years ago

Looks like @teepark closed it. I thought i made most of the requested changes, but haven't had time to look at this in a while. I really think this capability needs to be part of the project.

johanbrandhorst commented 7 years ago

It doesn't look closed to me? It's marked as "Changes requested", I think if the suggested changes are made this can be merged.

davidkbainbridge commented 7 years ago

OK. I will attempt to get this back on track when I get some time.

davidkbainbridge commented 7 years ago

still pending changes to the usage_test.go file to remove all the text for comparisons.

davidkbainbridge commented 7 years ago

@teepark please kindly review at your earliest convenience.

johanbrandhorst commented 7 years ago

Good work @davidkbainbridge!

teepark commented 7 years ago

Thanks for this @davidkbainbridge! Just a quick heads-up that I'm in a particularly busy place right at the moment, so it may be a few more days or a week before I'll be able to give this the attention it deserves.

teepark commented 7 years ago

Hey @davidkbainbridge, this has been merged with some minor tweaks. The most consequential being making VarInfo and GatherInfos private -- the less API surface area the better.

Thanks again for all your hard work and patience!