From eeb3f677cae9c13440e868a83c0a621c5b22b0b5 Mon Sep 17 00:00:00 2001 From: s Date: Fri, 7 Nov 2025 12:32:24 -0500 Subject: feat: add show-only flag to filter dns tld results by existence status --- cmd/dns.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/dns.go b/cmd/dns.go index 71a0d83..022d2c9 100644 --- a/cmd/dns.go +++ b/cmd/dns.go @@ -26,6 +26,7 @@ var dnsTLDCmd = &cobra.Command{ func runDNSTLDCheck(cmd *cobra.Command, args []string) error { term := args[0] + showOnly, _ := cmd.Flags().GetString("show-only") cfg := config.New() c, err := client.New(cfg) @@ -34,7 +35,8 @@ func runDNSTLDCheck(cmd *cobra.Command, args []string) error { } params := &models.DNSTLDParams{ - Term: term, + Term: term, + ShowOnly: showOnly, } fmt.Printf("Checking TLDs for term: %s\n\n", term) @@ -54,4 +56,6 @@ func runDNSTLDCheck(cmd *cobra.Command, args []string) error { func init() { rootCmd.AddCommand(dnsCmd) dnsCmd.AddCommand(dnsTLDCmd) + + dnsTLDCmd.Flags().StringP("show-only", "s", "", "Filter results: 'exists' (only existing domains), 'nxdomain' (only non-existing domains), or empty (show all)") } -- cgit v1.2.3