diff options
| author | Jeff Carr <[email protected]> | 2025-10-15 14:25:48 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-15 14:25:48 -0500 |
| commit | 0081c99af507241879cdc62ca4ca0fdc4343d6d6 (patch) | |
| tree | 210b5d181632ff5c12fa6f2eb71b0829658834dd /questionUser.go | |
| parent | 109134608f6a91103dfdcb060e8c6b9c2469e5b6 (diff) | |
something. notsurev0.0.38
Diffstat (limited to 'questionUser.go')
| -rw-r--r-- | questionUser.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/questionUser.go b/questionUser.go index f60ebd7..b3edf70 100644 --- a/questionUser.go +++ b/questionUser.go @@ -10,26 +10,32 @@ import ( ) func QuestionUser(msg string) bool { - log.Info(msg) + log.Info("START", msg) fmt.Fprintf(os.Stdout, "(y)es or (n)o ? ") scanner := bufio.NewScanner(os.Stdin) for scanner.Scan() { + log.Info("QUESTION USER SCAN", msg) line := scanner.Text() + log.Info("QUESTION USER LINE", line) line = strings.TrimSpace(line) line = strings.ToLower(line) switch line { case "y": + log.Info("QUESTION USER Y", msg) return true case "n": + log.Info("QUESTION USER N", msg) return false default: + log.Info("QUESTION USER DEFAULT", msg) if strings.HasPrefix(line, "y") { return true } return false } } + log.Info("QUESTION USER END", msg) return false } |
