-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
For boolVariation
keys, it seems common to end up passing this directly to ifM
, whenA
, or unlessA
, is this something that would be worth adding helpers to make this a bit smoother?
Current:
launchDarklyMtlClient
.boolVariation("some-feature-flag", false)
.flatMap { tryV2 =>
if (tryV2) algebra.foo else algebraV2.bar
}
launchDarklyMtlClient
.boolVariation("some-feature-flag", false)
.ifM(
ifTrue = algebra.foo,
ifFalse = algebraV2.bar
)
launchDarklyMtlClient
.variation(SomeFeatureFlag)
.flatMap { extraLogging =>
logger.info("Extra logging stuff").whenA(extraLogging)
}
Proposed:
launchDarklyMtlClient
.ifV("some-feature-flag", false)(
ifTrue = algebra.foo,
ifFalse = algebraV2.bar
)
launchDarklyMtlClient
.whenV(SomeFeatureFlag) {
logger.info("Extra logging stuff")
}
Metadata
Metadata
Assignees
Labels
No labels