Skip to content

Commit

Permalink
fix output help message twice
Browse files Browse the repository at this point in the history
  • Loading branch information
missdeer committed Feb 5, 2024
1 parent 10e3a4d commit 1090b6e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,13 @@ func main() {

args, err := flags.Parse(&config.Opts)
if err != nil {
if len(os.Args) == 2 {
switch os.Args[1] {
case "-h", "--help", "/help", "/?", "/h":
return
}
}
log.Fatalln("解析命令行参数失败", err)
return
}

config.ReadLocalBookSource()
Expand Down

0 comments on commit 1090b6e

Please sign in to comment.