diff --git a/main.go b/main.go index 1dc4a02..da3cea3 100644 --- a/main.go +++ b/main.go @@ -26,17 +26,18 @@ func main() { os.Exit(1) } - // Fetch user input - fmt.Print("Enter your password: ") - fmt.Scanf("%s", &input) - fmt.Println(input) + for { - // Check users password - message, err := password.Check(input, commonWords, commonPasswords) - if err != nil { - fmt.Printf("ERROR: %v\n", err) - os.Exit(1) + // Fetch user input + fmt.Print("Enter your password: ") + fmt.Scanf("%s", &input) + fmt.Println(input) + + // Check users password + message, err := password.Check(input, commonWords, commonPasswords) + if err != nil { + fmt.Printf("ERROR: %v\n", err) + } + fmt.Println(message) } - fmt.Println(message) - }