Miscellaneous¶
cats-effect¶
case-app has a module helping using it in cats-effect applications.
Add a dependency to it like
(for other build tools, see setup and changecase-app
to case-app-cats
)
Then use it like
import caseapp.catseffect._
import cats.data.NonEmptyList
import cats.effect._
case class ExampleOptions(
foo: String = "",
thing: NonEmptyList[String]
)
object IOCaseExample extends IOCaseApp[ExampleOptions] {
def run(options: ExampleOptions, arg: RemainingArgs): IO[ExitCode] = IO {
// Core of the app
// ...
ExitCode.Success
}
}