Quantcast
Channel: User Norbert - Stack Overflow
Viewing all articles
Browse latest Browse all 42

Answer by Norbert for Protobuffers and Golang --- writing out marshal'ed structs and reading back in

$
0
0

Use proto.Marshal/Unmarshal:

That way you simulate (closest) to receiving the message while avoiding side effects from other Marshal methods.

Alternative: Dump it as []byte and reread it.


Viewing all articles
Browse latest Browse all 42

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>