[go-nuts] Re: golang protobuf, struct copy problem

2023-02-07 Thread Jason E. Aten
I wrote greenpack to avoid exactly this; having to maintain two structs in sync. Now I just maintain a single Go struct, and the .go source file serves as the IDL. Running go generate updates the generated serialization code. https://github.com/glycerine/greenpack It is also faster than proto

[go-nuts] Re: golang protobuf, struct copy problem

2023-01-26 Thread cheng dong
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 ha

[go-nuts] Re: golang protobuf, struct copy problem

2020-05-20 Thread Saied Seghatoleslami
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