summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/dns.go6
1 files changed, 5 insertions, 1 deletions
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)")
}