placeholder

Hasnain says:

This was a pretty good read on how tailscale designed a new type to represent IPs in Go and various trade offs considered.

This was quite well written - it’s hard to write things that are both technically accurate and engaging at the same time, and this did both.

“Being written almost entirely in Go, the obvious choice would be for Tailscale to use the Go standard library’s net.IP address type for individual IPs and net.IPNet type for networks. Unfortunately, the standard library’s types have a number of problems, so we wrote a new package, inet.af/netaddr (github) containing a new IP type and more.”

Posted on 2021-03-11T03:40:42+0000