diff --git a/src/main/scala/net/kemitix/s3thorp/Config.scala b/src/main/scala/net/kemitix/s3thorp/Config.scala index fad09e1..92d9bf0 100644 --- a/src/main/scala/net/kemitix/s3thorp/Config.scala +++ b/src/main/scala/net/kemitix/s3thorp/Config.scala @@ -1,8 +1,8 @@ package net.kemitix.s3thorp -case class Config(bucket: String, - prefix: String, - source: String +case class Config(bucket: String = "", + prefix: String = "", + source: String = "" ) { } diff --git a/src/main/scala/net/kemitix/s3thorp/ParseArgs.scala b/src/main/scala/net/kemitix/s3thorp/ParseArgs.scala index 9654563..58c8394 100644 --- a/src/main/scala/net/kemitix/s3thorp/ParseArgs.scala +++ b/src/main/scala/net/kemitix/s3thorp/ParseArgs.scala @@ -6,8 +6,6 @@ import cats.effect.IO object ParseArgs { - val defaultConfig = Config("def-bucket", "def-prefix", "def-source") - val configParser: OParser[Unit, Config] = { val parserBuilder = builder[Config] import parserBuilder._ @@ -27,7 +25,7 @@ object ParseArgs { } def apply(args: List[String]): IO[Config] = - parse(configParser, args, defaultConfig) match { + parse(configParser, args, Config()) match { case Some(config) => IO.pure(config) case _ => IO.raiseError(new IllegalArgumentException) }