You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The package golang.org/x/net/internal/iana contains many useful constants which could be very helpful for users outside of the x/net repository.
For example, if I wanted to implement my own IPv4 marshaling and unmarshaling package, I would have to write out a list by hand, or copy the entire list of protocol number constants from the x/net/internal/iana package anyway.
Is there a strong argument for this package to remain internal? Moving it to x/net/iana or similar would provide a great deal of value for a much larger number of users. Because there cannot be external users of this package as-is, the change would only require updating import paths within the x/net packages.
See https://groups.google.com/d/msg/golang-dev/gcYID6KPnXc/Hil2WBZX-7QJ
I think I understand what you wrote, but I don't believe the package design makes sense. The IANA is in charge of LOTS of numbers (http://www.iana.org/protocols). If this package doesn't have all the numbers, then it is not well named. If it does have all the numbers, then I fear it will become unnavigable, perhaps worse even than syscall. Either choice seems like a serious problem.
I think it might make more sense for now just to paste the numbers into the packages that need them, as unexported constants. Three packages is not that many.
I don't believe the package design makes sense. The IANA is in charge of LOTS of numbers (http://www.iana.org/protocols). If this package doesn't have all the numbers, then it is not well named. If it does have all the numbers, then I fear it will become unnavigable, perhaps worse even than syscall. Either choice seems like a serious problem.
I also disagree that exposing the current package would "provide a great deal of value" for a significant number of users. And I think we're not set up well to manage the package.
rsc
changed the title
proposal: move x/net/internal/iana to x/net/iana
proposal: x/net/internal/iana: move to x/net/iana
Oct 24, 2015
The package
golang.org/x/net/internal/iana
contains many useful constants which could be very helpful for users outside of thex/net
repository.For example, if I wanted to implement my own IPv4 marshaling and unmarshaling package, I would have to write out a list by hand, or copy the entire list of protocol number constants from the
x/net/internal/iana
package anyway.Is there a strong argument for this package to remain internal? Moving it to
x/net/iana
or similar would provide a great deal of value for a much larger number of users. Because there cannot be external users of this package as-is, the change would only require updating import paths within thex/net
packages./cc @dominikh
The text was updated successfully, but these errors were encountered: