From bbab67fba769ff1d0938fb3086a976f9e3029737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Dywicki?= Date: Mon, 14 Oct 2024 18:10:16 +0200 Subject: [PATCH] Align naming of functions in go templates - always using GetLengthInBits. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ɓukasz Dywicki --- .../resources/templates/go/complex-type-template.go.ftlh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 66ec2bc459..96c72c0e30 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>