Add version feature for tank cli.

This commit is contained in:
zicla
2019-05-05 02:42:54 +08:00
parent 5625149766
commit 8dd524e89e
4 changed files with 26 additions and 17 deletions

View File

@ -23,7 +23,7 @@ const (
MODE_MIRROR = "mirror"
//将远程的一个文件爬取到蓝眼云盘中
MODE_CRAWL = "crawl"
//TODO:查看当前蓝眼云盘版本
//TODO: 查看当前蓝眼云盘版本
MODE_VERSION = "version"
)
@ -86,6 +86,11 @@ func (this *TankApplication) Start() {
//直接web启动
this.HandleWeb()
} else if strings.ToLower(this.mode) == MODE_VERSION {
//直接web启动
this.HandleVersion()
} else {
//准备蓝眼云盘地址
@ -256,3 +261,10 @@ func (this *TankApplication) HandleCrawl() {
}
}
//fetch the application version
func (this *TankApplication) HandleVersion() {
fmt.Printf("EyeblueTank %s\r\n", core.VERSION)
}