Closed d0zer11st closed 2 days ago
Yeah, I see the issue.
I should not have assumed that it would be able to work like this, types.Stringer
as a whole probably does not work. I would probably have to create a dedicated type for it.
I wish net.HardwareAddr
implemented Text or Binary Marshaler.
yeah, as I see there is only one usage of Stringer and it is for macaddr. the dedicated type would work better.
This should have been fixed in v0.28.0 which was released on 2024-06-25
Getting mac address not the same I stored before.
I think, the issue is in the Stringer.Scan() func, for macaddr the underlying type is
net.HardwareAddr
, simple type conversion is not the way to use it.https://github.com/stephenafamo/bob/blob/52634026e61a207a4e4efa2959932f1913f2176f/types/marshal.go#L76-L89
how to reproduce:
Code example.
Print results:
I also tried to insert Mac with just type conversion like this:
that leads to error