Last active
July 25, 2017 17:06
-
-
Save ottomata/ce393c836742cee1f96d550796f98db2 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
| // Support implicit conversion from regex string CLI opt to matching filter function. | |
| implicit val scoptFilterRegexRead: scopt.Read[(String) => Boolean] = scopt.Read.reads { s => | |
| val regex = s.r | |
| (string: String) => { | |
| string match { | |
| case regex(_*) => true | |
| case _ => false | |
| } | |
| } | |
| } | |
| ... | |
| opt[(String) => Boolean]('w', "topic-whitelist") optional() valueName "<topic-whitelist>" action { (x, p) => | |
| p.copy(topicWhitelistFilter = x) | |
| } text """Whitelist regex of topics imported by Camus to refine.""".stripMargin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment