summaryrefslogtreecommitdiffstats
path: root/cmd/email.go
diff options
context:
space:
mode:
authorsinner <[email protected]>2026-04-15 15:16:02 -0400
committersinner <[email protected]>2026-04-15 15:16:02 -0400
commita5f907854f29e1c267ad30d1dfe85c2c47f5ac48 (patch)
treebc8685c3b22e6d5d47702ba0607c694f938ba7fd /cmd/email.go
parent8a1cf20dd5014ebe15ced77344902b79dcfa2e66 (diff)
downloaddborg-a5f907854f29e1c267ad30d1dfe85c2c47f5ac48.tar.gz
dborg-a5f907854f29e1c267ad30d1dfe85c2c47f5ac48.zip
feat: add stdin support and retry logic for all search commandsHEADv1.1.1v0.1.14master
Diffstat (limited to 'cmd/email.go')
-rw-r--r--cmd/email.go24
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())
+ })
}