package cmd import ( "git.db.org.ai/dborg/internal/formatter" "github.com/spf13/cobra" ) var emailCmd = &cobra.Command{ Use: "email", Short: "Email verification commands", Long: `Verify email addresses and check deliverability`, } var verifyEmailCmd = &cobra.Command{ Use: "verify [email]", 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), RunE: runVerifyEmail, } func init() { rootCmd.AddCommand(emailCmd) emailCmd.AddCommand(verifyEmailCmd) } 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()) }