5 ms·
For me, it's configinator[0]. Write a spec file for a config like [1], get a Go file that loads a config from environment variables like [2]. Code-gen only, no
by olafalo 3y ago
For me, it's configinator[0]. Write a spec file for a config like [1], get a Go file that loads a config from environment variables like [2]. Code-gen only, no reflection, fairly type-safe, supports enums, string, bool, and int64. I made it because it was gross to add new config vars in a project at work, and it's come in handy a lot!
[0] https://github.com/olafal0/configinator https://github.com/olafal0/configinator
[1] https://github.com/olafal0/configinator/blob/0576a53970bcb4dd7c05a7cc73b396ae313e2a68/example/config_spec.toml https://github.com/olafal0/configinator/blob/0576a53970bcb4d...
[2] https://github.com/olafal0/configinator/blob/0576a53970bcb4dd7c05a7cc73b396ae313e2a68/example/config.go https://github.com/olafal0/configinator/blob/0576a53970bcb4d...