-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI - Scallop #54
Comments
I can take a look at this. |
i would recommend doing those:
How to use CommandLine today: class Arguments(override val args: Seq[String])
extends ScallopConf(args) with CommandLineArguments.Service {
...
}
object Arguments {
type ArgumentEnv = CommandLineArguments.CommandLineArguments[Arguments]
def apply(): ZIO[ArgumentEnv, Throwable, Arguments] =
CommandLineArguments.apply[Arguments]()
def apply[A](f: Arguments => A): ZIO[ArgumentEnv, Throwable, A] =
CommandLineArguments.get[Arguments].map(_.apply(f))
} which allow to do : for {
path <- Arguments(_.readPath)
ds <- readUserFrom(path)
} yield ds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put Scallop specific code in its own component and make the default version more generic
The text was updated successfully, but these errors were encountered: