Skip to content

Commit

Permalink
support lower case
Browse files Browse the repository at this point in the history
  • Loading branch information
amtoaer committed Jan 14, 2021
1 parent 023bd64 commit fc79a7d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion question/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"os"
"os/exec"

"strings"

"github.com/amtoaer/goqut/file"
)

Expand All @@ -27,7 +29,7 @@ func showProblem(problem file.Problem, begin, end int) status {
}
fmt.Printf("请输入答案:")
fmt.Scanf("%s", &answer)
if answer == problem.Answer {
if strings.ToUpper(answer) == problem.Answer {
break
} else if answer == "quit" {
return quit
Expand Down

0 comments on commit fc79a7d

Please sign in to comment.