Content-Length: 298949 | pFad | http://github.com/terinjokes/netaddr

F0 GitHub - terinjokes/netaddr: Network address types
Skip to content

terinjokes/netaddr

 
 

Repository files navigation

netaddr

What

This is a package containing a new IP address type for Go.

See its docs: https://godoc.org/inet.af/netaddr

Motivation

  • golang/go#18804 ("net: reconsider representation of IP")
  • golang/go#18757 ("net: ParseIP should return an error, like other Parse functions")
  • golang/go#37921 ("net: Unable to reliably distinguish IPv4-mapped-IPv6 addresses from regular IPv4 addresses")
  • merges net.IPAddr and net.IP (which the Go net package is a little torn between for legacy reasons)
  • ...
  • TODO: finish this list

Maturity

This package is mature, optimized, and used heavily in production at Tailscale. However, API stability is not yet guaranteed.

Testing

In addition to regular Go tests, netaddr uses fuzzing. The corpus is stored separately, in a submodule, to minimize the impact on everyone else.

To use:

$ git submodule update --init
$ go get -u github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-build
$ go-fuzz-build && go-fuzz

About

Network address types

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/terinjokes/netaddr

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy