Skip to content

Commit

Permalink
v1.5.0 e: bug fix again and again and again
Browse files Browse the repository at this point in the history
  • Loading branch information
yzy613 committed Aug 31, 2022
1 parent 2f9710c commit d006074
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cmd/ddns-watchdog-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,9 @@ func processFlag() (exit bool, err error) {
currentToken = *token
case *generateToken:
length := *tokenLength
if length < 16 {
length = 16
}
if length > 127 {
length = 127
if length < 16 || length > 127 {
err = errors.New("生成 token 的长度不符合要求")
return
}
currentToken = server.GenerateToken(length)
fmt.Printf("Token: %v\nMessage: %v\n", currentToken, *message)
Expand Down

0 comments on commit d006074

Please sign in to comment.