aarongable pushed to netip-refactor at aarongable/dns 2025年12月11日 17:54:22 +01:00
5554577db5 Use == instead of .Compare
aarongable commented on pull request miekg/dns#468 2025年12月11日 17:52:36 +01:00
Migrate from net.IP to netip.Addr

d'oh, I misunderstood what you were saying. You're absolutely correct! I've changed this to use == instead of .Compare.

aarongable pushed to netip-refactor at aarongable/dns 2025年12月11日 17:50:18 +01:00
3bcc7c498e Avoid MustParseAddr for anything but hardcoded strings
aarongable commented on pull request miekg/dns#468 2025年12月11日 17:01:06 +01:00
Migrate from net.IP to netip.Addr

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...

aarongable commented on pull request miekg/dns#468 2025年12月11日 17:01:04 +01:00
Migrate from net.IP to netip.Addr

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...

aarongable commented on issue miekg/dns#5 2025年12月10日 21:31:59 +01:00
Use netip.Addr for A and AAAA records (and anywhere else)

Took me a minute, and the diff ended up larger than I was hoping, but PR here: miekg/dns#468

aarongable created pull request miekg/dns#468 2025年12月10日 21:31:48 +01:00
Migrate from net.IP to netip.Addr
aarongable pushed to netip-refactor at aarongable/dns 2025年12月10日 21:16:13 +01:00
7677f7edc0 Migrate from net.IP to netip.Addr
aarongable pushed to netip-refactor at aarongable/dns 2025年12月10日 20:57:28 +01:00
82fbb96330 Migrate from net.IP to netip.Addr
aarongable created branch netip-refactor in aarongable/dns 2025年12月10日 20:57:27 +01:00
aarongable created repository aarongable/dns 2025年12月10日 20:56:42 +01:00
aarongable commented on issue miekg/dns#5 2025年11月20日 00:13:32 +01:00
Use netip.Addr for A and AAAA records (and anywhere else)

I'd like to specifically request that netip.Addr be used for the inner struct field in AAAA and...