alecthomas / go_serialization_benchmarks

Benchmarks of Go serialization methods
https://alecthomas.github.io/go_serialization_benchmarks/
1.56k stars 158 forks source link

gob: unknown type id or corrupted data #103

Closed DedAzaMarks closed 2 years ago

DedAzaMarks commented 2 years ago

This is more question about go, rather than about benchmark. In gob serializer init function, after removing thees line https://github.com/alecthomas/go_serialization_benchmarks/blob/6f010e2a1cfe9cfa584fa261929e49f7fd7fd26b/serialization_benchmarks_test.go#L406 https://github.com/alecthomas/go_serialization_benchmarks/blob/6f010e2a1cfe9cfa584fa261929e49f7fd7fd26b/serialization_benchmarks_test.go#L411 Unmarshal function returns unmarshal error gob: unknown type id or corrupted data. Could you please explain this?

Thank you

pascaldekloe commented 2 years ago

The gob.Register was missing. Fixed in #107, explained in #36.

alecthomas commented 2 years ago

Thanks!