地址:https://github.com/docopt/docopt.go
Doc命令行解析工具
https://github.com/docopt/docopt.go
例子:
./flowanalysis checkCfg --config config/flowanalysis.test.toml go run
main.go checkCfg --config config/flowanalysis.test.toml
Format
var usage string = `
analysis
Usage:
analysis server --config=<file> [--consul]
analysis file --config=<file> --input=<file> [--output=<file>] [--output-agg=<file>]
analysis checkCfg --config=<file>
analysis dumpStorage --dir=<dir>
analysis collect --config=<file>
analysis query --from=<now-1m> --to=<now>