From 5c770c3836f9cd6d5d7a00532fb016a96779b3bc Mon Sep 17 00:00:00 2001 From: Mike Crute Date: Tue, 22 Aug 2023 08:06:54 -0700 Subject: Add notes/documentation --- generate_dns_types.go | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/generate_dns_types.go b/generate_dns_types.go index 4e90693..8c08945 100644 --- a/generate_dns_types.go +++ b/generate_dns_types.go @@ -14,6 +14,9 @@ import ( "golang.org/x/tools/go/packages" ) +// TODO: Also extract the body of the String() method and remove the +// `rr.Hdr.String() + ` prefix in the return statement so it can be used +// in a Value() method. Detect if anything is more complex than that. type Field struct { Name string Type string @@ -101,16 +104,17 @@ func FromDNS(rr dns.RR) interface{} { } `)) +// TODO: support the alises by looking for a single embedded type var disallowedTypes = map[string]bool{ - "CDNSKEY": true, - "CDS": true, - "DLV": true, - "KEY": true, - "OPT": true, - "SIG": true, - "PrivateRR": true, - "RFC3597": true, - "ANY": true, + "CDNSKEY": true, // Alias for DNSKEY + "CDS": true, // Alias for DS + "DLV": true, // Alias for DS + "KEY": true, // Alias for DNSKEY + "SIG": true, // Alias for RRSIG + "OPT": true, // []EDNS0 + "PrivateRR": true, // For testing new RRTypes + "RFC3597": true, // Unknown/generic rdata + "ANY": true, // No rdata } var allowedPackages = map[string]bool{ -- cgit v1.2.3