truss icon indicating copy to clipboard operation
truss copied to clipboard

Crash When Generating Services Using gogoproto.embed

Open hunter001325 opened this issue 3 years ago • 1 comments

1、I define protocolbuff message with gogoproto.embed, for example: ` message UserBase { optional int64 id = 1; }

message UserDetail { optional UserBase UserBase = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; optional string name = 2 [(gogoproto.nullable) = true]; } `

crash as below: image

There hasn't Names: image

2、protocolbuff support embed filed: https://godoc.org/github.com/gogo/protobuf/gogoproto#hdr-More_Canonical_Go_Structures image

hunter001325 avatar Dec 04 '20 10:12 hunter001325

Making truss not panic should be pretty straightforward, but marshaling support may be limited.

zaquestion avatar Dec 04 '20 19:12 zaquestion