Go 1.26 introduces a new Compare method for the netip.Prefix type, enabling standardized comparison and sorting of IP subnets. The method follows IANA conventions and Python's netaddr implementation, ordering prefixes by validity, address family (IPv4 before IPv6), masked IP address, prefix length, and unmasked address. This
Sort: