https://github.com/benoahriz/envtoconf
Simple env to conf files
https://github.com/benoahriz/envtoconf
confd environment golang template variables
Last synced: 6 months ago
JSON representation
Simple env to conf files
- Host: GitHub
- URL: https://github.com/benoahriz/envtoconf
- Owner: benoahriz
- License: mit
- Created: 2017-07-14T18:00:32.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-11-27T20:32:51.000Z (8 months ago)
- Last Synced: 2025-11-30T11:47:48.111Z (8 months ago)
- Topics: confd, environment, golang, template, variables
- Language: Go
- Size: 3.86 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# envtoconf
[](https://goreportcard.com/report/github.com/benoahriz/envtoconf)
Striving to be a simple env program to process go templates primarily used for docker containers to read environment variables at runtime. The funcMap() for the template processor comes from [sprig](https://github.com/Masterminds/sprig) which gives you all kinds of functions if you wish to use them.
Below is some exmaples of using environment variables in a template.
``` bash
home is :{{ env "HOME" }} endhome.
path is :{{ expandenv "Your path is set to $PATH" }} endpath.
```
TODO:
Create tests for malformed template
Write article about going from an idea to production in golang.
Create option for required vars strict mode.