Note
This release was brought to you by the Shipyard team.
Highlights
TXT lookups can now report the DNS record TTL (#33)
New Resolver.LookupTXTWithTTL returns TXT records together with how long they may be cached. On a cache hit it reports the entry's remaining lifetime, and the value is capped by WithMaxCacheTTL; 0 means the records may not be cached. This is opt-in and additive: LookupTXT behaves as before. The resolver now implements the TXTWithTTLResolver interface from go-multiaddr-dns v0.6.0, asserted at compile time.
Consumers use the TTL to expire TXT-derived state at the right time: DNSLink records feeding Cache-Control: max-age on IPFS gateways (ipfs/boxo#1167, ipfs/boxo#329), and dnsaddr= multiaddrs carrying rotating /certhash/ segments.
TTL fixes for existing lookups (#33)
The TTL of an RRset with differing per-record TTLs is now the lowest one, order-independent, and a genuine TTL of 0 (do not cache) is respected (RFC 2181). An empty A or AAAA answer no longer zeroes out the other family's TTL, so addresses of IPv4-only and IPv6-only domains are cached reliably again.
Requires Go 1.25 (#30, #32, #36)
go.mod now requires Go 1.25.
Full Changelog: v0.5.0...v0.6.0