diff options
| author | sinner <[email protected]> | 2026-04-15 15:16:02 -0400 |
|---|---|---|
| committer | sinner <[email protected]> | 2026-04-15 15:16:02 -0400 |
| commit | a5f907854f29e1c267ad30d1dfe85c2c47f5ac48 (patch) | |
| tree | bc8685c3b22e6d5d47702ba0607c694f938ba7fd /cmd/email.go | |
| parent | 8a1cf20dd5014ebe15ced77344902b79dcfa2e66 (diff) | |
| download | dborg-0.1.14.tar.gz dborg-0.1.14.zip | |
Diffstat (limited to 'cmd/email.go')
| -rw-r--r-- | cmd/email.go | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/cmd/email.go b/cmd/email.go index 85cc686..871c272 100644 --- a/cmd/email.go +++ b/cmd/email.go @@ -17,7 +17,7 @@ var verifyEmailCmd = &cobra.Command{ Aliases: []string{"v"}, Short: "Verify email address", Long: `Performs comprehensive email verification including format validation, MX records check, SMTP verification, and disposable/webmail detection`, - Args: cobra.ExactArgs(1), + Args: argsOrStdin(1), RunE: runVerifyEmail, } @@ -27,21 +27,19 @@ func init() { } func runVerifyEmail(cmd *cobra.Command, args []string) error { - email := args[0] - c, err := newClient() if err != nil { return err } - response, err := c.VerifyEmail(email) - if err != nil { - return err - } - - if err := checkError(response.Error); err != nil { - return err - } - - return formatter.FormatEmailResults(response, IsJSONOutput()) + return forEachQuery(args, func(email string) error { + response, err := c.VerifyEmail(email) + if err != nil { + return err + } + if err := checkError(response.Error); err != nil { + return err + } + return formatter.FormatEmailResults(response, IsJSONOutput()) + }) } |
