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

Adds a GetEnvIntWithRange utility function #102

Merged
merged 3 commits into from
Sep 9, 2024

Conversation

elena-kolevska
Copy link
Contributor

Description

The GetEnvIntWithRange function returns the integer value of the environment variable specified by envVar.
If the environment variable is not set, it returns defaultValue.
If the value is set but is not valid (not a valid integer or falls outside the specified range
[minValue, maxValue]), it returns defaultValue and an error.

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests

@artursouza artursouza merged commit 3823663 into dapr:main Sep 9, 2024
6 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.

2 participants