Registry / cli / scopt-2-12

scopt-2-12

JSON →
library4.1.0javamavenunverified

Scopt is a command line options parsing library for Scala.

<dependency> <groupId>com.github.scopt</groupId> <artifactId>scopt_2.12</artifactId> <version>4.1.0</version> </dependency>
INSTALL
IMPORT
SIG · SCOPT-2-12
S
scopt-2-12
clijavav4.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

OParser
✓ scopt.OParser

Parses command line options using Scopt.

import scopt.OParser case class Config(name: String = "", count: Int = 0) object Main extends App { val builder = OParser.builder[Config] val parser = { import builder._ OParser.sequence( opt[String]('n', "name").action((x, c) => c.copy(name = x)), opt[Int]('c', "count").action((x, c) => c.copy(count = x)) ) } OParser.parse(parser, args, Config()) match { case Some(config) => println(config) case _ => } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
4.1.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources