diff --git a/code-generation/language-go/src/main/resources/templates/go/complex-type-template.go.ftlh b/code-generation/language-go/src/main/resources/templates/go/complex-type-template.go.ftlh index 66ec2bc4593..96c72c0e307 100644 --- a/code-generation/language-go/src/main/resources/templates/go/complex-type-template.go.ftlh +++ b/code-generation/language-go/src/main/resources/templates/go/complex-type-template.go.ftlh @@ -700,7 +700,7 @@ func (m *_${type.name}) GetTypeName() string { <#if !type.isDiscriminatedParentTypeDefinition()> func (m *_${type.name}) GetLengthInBits(ctx context.Context) uint16 { <#if type.isDiscriminatedChildTypeDefinition()> - lengthInBits := uint16(m.${type.getParentType().orElseThrow().name}Contract.(*_${type.getParentType().orElseThrow().name}).getLengthInBits(ctx)) + lengthInBits := uint16(m.${type.getParentType().orElseThrow().name}Contract.(*_${type.getParentType().orElseThrow().name}).GetLengthInBits(ctx)) <#else> lengthInBits := uint16(0) @@ -767,7 +767,7 @@ func (m *_${type.name}) GetLengthInBits(ctx context.Context) uint16 { <#elseif helper.isEnumField(discriminatorField)> lengthInBits += ${helper.getEnumBaseTypeReference(discriminatorField.type).sizeInBits}; <#else> - lengthInBits += ${discriminatorField.name}.getLengthInBits(); + lengthInBits += ${discriminatorField.name}.GetLengthInBits(); <#break> <#case "enum"> @@ -877,7 +877,7 @@ func (m *_${type.name}) GetLengthInBits(ctx context.Context) uint16 { <#if type.isDiscriminatedParentTypeDefinition()> -func (m *_${type.name}) getLengthInBits(ctx context.Context) uint16 { +func (m *_${type.name}) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) <#list type.fields as field> <#switch field.typeName>