[main] inline S3Thorp (for now)
This commit is contained in:
parent
b5e1036874
commit
14205f4fbf
2 changed files with 12 additions and 19 deletions
|
@ -7,9 +7,17 @@ object Main extends IOApp {
|
||||||
|
|
||||||
def parseArgs(args: List[String]): IO[Config] = IO.pure(Config("", ""))
|
def parseArgs(args: List[String]): IO[Config] = IO.pure(Config("", ""))
|
||||||
|
|
||||||
def program(args: List[String]): IO[ExitCode] = for {
|
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)
|
a <- parseArgs(args)
|
||||||
_ <- S3Thorp(a)
|
_ <- sync(a)
|
||||||
} yield ExitCode.Success
|
} yield ExitCode.Success
|
||||||
|
|
||||||
override def run(args: List[String]): IO[ExitCode] =
|
override def run(args: List[String]): IO[ExitCode] =
|
||||||
|
|
|
@ -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 ()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in a new issue