Skip to content

Commit

Permalink
Align naming of functions in go templates - always using GetLengthInB…
Browse files Browse the repository at this point in the history
…its.

Signed-off-by: Łukasz Dywicki <[email protected]>
  • Loading branch information
splatch committed Oct 14, 2024
1 parent 476b696 commit bbab67f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
</#if>
Expand Down Expand Up @@ -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();
</#if>
<#break>
<#case "enum">
Expand Down Expand Up @@ -877,7 +877,7 @@ func (m *_${type.name}) GetLengthInBits(ctx context.Context) uint16 {
</#if>

<#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>
Expand Down

0 comments on commit bbab67f

Please sign in to comment.