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

Implement Config#orElseIf #7699

Merged
merged 5 commits into from
Jan 15, 2023
Merged

Implement Config#orElseIf #7699

merged 5 commits into from
Jan 15, 2023

Conversation

adamgfraser
Copy link
Contributor

Allows the fallback logic for a configuration to depend on how attempting to load the configuration failed. Also changes the behavior of withDefault to only recover from missing data errors.

@adamgfraser
Copy link
Contributor Author

Also changed the behavior of optional to only recover from missing data errors.

@@ -329,6 +419,31 @@ object Config {

override def toString(): String = s"(Unsupported operation at ${path.mkString(".")}: ${message})"
}

trait Folder[-Context, Z] {
Copy link
Member

Choose a reason for hiding this comment

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

Nice. Forward looking. 👍

jdegoes
jdegoes previously approved these changes Jan 14, 2023
Copy link
Member

@jdegoes jdegoes left a comment

Choose a reason for hiding this comment

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

Love it!

@jdegoes jdegoes merged commit a1d5e2a into zio:series/2.x Jan 15, 2023
@patroza
Copy link

patroza commented Jan 16, 2023

I loves it too!!

@adamgfraser adamgfraser deleted the orelseif branch January 16, 2023 14:44
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