Projetos
Ver no GitHub
bkirwi/decline
Sobre
Um analisador de linha de comando composável para Scala.
Ferramentas de desenvolvimentoCrescimento medido de estrelas
- em 24 h
- 0
- em 7 dias
- +2
- em 15 dias
- +1
- em 1 mês
- Coletando histórico
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
Originaldecline
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.
Explore projetos relacionados
Carregando…