修改 帮助信息

This commit is contained in:
dengsgo 2018-12-30 15:59:38 +08:00
parent 331f449733
commit 4ff6fce5d2
2 changed files with 19 additions and 9 deletions

View File

@ -9,7 +9,6 @@ import (
"math/rand" "math/rand"
"os" "os"
"path" "path"
"strconv"
"time" "time"
) )
@ -179,10 +178,8 @@ func parseArgs() {
parseConfig() parseConfig()
newTaskMan(0).run(new(changeFile)) newTaskMan(0).run(new(changeFile))
return return
case "version": case "version", "v", "-v", "--version":
fallthrough fmt.Println(versionDesc)
case "v":
fmt.Println("[VERSION] Release: v1.2 filegirl: " + strconv.Itoa(Version))
default: default:
fmt.Print(helpStr) fmt.Print(helpStr)
} }
@ -193,8 +190,9 @@ func parseArgs() {
func show() { func show() {
fmt.Print(logo) fmt.Print(logo)
rand.Seed(time.Now().UnixNano()) rand.Seed(time.Now().UnixNano())
fmt.Println(englishSay[rand.Intn(len(englishSay))], "\r\n") fmt.Println(englishSay[rand.Intn(len(englishSay))])
fmt.Println("Version: ", Version, " Author: dengsgo@yoytang.com") fmt.Println("")
fmt.Println(statement)
} }
func main() { func main() {

16
raw.go
View File

@ -1,5 +1,7 @@
package main package main
import "strconv"
var exampleFileGirl string = `# 主配置 var exampleFileGirl string = `# 主配置
core: core:
# 配置版本号 # 配置版本号
@ -61,7 +63,7 @@ Usage of fileboy:
exec exec
尝试运行定义的 command 命令 尝试运行定义的 command 命令
version version
查看当前版本 查看当前版本信息
` `
var englishSay = []string{ var englishSay = []string{
@ -83,5 +85,15 @@ var logo = `
_____ _ | | _____ ____) ) | | | |___| | _____ _ | | _____ ____) ) | | | |___| |
| ___) | | | | | ___) | __ (| | | |\_____/ | ___) | | | | | ___) | __ (| | | |\_____/
| | _| |_| |_____| |_____| |__) ) |___| | ___ | | _| |_| |_____| |_____| |__) ) |___| | ___
|_| (_____)_______)_______)______/ \_____/ (___) |_| (_____)_______)_______)______/ \_____/ (___) V1.2
`
var statement = `Dengsgo [dengsgo@gmail.com] Open Source with MIT License`
var versionDesc = `
Version fileboy: v1.2 filegirl: v` + strconv.Itoa(Version) + `
Released 2019.1.1
Licence MIT
Author dengsgo [dengsgo@gmail.com]
Website https://github.com/dengsgo/fileboy
Blog https://www.yoytang.com
` `