プロジェクト
概要
Scala向けの合成可能なコマンドラインパーサーです。
開発ツール計測したスター増加
- 24時間
- 0
- 7日間
- +2
- 15日間
- +1
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルdecline
A composable command-line parser, inspired by optparse-applicative
and built on cats.
import cats.syntax.all._
import com.monovore.decline._
object HelloWorld extends CommandApp(
name = "hello-world",
header = "Says hello!",
main = {
val userOpt =
Opts.option[String]("target", help = "Person to greet.")
.withDefault("world")
val quietOpt = Opts.flag("quiet", help = "Whether to be quiet.").orFalse
(userOpt, quietOpt).mapN { (user, quiet) =>
if (quiet) println("...")
else println(s"Hello $user!")
}
}
)
To get started, please visit monovore.com/decline!
About the Project
decline is a Typelevel project,
and follows the Typelevel Scala Code of Conduct.
This project is released under the Apache License 2.0.
関連プロジェクトを探す
読み込み中…