Have the compute struct contain the proto struct.

> On May 8, 2020, at 1:56 PM, cheng dong <qq451954...@gmail.com> 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/f67468e5-cb3b-4026-903a-f7ac49402bbd%40googlegroups.com.

-- 
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/71BBB1B9-9CDB-4E46-A486-A1FC7BF362BC%40ix.netcom.com.

Reply via email to