Skip to content

Commit

Permalink
Merge branch 'main' of github.com:streamingfast/firehose-gear
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduard-Voiculescu committed Jul 23, 2024
2 parents a8f5ff9 + d95987d commit f8bb749
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions templates/gen_types.go.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ func {{ $msg.ToFuncName $metadata }}(fields []*registry.DecodedField) {{ $msg.Re
{{- $meta := .Generator.Metadata }}
{{- $goType := $field.ToGoTypeName $meta }}

func {{ $field.ToFuncName $meta}}(in []*registry.DecodedField) {{ $field.ReturnType $meta }} {
out := make([]{{ $goType }}, len(in))
for i := range in {
out = append(out, i.Value.({{ $goType }}))
func {{ $field.ToFuncName $meta}}(fields []*registry.DecodedField) {{ $field.ReturnType $meta }} {
out := make([]{{ $goType }}, len(fields))
for _, f := range fields {
out = append(out, f.Value.({{ $goType }}))
}
return out
}
Expand Down

0 comments on commit f8bb749

Please sign in to comment.