diff --git a/src/main/scala/net/kemitix/s3thorp/Main.scala b/src/main/scala/net/kemitix/s3thorp/Main.scala index e7fedd4..4057f39 100644 --- a/src/main/scala/net/kemitix/s3thorp/Main.scala +++ b/src/main/scala/net/kemitix/s3thorp/Main.scala @@ -8,7 +8,7 @@ object Main extends IOApp { override def run(args: List[String]): IO[ExitCode] = (for { - ec <- IO(println("S3Thorp - hashed sync for s3")).as(ExitCode.Success) + ec <- S3Thorp(args).as(ExitCode.Success) } yield ec).guaranteeCase { case Canceled => IO(println("Interrupted")) case Error(e) => IO(println("ERROR: " + e)) diff --git a/src/main/scala/net/kemitix/s3thorp/S3Thorp.scala b/src/main/scala/net/kemitix/s3thorp/S3Thorp.scala new file mode 100644 index 0000000..91bc2a5 --- /dev/null +++ b/src/main/scala/net/kemitix/s3thorp/S3Thorp.scala @@ -0,0 +1,15 @@ +package net.kemitix.s3thorp + +import cats.effect.IO + +object S3Thorp { + + def putStrLn(value: String): IO[Unit] = IO(println(value)) + + def apply(args: List[String]): IO[Unit] = { + for { + _ <- putStrLn("S3Thorp - hashed sync for s3") + } yield () + } + +}