feat: read bool 更新

This commit is contained in:
2022-01-10 03:37:21 +08:00
parent 9137abdabf
commit 5826eef7bf
4 changed files with 29 additions and 5 deletions
+3 -1
View File
@@ -9,6 +9,7 @@ import (
)
func ReadBool() bool {
retry:
read := bufio.NewReader(os.Stdin)
ret, _ := read.ReadByte()
switch ret {
@@ -20,8 +21,9 @@ func ReadBool() bool {
fallthrough
case 'N':
return false
default:
goto retry
}
return false
}
func ReadBoolWithMessage(message string) bool {