Skip to content

Commit

Permalink
define arguments outside parser
Browse files Browse the repository at this point in the history
  • Loading branch information
rmgk committed Dec 1, 2024
1 parent 5637419 commit a1ef63e
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,13 @@ object cli {

}

val cluster = named[List[(String, Int)]]("--cluster", "")
val initialClusterIds = named[List[Uid]]("--initial-cluster-ids", "")
val clientNode = named[(String, Int)]("--node", "<ip:port>")
val name = named[Uid]("--name", "", Uid.gen())
val endpoints = named[List[String]]("--endpoints", "")

val argparse = composedParser {
inline def cluster = named[List[(String, Int)]]("--cluster", "")
inline def initialClusterIds = named[List[Uid]]("--initial-cluster-ids", "")
inline def clientNode = named[(String, Int)]("--node", "<ip:port>")
inline def name = named[Uid]("--name", "", Uid.gen())
inline def endpoints = named[List[String]]("--endpoints", "")

alternatives(
subcommand("node", "starts a cluster node") {
Expand Down

0 comments on commit a1ef63e

Please sign in to comment.