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

Support environment variables as a configuration source #21

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

51-code
Copy link
Contributor

@51-code 51-code commented Nov 11, 2024

Fixes #8 .

Adds support for environment variables. Same thing as with System Properties, it can't really fail so it doesn't throw an exception in asMap().

README updated, but it will conflict after System Properties support is merged, so it has to be updated again later.

Basically the Environment is just a Map so I simply reused the ImmutableMap object.

Refactor EnvironmentConfiguration

Support environment variables as a configuration source

Enforce a deep copied map in default configurations
@51-code 51-code added the enhancement New feature or request label Nov 11, 2024
@51-code 51-code requested a review from elliVM November 11, 2024 14:17
@51-code 51-code self-assigned this Nov 11, 2024
Copy link

@elliVM elliVM left a comment

Choose a reason for hiding this comment

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

LGTM (if needed env variables could be tested using JUnit Pioneer but not sure if worth extra dependency)

@elliVM elliVM requested a review from kortemik November 12, 2024 07:32
@kortemik kortemik merged commit f8e5498 into teragrep:main Nov 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for environment variables
3 participants