how generate nestd message field?

16 views
Skip to first unread message

qy zhu

unread,
Aug 8, 2022, 9:00:44 AM8/8/22
to Protocol Buffers
- example
message a {
    string b = 1;
}

message c {
    a c1 = 1;
    string c2 = 2;
}

- load go struct by generate 
type C struct {
    *A `protobuf:"bytes,1,opt,name=c1`
    C2 string
}

type A {
    B string
}

QQ截图20220808205601.png
Reply all
Reply to author
Forward
0 new messages