kelseyhightower / envconfig

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

Respec envconfig tag within usage #194

Closed tboerger closed 2 years ago

tboerger commented 3 years ago

This should potentially fix https://github.com/kelseyhightower/envconfig/issues/90, but currently the tests are failing because I haven't touched them so far. Before I fix the tests I wanted to clarify the rules.

Currently the usage functionality is entirely ignoring the custom environment keys, with my approach it's first checking if the envconfig:"" tag is set, if it is, it will just use it. I'm also transforing the tag value to uppercase as the variables seem to be uppercase all the time?

Another part that is not entirely clear to me, should the envconfig: tag ignore the prefix? AFAIK it does, but please make that clear to me :)

tboerger commented 3 years ago

@teepark what do you think about that?