Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
boring_twenties
· 5y ago · 0 comments
Thanks, that's a bit interesting. I only know a little bit of Go, but I would have assumed you could just use an array ([4]byte) directly without a slice ([]byte) on top of it. Guess not.
Comments
[–]
bradfitz
5y ago
You can. But an IPv6 address won't fit in that.
[–]
zeeboo
5y ago
The type is designed to hold both ipv4 and ipv6 addresses.