[S3Thorp] Extract class
This commit is contained in:
parent
9f7cb86c51
commit
9fa2bfea24
2 changed files with 16 additions and 1 deletions
|
@ -8,7 +8,7 @@ object Main extends IOApp {
|
||||||
|
|
||||||
override def run(args: List[String]): IO[ExitCode] =
|
override def run(args: List[String]): IO[ExitCode] =
|
||||||
(for {
|
(for {
|
||||||
ec <- IO(println("S3Thorp - hashed sync for s3")).as(ExitCode.Success)
|
ec <- S3Thorp(args).as(ExitCode.Success)
|
||||||
} yield ec).guaranteeCase {
|
} yield ec).guaranteeCase {
|
||||||
case Canceled => IO(println("Interrupted"))
|
case Canceled => IO(println("Interrupted"))
|
||||||
case Error(e) => IO(println("ERROR: " + e))
|
case Error(e) => IO(println("ERROR: " + e))
|
||||||
|
|
15
src/main/scala/net/kemitix/s3thorp/S3Thorp.scala
Normal file
15
src/main/scala/net/kemitix/s3thorp/S3Thorp.scala
Normal file
|
@ -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 ()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue