Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load content of .env file before merging env #48

Merged
merged 5 commits into from Jul 14, 2023

Conversation

suttod
Copy link
Contributor

@suttod suttod commented Jun 7, 2023

Copy link
Contributor

@vroldanbet vroldanbet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

Viper has native support for configuration files, so I don't believe we need to use another third-party library for this. See:

https://github.com/carolynvs/stingoftheviper/blob/main/main.go#L73-L88
https://maneeshaindrachapa.medium.com/go-with-env-files-using-viper-1eb3d1d1d221

I also couldn't find much about conventions you refer to, as they seem to be different depending on where you look at:

https://gist.github.com/jgarber/20f56d92e549dbde7152
https://terraspace.cloud/docs/config/dotenv/

I'd suggest we start with spicedb.env and then we can follow up if the community seems unanimous on the opinions.

We should also add some tests to make sure precedence is guaranteed.

cobrautil.go Outdated Show resolved Hide resolved
cobrautil.go Outdated Show resolved Hide resolved
@jzelinskie jzelinskie merged commit 8071763 into jzelinskie:main Jul 14, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants