Created
April 4, 2022 20:38
-
-
Save schroedermatt/89a3a72b942b8229c968caf164c21a0c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// two topics that this consumer cares about | |
List assignedTopics = ["demo.topic.one", "demo.topic.two"] | |
// all of the feature flags | |
List flags = [ | |
"topic_demo.topic.one", | |
"ui-feature-flag", | |
"topic_important.topic" | |
] | |
// the flags that this consumer actually cares about | |
List assignedTopicFlags = toggles | |
.stream() | |
.filter(t -> t.startsWith('topic_') && assignedTopics.contains(getTopicName(t)) | |
.collect(toList()); | |
// assignedTopicFlags = ["topic_demo.topic.one"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment