inetaf / netaddr

Network address types

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add ParseIPRange, IPRange.String?

bradfitz opened this issue · comments

I've implemented my own ParseIPRange a few times now. Add to this package?

And corresponding IPRange.String() in form from.String() + "-" + to.String()?

Objections?

/cc @danderson @mdlayher @josharian

e.g. here's one of the existing IPRange parsers: https://github.com/tailscale/tailscale/blob/70f14af21eaa130f0f677d30310951715c9498eb/wgengine/filter/tailcfg.go#L97

There's another in the coordinator server.