Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

netaddr: plans for API changes after Go 1.18 net/netip #217

Open
mdlayher opened this issue Jan 12, 2022 · 3 comments
Open

netaddr: plans for API changes after Go 1.18 net/netip #217

mdlayher opened this issue Jan 12, 2022 · 3 comments

Comments

@mdlayher
Copy link
Member

@terinjokes brought up a good point today on my Twitch stream (hi chat!):

Will package netaddr be updated to use type aliases for net/netip as of Go 1.18? Perhaps we use build tags or similar to ease transition for folks who are stuck on 1.17 or older?

I don't have strong feelings at the moment but it seems like a good idea to start thinking about at least. I know there is some functionality in this package such as IP sets and ranges that did not make it into the stdlib as of yet. It seems like it would make sense to keep those around here, perhaps backed by type aliases into stdlib.

/cc @bradfitz @danderson @josharian

@josharian
Copy link
Collaborator

Unfortunately, it's not just types; the API changed a bit as well. We should figure out a transition plan, though, yes. @bradfitz had opinions about this, I think. And yes, netaddr will live on for IPSet and IPRange.

@bradfitz
Copy link
Contributor

Not really, other than netaddr having more API to do other things.

@smira
Copy link

smira commented May 24, 2022

what might be missing is the way to convert netaddr.IP to netip.Addr and back.

we have net.IP and netaddr.IP in our codebase, but I would rather converge around netip.Addr now and use netaddr.IP for additional features (e.g. IPSet)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@bradfitz @smira @josharian @mdlayher and others