gob have bad performance compare to gogo-proto. in fact, every reflection base encode/decode library do bad
On Thursday, May 21, 2020 at 12:03:18 AM UTC+8 Saied Seghatoleslami wrote: Why not use gob encoding? I am using it across nats and it is working fine. The only workaround that I have had to do is to string encode the errors and convert them back to errors on the other side. On Friday, May 8, 2020 at 2:56:22 PM UTC-4, cheng dong wrote: i use protobuf to do rpc in golang . for every message XXX in proto, i have to define a struct XXX in go, compute and then copy its field one by one to pb.XXX(because struct XXX have some field not in pb.XXX), when i have many struct XXX, it is very ineffective and very slow. so how could i use a single struct both used for compute and marshal ? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/897e08e4-1149-4a5e-83e3-23ee13435615n%40googlegroups.com.