You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
parser.parse(args, Config()) match {
case Some(config) =>
config.mode match {
case "choose" =>
Picker.choose(config.objects, config.count).foreach(println)
case "roll" =>
println(Picker.roll(config.objects(0).toInt, config.objects(1).toInt))
}
case None =>
// arguments are bad, error message will have been displayed
}
However mode is not a method of Config.
Which is the correct way of processing .cmd subcommands? Almost all examples just show
// do something
A more complete example would be very helpful.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
In this example commands are processed using config.mode:
https://www.spantree.net/blog/2017/06/26/scala-native-for-cli-tools.html
However mode is not a method of Config.
Which is the correct way of processing .cmd subcommands? Almost all examples just show
A more complete example would be very helpful.
The text was updated successfully, but these errors were encountered: