entc/gen: remove space around continue for 1.18 compatible (#2962)

Related: https://github.com/golang/go/issues/51670
Signed-off-by: Giau. Tran Minh <hello@giautm.dev>

Signed-off-by: Giau. Tran Minh <hello@giautm.dev>
This commit is contained in:
Giau. Tran Minh
2022-09-27 01:10:15 +07:00
committed by GitHub
parent 7ad7df2d04
commit 679109f5c2
3 changed files with 3 additions and 3 deletions

View File

@@ -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). */}}

View File

@@ -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.

View File

@@ -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 }}