3 ms·
A new method of configuration load in Golang
- ismdeep 4y agoHi, I got a new method of configuration load in golang. As the code show, it allows programmer to set label "config" to describe default value and load value from environment name. But I don't know how to implement it. It would be very thankful to help me out with TODO part.
- is_taken 4y agoHave a look at https://github.com/caarlos0/env https://github.com/caarlos0/env
- geoah 4y agoMy goto would be https://github.com/kelseyhightower/envconfig https://github.com/kelseyhightower/envconfig it’s very simple to use, but doesn’t offer all the bells and whistles like carlos’ env pkg.