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

Get or default #466

Merged
merged 8 commits into from
Oct 12, 2021
Merged

Get or default #466

merged 8 commits into from
Oct 12, 2021

Conversation

MannarAmuthan
Copy link
Contributor

Env.getOrDefault(string,defaultValue)

Get an environment variable , if the variable not exists then take default value. .getOrDefault() will return a string if a valid environment variable is found otherwise returns default value that is passed one.

@Jason2605
Copy link
Member

I quite like this actually, but I think we can make the default an optional argument to the current .get() rather than a new method entirely - what do you think?

Copy link
Member

@Jason2605 Jason2605 left a comment

Choose a reason for hiding this comment

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

Mainly really picky comments, but we're almost there! Thanks!

src/optionals/env.c Outdated Show resolved Hide resolved
docs/docs/standard-lib/env.md Outdated Show resolved Hide resolved
docs/docs/standard-lib/env.md Outdated Show resolved Hide resolved
docs/docs/standard-lib/env.md Outdated Show resolved Hide resolved
src/optionals/env.c Outdated Show resolved Hide resolved
MannarAmuthan and others added 5 commits October 12, 2021 20:56
Co-authored-by: Jason_000 <Jason2605@users.noreply.github.com>
Co-authored-by: Jason_000 <Jason2605@users.noreply.github.com>
Co-authored-by: Jason_000 <Jason2605@users.noreply.github.com>
Co-authored-by: Jason_000 <Jason2605@users.noreply.github.com>
@Jason2605
Copy link
Member

Thanks!

@Jason2605 Jason2605 merged commit 3b5b317 into dictu-lang:develop Oct 12, 2021
@Jason2605 Jason2605 mentioned this pull request Oct 24, 2021
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.

3 participants