From efed096c01162bc53144a5b0eea4563f7f7cc00e Mon Sep 17 00:00:00 2001 From: "Giau. Tran Minh" Date: Tue, 27 Sep 2022 00:40:27 +0700 Subject: [PATCH] entc: remove space around `continue` for 1.18 compatible Related: https://github.com/golang/go/issues/51670 Signed-off-by: Giau. Tran Minh --- entc/gen/template/builder/setter.tmpl | 2 +- entc/gen/template/builder/update.tmpl | 2 +- entc/gen/template/dialect/sql/update.tmpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/entc/gen/template/builder/setter.tmpl b/entc/gen/template/builder/setter.tmpl index e7ae123f2d..ea0200f5ee 100644 --- a/entc/gen/template/builder/setter.tmpl +++ b/entc/gen/template/builder/setter.tmpl @@ -66,7 +66,7 @@ in the LICENSE file in the root directory of this source tree. {{ range $e := $.EdgesWithID }} {{ if and $updater $e.Immutable }} {{/* Skip to the next one as immutable edges cannot be updated. */}} - {{ continue }} + {{continue}} {{ end }} {{ $op := "add" }}{{ $idsFunc := $e.MutationAdd }}{{ if $e.Unique }}{{ $op = "set" }}{{ $idsFunc = $e.MutationSet }}{{ end }} {{/* Check if this setter was already defined by the field-setters (e.g. edge-field with the same name). */}} diff --git a/entc/gen/template/builder/update.tmpl b/entc/gen/template/builder/update.tmpl index af22b14c79..9a112ee929 100644 --- a/entc/gen/template/builder/update.tmpl +++ b/entc/gen/template/builder/update.tmpl @@ -270,7 +270,7 @@ func ({{ $receiver }} *{{ $onebuilder }}) ExecX(ctx context.Context) { {{ range $e := $.EdgesWithID }} {{ if $e.Immutable }} {{/* Skip to the next one as immutable edges cannot be updated. */}} - {{ continue }} + {{continue}} {{ end }} {{ $func := $e.MutationClear }} // {{ $func }} clears {{ if $e.Unique }}the "{{ $e.Name }}" edge{{ else }}all "{{ $e.Name }}" edges{{ end }} to the {{ $e.Type.Name }} entity. diff --git a/entc/gen/template/dialect/sql/update.tmpl b/entc/gen/template/dialect/sql/update.tmpl index 2c8884de42..c667ec6551 100644 --- a/entc/gen/template/dialect/sql/update.tmpl +++ b/entc/gen/template/dialect/sql/update.tmpl @@ -129,7 +129,7 @@ func ({{ $receiver }} *{{ $builder }}) sqlSave(ctx context.Context) ({{ $ret }} {{- range $e := $.EdgesWithID }} {{- if $e.Immutable }} {{- /* Skip to the next one as immutable edges cannot be updated. */}} - {{- continue }} + {{- continue}} {{- end }} if {{ $mutation }}.{{ $e.MutationCleared }}() { {{- with extend $ "Edge" $e }}