File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,13 @@ func (s *Status) Details() []any {
186
186
// that the type is wrapped in a MessageV1 wrapper again before
187
187
// returning. Note that protoc-gen-go doesn't generate code which
188
188
// implements ONLY MessageV2 at the time of writing.
189
+ //
190
+ // NOTE: Status details can also be added using the FromProto method.
191
+ // This could theoretically allow passing a Detail message that only
192
+ // implements the V2 API. In such a case the message will be wrapped in
193
+ // a MessageV1 wrapper when fetched using Details().
194
+ // Since protoc-gen-go generates only code that implements both V1 and
195
+ // V2 APIs for backward compatibility, this is not a concern.
189
196
details = append (details , protoadapt .MessageV1Of (detail ))
190
197
}
191
198
return details
You can’t perform that action at this time.
0 commit comments