Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: Add MarshalText and UnmarshalText to HardwareAddr #10244

Closed
krolaw opened this issue Mar 25, 2015 · 1 comment
Closed

net: Add MarshalText and UnmarshalText to HardwareAddr #10244

krolaw opened this issue Mar 25, 2015 · 1 comment

Comments

@krolaw
Copy link

krolaw commented Mar 25, 2015

When backing up routing config to JSON, discovered IP worked correctly, but HardwareAddr did not.
I think adding MarshalText and UnmarshalText to HardwareAddr will make it more consistent with IP.

Thanks.

@mikioh
Copy link
Contributor

mikioh commented Mar 26, 2015

It's easy to make own marshaler and unmarshaler stuff, and please do so.

IIRC, there's no standardized canonical form of textual representation even for IEEE stuff such as MAC-48/64, EUI-48/64. If you need to choose a format for your application, perhaps this RFC, https://tools.ietf.org/html/rfc7043, would be a help; I mean "two-digit hexadecimal numbers separated by hyphens."

@mikioh mikioh closed this as completed Mar 26, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants