Skip to content

Commit 337a8e1

Browse files
lib/go/thrift/internal/reflection: Handle legacy Name field in the StructDefiniton
1 parent 152a310 commit 337a8e1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/go/thrift/internal/reflection/definition.go

+5
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ func (str *structTypeRegistry) registerStructType(rs RegistrableStruct) {
103103
}
104104

105105
sd := rs.StructDefinition()
106+
107+
if sd.AnnotatedDefinition.Name == "" {
108+
sd.AnnotatedDefinition.Name = sd.Name
109+
}
110+
106111
ns := str.ext.Extract(sd.Namespace, sd.AnnotatedDefinition)
107112

108113
str.mu.Lock()

0 commit comments

Comments
 (0)