cli
Runs block and turns Argot's outcomes into the usual command-line behaviour:
success returns the parsed value;
--helpand--versionprint to stdout and exit0;invalid input prints the usage line and
error: …to stderr and exits2.
fun main(argv: Array<String>) {
val args = cli { parseServeArgs(argv) } // generated parser, or ServerArgs().parse(argv)
runServer(args)
}Content copied to clipboard