From bc66b1e3e4bfa7fd38723b5fe1b3ff2b750e2f87 Mon Sep 17 00:00:00 2001 From: Eric Myhre Date: Thu, 7 Jan 2021 20:38:30 +0100 Subject: [PATCH] Use more explicit field names in initializers. --- schema/gen/go/genUnionReprStringprefix.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/schema/gen/go/genUnionReprStringprefix.go b/schema/gen/go/genUnionReprStringprefix.go index 21d312c..53fbe66 100644 --- a/schema/gen/go/genUnionReprStringprefix.go +++ b/schema/gen/go/genUnionReprStringprefix.go @@ -12,14 +12,14 @@ var _ TypeGenerator = &unionReprStringprefixGenerator{} func NewUnionReprStringprefixGenerator(pkgName string, typ *schema.TypeUnion, adjCfg *AdjunctCfg) TypeGenerator { return unionReprStringprefixGenerator{ unionGenerator{ - adjCfg, - mixins.MapTraits{ + AdjCfg: adjCfg, + MapTraits: mixins.MapTraits{ PkgName: pkgName, TypeName: string(typ.Name()), TypeSymbol: adjCfg.TypeSymbol(typ), }, - pkgName, - typ, + PkgName: pkgName, + Type: typ, }, } } @@ -30,14 +30,14 @@ type unionReprStringprefixGenerator struct { func (g unionReprStringprefixGenerator) GetRepresentationNodeGen() NodeGenerator { return unionReprStringprefixReprGenerator{ - g.AdjCfg, - mixins.StringTraits{ + AdjCfg: g.AdjCfg, + StringTraits: mixins.StringTraits{ PkgName: g.PkgName, TypeName: string(g.Type.Name()) + ".Repr", TypeSymbol: "_" + g.AdjCfg.TypeSymbol(g.Type) + "__Repr", }, - g.PkgName, - g.Type, + PkgName: g.PkgName, + Type: g.Type, } } -- GitLab