[main] inline exec
This commit is contained in:
parent
c8c652fe2d
commit
598bd77a03
1 changed files with 7 additions and 10 deletions
|
@ -6,13 +6,10 @@ import cats.syntax.all._
|
|||
|
||||
object Main extends IOApp {
|
||||
|
||||
def exec(args: List[String]): IO[ExitCode] =
|
||||
for {
|
||||
ec <- IO(println("S3Thorp - hashed sync for s3")).as(ExitCode.Success)
|
||||
} yield ec
|
||||
|
||||
override def run(args: List[String]): IO[ExitCode] =
|
||||
exec(args).guaranteeCase {
|
||||
(for {
|
||||
ec <- IO(println("S3Thorp - hashed sync for s3")).as(ExitCode.Success)
|
||||
} yield ec).guaranteeCase {
|
||||
case Canceled => IO(println("Interrupted"))
|
||||
case Error(e) => IO(println("ERROR: " + e))
|
||||
case Completed => IO(println("Done"))
|
||||
|
|
Loading…
Reference in a new issue