in common.go [207:226]
func confirm(prompt string) bool {
reader := bufio.NewReader(os.Stdin)
for {
fmt.Print(prompt)
response, err := reader.ReadString('\n')
if err != nil {
fmt.Printf("Error reading input: %v\n", err)
return false
}
response = strings.TrimSpace(strings.ToLower(response))
if response == "yes" || response == "y" {
return true
} else if response == "no" || response == "n" {
return false
}
fmt.Println("Please type yes or no and then press enter.")
}
}