Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

entc: remove space around continue for 1.18 compatible #2962

Merged
merged 1 commit into from Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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