Tendermint也使用了Cobra工具,Cobra跟Viper是兄弟关系的,都是spf13下面的项目,摘下github上的描述
(spf13何许人也,这么牛逼,写了这么多开源工具。
看了下简介应该是google golang团队的大牛,这些工具也都是基于go语言开发的)
https://github.com/spf13/cobra
Cobra is a library providing a simple interface to create powerful modern CLI interfaces similar to git & go tools.
Cobra is also an application that will generate your application scaffolding to rapidly develop a Cobra-based application.
Cobra provides:
Easy subcommand-based CLIs: app server, app fetch, etc.
Fully POSIX-compliant flags (including short & long versions)
Nested subcommands
Global, local and cascading flags
Easy generation of applications & commands with cobra init appname & cobra add cmdname
Intelligent suggestions (app srver... did you mean app server?)
Automatic help generation for commands and flags
Automatic help flag recognition of -h, --help, etc