entc/gen/template: fix intercept package imports (#3507)

This commit is contained in:
Jannik Clausen
2023-04-28 16:26:17 +02:00
committed by GitHub
parent af5ec59dbc
commit 78c9c0d947

View File

@@ -12,7 +12,12 @@ in the LICENSE file in the root directory of this source tree.
{{ template "header" . }}
{{ end }}
import "{{ $.Config.Package }}"
import (
"{{ $.Config.Package }}"
{{- range $n := $.Nodes }}
{{ $n.PackageAlias }} "{{ $n.Config.Package }}/{{ $n.PackageDir }}"
{{- end }}
)
{{ $pkg := base $.Config.Package }}