Skip to content

Commit

Permalink
entc/gen: remove space around continue for 1.18 compatible (#2962)
Browse files Browse the repository at this point in the history
Related: golang/go#51670
Signed-off-by: Giau. Tran Minh <hello@giautm.dev>

Signed-off-by: Giau. Tran Minh <hello@giautm.dev>
  • Loading branch information
giautm committed Sep 26, 2022
1 parent 7ad7df2 commit 679109f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion entc/gen/template/builder/setter.tmpl
Expand Up @@ -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). */}}
Expand Down
2 changes: 1 addition & 1 deletion entc/gen/template/builder/update.tmpl
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion entc/gen/template/dialect/sql/update.tmpl
Expand Up @@ -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 }}
Expand Down

0 comments on commit 679109f

Please sign in to comment.