mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: support local package names for generated packages
The new Alias option adds package aliases (local names) for all type-packages that their import identifier conflicts with user-defined packages (i.e. GoType).
This commit is contained in:
committed by
Ariel Mashraki
parent
51663407cf
commit
0e49dd1d9f
@@ -14,7 +14,7 @@ in the LICENSE file in the root directory of this source tree.
|
||||
import (
|
||||
"{{ $.Config.Package }}/predicate"
|
||||
{{- range $n := $.Nodes }}
|
||||
"{{ $.Config.Package }}/{{ $n.Package }}"
|
||||
{{ $n.Alias }} "{{ $.Config.Package }}/{{ $n.PackageDir }}"
|
||||
{{- end }}
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
|
||||
Reference in New Issue
Block a user