Skip to content

Commit

Permalink
add show version
Browse files Browse the repository at this point in the history
  • Loading branch information
csznet committed Oct 11, 2023
1 parent b293865 commit 6a0e4af
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ var webPort string
var index = true

func main() {
//输出版本号
fmt.Printf("版本号: %s\n", "v1.2.2")
//判断是否设置参数
if conf.BotToken == "" || conf.ChannelName == "" {
fmt.Println("请先设置Bot Token和对象")
Expand All @@ -38,13 +40,8 @@ func init() {
flag.StringVar(&conf.ChannelName, "channel", "", "Channel Name")
flag.StringVar(&conf.Pass, "pass", "", "Visit Password")
flag.StringVar(&conf.Mode, "mode", "", "Run mode")
showVersion := flag.Bool("v", false, "Show Version")
indexPtr := flag.Bool("index", false, "Show Index")
flag.Parse()
if *showVersion {
fmt.Printf("版本号: %s\n", "v1.2.2")
return
}
if *indexPtr {
index = false
}
Expand Down

1 comment on commit 6a0e4af

@vercel
Copy link

@vercel vercel bot commented on 6a0e4af Oct 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.