Fastest way to get IPv4 address from string (2015)
stackoverflow.com
stackoverflow.com
From wikipedia: “When fewer than four numbers are specified in the address in dotted notation, the last value is treated as an integer of as many bytes as are required to fill out the address to four octets. (https://en.wikipedia.org/wiki/Internet_Protocol_version_4)
Yes, I know it's probably required by a spec. There's lots of weird old things in specs. Not all of them are sensible.
Keep it simple. Be kind to your fellow automaton.
As silly as this sounds, I wasn't aware there was a spec. That's half the fun!
https://github.com/golang/go/blob/go1.22.2/src/net/netip/net...