From eedbfbfb1cc7a51b872d5d487de7f4af4339d122 Mon Sep 17 00:00:00 2001 From: shota3506 Date: Fri, 29 Nov 2024 11:12:30 +0900 Subject: [PATCH] Avoid unkeyed fields usage in generated code --- cmd/generate-fix/internal/templates.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/generate-fix/internal/templates.go b/cmd/generate-fix/internal/templates.go index 00b9e5936..93d01f8a2 100644 --- a/cmd/generate-fix/internal/templates.go +++ b/cmd/generate-fix/internal/templates.go @@ -282,9 +282,9 @@ type {{ .Name }} struct { // FromMessage creates a {{ .Name }} from a quickfix.Message instance. func FromMessage(m *quickfix.Message) {{ .Name }} { return {{ .Name }}{ - Header: {{ .TransportPackage}}.Header{&m.Header}, + Header: {{ .TransportPackage}}.Header{Header: &m.Header}, Body: &m.Body, - Trailer: {{ .TransportPackage}}.Trailer{&m.Trailer}, + Trailer: {{ .TransportPackage}}.Trailer{Trailer: &m.Trailer}, Message: m, } }