We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
Would you be open for me to open a PR to support scala.concurrent.duration.{Duration, FiniteDuration}? As in:
scala.concurrent.duration.{Duration, FiniteDuration}
implicit val durationParser: ArgParser[Duration] = SimpleArgParser.from[Duration]("Duration")(s => Either.catchOnly[NumberFormatException](Duration(s)).leftMap(e => MalformedValue("Duration", e.getMessage)) ) implicit val finiteDurationParser: ArgParser[FiniteDuration] = SimpleArgParser.from[FiniteDuration]("FiniteDuration")(s => Either .catchOnly[NumberFormatException](Duration(s)) .leftMap(e => MalformedValue("FiniteDuration", e.getMessage)) .flatMap { case finite: FiniteDuration => Right(finite) case _ => Left(MalformedValue("FiniteDuration", s"Expected finite duration but found infinite duration: $s")) } )
Let me know Thanks
The text was updated successfully, but these errors were encountered:
@joan38 Sure, that would work!
Sorry, something went wrong.
No branches or pull requests
Hi,
Would you be open for me to open a PR to support
scala.concurrent.duration.{Duration, FiniteDuration}
?As in:
Let me know
Thanks
The text was updated successfully, but these errors were encountered: