From 62ec48ae5609dd776f6dbc56f272a15b21388322 Mon Sep 17 00:00:00 2001 From: 047pegasus Date: Sun, 29 Jan 2023 17:21:59 +0530 Subject: [PATCH] Added pretty warnings to the utility to add user interactivity --- main.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 4fdf539..4304744 100644 --- a/main.go +++ b/main.go @@ -19,26 +19,30 @@ func main() { Short: "A command line utility to verify and validate email addresses developed using Go with Cobra and Viper.", Run: func(cmd *cobra.Command, args []string) { if checkFormat && !isValidFormat(email) { - color.Red("Invalid email format ❌") + color.Red("❗ Invalid email format ❌") return } if checkHost && !isValidHost(email) { - color.Red("Invalid host ❌") + color.Red("❗ Invalid host ❌") + color.Yellow("Try using an email address using a proper host 🔰") return } if checkMX && !isValidMX(email) { - color.Red("Invalid MX record ❌") + color.Red("❗ Invalid MX record ❌") + color.Yellow("Try using an email address using a proper host 🔰") return } if checkDMARC && !isValidDMARC(email) { - color.Red("Invalid DMARC record ❌") + color.Red("❗ Invalid DMARC record ❌") + color.Yellow("Try using an email address using a proper host 🔰") return } if checkSPF && !isValidSPF(email) { - color.Red("Invalid SPF record ❌") + color.Red("❗ Invalid SPF record ❌") + color.Yellow("Try using an email address using a proper host 🔰") return }