From 51f293fc54305dc1bf635911583fbf214a6038a8 Mon Sep 17 00:00:00 2001 From: MasseElch <12862103+masseelch@users.noreply.github.com> Date: Mon, 2 May 2022 13:29:53 +0200 Subject: [PATCH] =?UTF-8?q?entc/gen/template/sql/feature:=20add=20comment?= =?UTF-8?q?=20to=20feature=20field=20on=20config=E2=80=A6=20(#2515)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * entc/gen/template/sql/feature: add comment to feature field on config and remove blank line * all: go generate --- entc/gen/template/dialect/sql/feature/schemaconfig.tmpl | 3 ++- entc/integration/multischema/ent/config.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/entc/gen/template/dialect/sql/feature/schemaconfig.tmpl b/entc/gen/template/dialect/sql/feature/schemaconfig.tmpl index df690dc918..696f54c43b 100644 --- a/entc/gen/template/dialect/sql/feature/schemaconfig.tmpl +++ b/entc/gen/template/dialect/sql/feature/schemaconfig.tmpl @@ -47,7 +47,8 @@ func NewSchemaConfigContext(parent context.Context, config SchemaConfig) context {{/* Addtional fields to the config struct. */}} {{- define "dialect/sql/config/fields/schemaconfig" -}} - {{- if $.FeatureEnabled "sql/schemaconfig" }} + {{- if $.FeatureEnabled "sql/schemaconfig" -}} + // schemaConfig contains alternative names for all tables. schemaConfig SchemaConfig {{- end }} {{- end -}} diff --git a/entc/integration/multischema/ent/config.go b/entc/integration/multischema/ent/config.go index 063cc0f55f..af97dc2577 100644 --- a/entc/integration/multischema/ent/config.go +++ b/entc/integration/multischema/ent/config.go @@ -27,7 +27,7 @@ type config struct { log func(...interface{}) // hooks to execute on mutations. hooks *hooks - + // schemaConfig contains alternative names for all tables. schemaConfig SchemaConfig }