- https://aarongable.com
-
Joined on
2025年11月19日
d'oh, I misunderstood what you were saying. You're absolutely correct! I've changed this to use == instead of .Compare.
Yeah, I noticed that the existing code is happy to populate the A/AAAA records with nil if the .To4() conversion fails. Using MustParseAddr was an easy shortcut to get similar behavior, but...
Yeah, using MustParseAddr (and the potential panics that it creates) doesn't make me happy either. But I think it's the right call here, because "127.0.0.1" is an obviously-correct hard-coded...
Took me a minute, and the diff ended up larger than I was hoping, but PR here: miekg/dns#468
I'd like to specifically request that netip.Addr be used for the inner struct field in AAAA and...