diff --git a/src/main/scala/net/kemitix/s3thorp/Main.scala b/src/main/scala/net/kemitix/s3thorp/Main.scala index 54ff2cf..9ac86ea 100644 --- a/src/main/scala/net/kemitix/s3thorp/Main.scala +++ b/src/main/scala/net/kemitix/s3thorp/Main.scala @@ -7,10 +7,18 @@ object Main extends IOApp { def parseArgs(args: List[String]): IO[Config] = IO.pure(Config("", "")) - def program(args: List[String]): IO[ExitCode] = for { - a <- parseArgs(args) - _ <- S3Thorp(a) - } yield ExitCode.Success + def putStrLn(value: String) = IO { println(value) } + + def sync(c: Config): IO[Unit] = + for { + _ <- putStrLn("S3Thorp - hashed sync for s3") + } yield () + + def program(args: List[String]): IO[ExitCode] = + for { + a <- parseArgs(args) + _ <- sync(a) + } yield ExitCode.Success override def run(args: List[String]): IO[ExitCode] = program(args) diff --git a/src/main/scala/net/kemitix/s3thorp/S3Thorp.scala b/src/main/scala/net/kemitix/s3thorp/S3Thorp.scala deleted file mode 100644 index 581ce6f..0000000 --- a/src/main/scala/net/kemitix/s3thorp/S3Thorp.scala +++ /dev/null @@ -1,15 +0,0 @@ -package net.kemitix.s3thorp - -import cats.effect.IO - -object S3Thorp { - - def putStrLn(value: String) = IO { println(value) } - - def apply(args: Config): IO[Unit] = { - for { - _ <- putStrLn("S3Thorp - hashed sync for s3") - } yield () - } - -}