jaypipes / ghw

Go HardWare discovery/inspection library
Apache License 2.0
1.62k stars 174 forks source link

block: allow encode/decode cycle for block.Info #275

Closed ffromani closed 2 years ago

ffromani commented 2 years ago

The block.Info struct uses a couple of new types which lack proper UnmarshalJSON methods, and this prevent to have full encode/decode/encode cycles (aka roundtrips).

This seems a unnecessary limitation, so this patch adds the missing functions.

Fixes: https://github.com/jaypipes/ghw/issues/274 Signed-off-by: Francesco Romani fromani@redhat.com