jswank / dnsme

Command line client for DNS Made Easy
MIT License
20 stars 5 forks source link

dns records -name "" should find the root record. #6

Open markstos opened 9 years ago

markstos commented 9 years ago

A valid record for the apex record may look like this:

   {
      "ttl" : 86000,
      "data" : "1.2.3.4",
      "type" : "A",
      "name" : "",
      "gtdLocation" : "DEFAULT",
      "id" : 12263564
   },

This is a natural way to express a lookup to find the id for the apex record:

 dnsme records  -name "" -o json example.com

But the filter fails and all records for the domain instead. I realize in option parsing you would normally want to treat the empty string as a missing value, but for a DNS API, it seems it should work to look up apex records. Otherwise it's not clear how they would be found.