mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
@@ -990,7 +990,7 @@ func templateHookTmpl() (*asset, error) {
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var _templateImportTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x53\xd1\x6a\xeb\x38\x10\x7d\x8e\xbf\xe2\x60\xf2\x90\x14\x2a\x77\xfb\xb6\x0b\xfb\x50\xba\x2d\x04\x96\x4b\xa1\xfd\x01\x45\x1a\xd9\x22\xb6\xe4\x2b\x4d\x7a\x1b\x8c\xff\xfd\x22\x5b\xa6\xbe\x0d\xcd\x4b\xc6\x3a\x33\xa3\x73\xce\x8c\x86\xa1\xba\x29\x1e\x7d\x7f\x09\xb6\x6e\x18\xf7\x77\x7f\xfd\x7d\xdb\x07\x8a\xe4\x18\xcf\x52\xd1\xd1\xfb\x13\x0e\x4e\x09\x3c\xb4\x2d\xa6\xa4\x88\x84\x87\x77\xd2\xa2\x78\x6b\x6c\x44\xf4\xe7\xa0\x08\xca\x6b\x82\x8d\x68\xad\x22\x17\x49\xe3\xec\x34\x05\x70\x43\x78\xe8\xa5\x6a\x08\xf7\xe2\x6e\x41\x61\xfc\xd9\xe9\xc2\xba\x09\xff\xff\xf0\xf8\xf4\xe3\xf5\x09\xc6\xb6\x84\x7c\x16\xbc\x67\x68\x1b\x48\xb1\x0f\x17\x78\x03\x5e\x5d\xc6\x81\x48\x14\x37\xd5\x38\x16\xc5\x30\x40\x93\xb1\x8e\x50\xda\xae\xf7\x81\x4b\x8c\x63\x31\x87\xd8\x15\x9b\x52\x79\xc7\xf4\xc1\x65\xb1\x29\x29\x04\x1f\x62\x8a\x4c\x37\x1d\x74\x92\x9b\xf4\x1f\x39\x58\x57\x4f\x08\xdb\x8e\xca\x62\x33\x0c\xb7\xa8\x6e\x70\xa8\x9d\x0f\x84\x9a\x1c\x05\xb6\xae\x86\x77\xa8\x83\xec\x1b\xc4\x9e\x94\x35\xd6\x28\x30\x75\x7d\x2b\x99\x22\x26\x46\x53\xa9\x35\x70\x9e\xb1\xa3\x9f\xd8\x8a\x47\xef\x8c\xad\xc5\x8b\x54\x27\x59\x13\xb6\x4b\xb4\x4f\x4c\x37\x9b\x72\x18\xae\x93\xc6\xb1\xea\x03\x69\xab\x24\x27\x3a\x53\xd3\x5f\x96\x1b\x6c\xc5\xe1\x3f\xf1\x76\xe9\x49\xbc\x9c\xea\x17\xc9\xcd\xdc\x64\xea\x22\x30\x8e\x4b\x32\x39\x3d\x23\x8b\x92\xd9\x11\xfa\x60\x0a\x4e\xb6\xe8\xe7\x8b\x32\x69\xe4\x5f\x4a\x5e\xf4\x2c\x86\x56\x7c\xe9\x29\x96\xd8\x62\x51\xb7\xf4\x2e\x6b\xcb\xcd\xf9\x28\x94\xef\x2a\x93\xf7\xa5\x22\x37\x59\xfb\x0d\x54\x69\x2b\x5b\x52\x9c\x2d\xce\x92\x5e\xd9\x87\x59\x75\x26\x1c\xa4\x4b\x4e\xe5\x31\xfe\xf3\x2f\xc4\xcc\x3f\xae\xd4\x2e\xe8\xb5\xe6\x3f\xe3\x6b\x41\x52\x6b\xcb\xd6\x3b\xd9\x66\x55\xfb\xb4\x46\xb9\xa2\x48\xaf\x02\x0f\x9f\x55\xc6\x07\xcc\x85\x69\x01\x8c\xa5\x56\xc7\x99\xb8\x3a\x47\xf6\x1d\x26\x7f\x66\x1f\xaf\xb6\x71\x31\xef\x36\x9b\xbc\x12\x67\x92\xae\xad\x78\x9e\x1b\x7e\x19\xc2\xb6\x3f\xd5\x13\x6e\xae\x86\xbd\x4e\xb3\x06\xd2\xe9\x39\x7b\x37\x6d\x5c\x23\x63\x1e\xf5\xee\x28\x23\xcd\xd0\x7e\xbf\x5f\x1b\x97\x8e\x92\x6b\xeb\x4e\x59\xfd\x97\xcf\x55\x78\xe5\x0b\x37\x92\xa1\xa4\xc3\x91\xe0\xdf\x29\x04\xab\x49\xa7\x07\xec\xc3\xf4\xf4\x3d\xa4\xd6\xf8\xf4\x3a\x9b\x18\x13\xb2\x6c\x9f\xf8\xc6\xb5\xf5\x84\xc6\x71\x18\xc8\xe9\x71\x2c\x7e\x07\x00\x00\xff\xff\x0c\xe5\xa1\xa2\xb0\x04\x00\x00")
|
||||
var _templateImportTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x54\xcb\x6a\x2b\x39\x10\x5d\xbb\xbf\xa2\x68\xbc\xb0\x03\x51\x67\xb2\x9b\x40\x16\x21\x0f\x30\x0c\x43\x20\x99\x0f\x90\xa5\x52\xb7\x70\x5b\xd2\x48\xe5\xdc\x98\xa6\xff\xfd\xa2\x17\xe9\x8b\x6f\x6e\x36\x29\x74\xea\x75\x4e\x1d\xf7\x34\x75\x57\xcd\xa3\x75\x67\xaf\xfb\x81\xe0\xf6\xe6\xaf\xbf\xaf\x9d\xc7\x80\x86\xe0\x85\x0b\xdc\x5b\x7b\x80\x9d\x11\x0c\x1e\xc6\x11\x52\x52\x80\x88\xfb\x0f\x94\xac\x79\x1f\x74\x80\x60\x4f\x5e\x20\x08\x2b\x11\x74\x80\x51\x0b\x34\x01\x25\x9c\x8c\x44\x0f\x34\x20\x3c\x38\x2e\x06\x84\x5b\x76\x53\x51\x50\xf6\x64\x64\xa3\x4d\xc2\xff\xd9\x3d\x3e\xff\xfb\xf6\x0c\x4a\x8f\x08\xe5\xcd\x5b\x4b\x20\xb5\x47\x41\xd6\x9f\xc1\x2a\xa0\xc5\x30\xf2\x88\xac\xb9\xea\xe6\xb9\x69\xa6\x09\x24\x2a\x6d\x10\x5a\x7d\x74\xd6\x53\x0b\xf3\xdc\xe4\x10\x36\xcd\xaa\x15\xd6\x10\x7e\x52\xdb\xac\x5a\xf4\xde\xfa\x10\x23\x75\x4c\x0f\x47\x4e\x43\xfc\x1f\xc8\x6b\xd3\x27\x84\xf4\x11\xdb\x66\x35\x4d\xd7\xd0\x5d\xc1\xae\x37\xd6\x23\xf4\x68\xd0\x93\x36\x3d\x58\x03\xbd\xe7\x6e\x80\xe0\x50\x68\xa5\x95\x00\xc2\xa3\x1b\x39\x61\x80\xb4\x51\x2a\xd5\x0a\x8c\x25\xd8\xe0\xff\xb0\x66\x8f\xd6\x28\xdd\xb3\x57\x2e\x0e\xbc\x47\x58\xd7\x68\x1b\x37\x5d\xad\xda\x69\xba\x4c\x9a\xe7\xce\x79\x94\x5a\x70\x8a\xeb\xa4\xa6\x3f\x34\x0d\xb0\x66\xbb\x27\xf6\x7e\x76\xc8\x5e\x0f\xfd\x2b\xa7\x21\x37\x49\x5d\x18\xcc\x73\x4d\x46\x23\x33\x52\x99\x64\x45\xf0\x93\xd0\x1b\x3e\x82\xcb\x83\xca\xd2\x50\xfe\x62\x72\xe5\x53\x05\xed\xe8\xec\x30\xb4\xb0\x86\xca\xae\xf6\x6e\x7b\x4d\xc3\x69\xcf\x84\x3d\x76\xaa\xf8\xa5\x43\x93\xa4\xfd\x06\xea\xa4\xe6\x23\x0a\x2a\x12\x17\x4a\x6f\x64\x7d\x66\x5d\x16\xf6\xdc\x44\xa5\xca\x19\xef\xee\x81\xe5\xfd\xc3\x82\x6d\x45\x2f\x39\xff\x1a\x5f\x12\xe2\x52\x6a\xd2\xd6\xf0\xb1\xb0\xda\x46\x1b\x95\x8a\x26\xfe\x2a\xe0\xe1\xab\x4a\x59\x0f\xb9\x30\x1a\x40\x69\x1c\x65\xc8\x8b\x8b\x53\x20\x7b\x84\xa4\x4f\xd6\xf1\xc2\x8d\x55\xbc\xeb\xba\xd7\xba\x34\xb8\xbb\x87\x35\x7b\xc9\xf1\x3c\x4f\x53\xb4\x4c\xba\xed\x7f\x01\xfd\x53\xea\x21\x33\x50\x2b\xee\x81\x3b\x17\x97\xac\x0f\x31\x3d\xa7\x2c\x89\x17\xe9\x54\x9a\xa0\xea\x80\xa2\xd0\xda\x1d\xfa\x0c\xfc\xc6\x43\xc5\xb8\x3c\x8e\x88\x79\x9b\x64\xe1\x81\x87\xe2\x9d\xcd\x9e\x07\xcc\xd0\x76\xbb\x5d\x5e\x22\x3e\xfd\xf1\x0c\x8b\xf0\x42\x5f\x1a\x38\x81\xe0\x06\xf6\x08\xf6\x03\xbd\xd7\x12\x65\xfc\x10\x58\x9f\x3e\x21\x16\xb8\x94\xf0\x75\xb3\x72\x8c\x10\x91\xea\x62\xf6\x8d\xfa\xcb\x4b\x2f\x95\xfa\x19\x00\x00\xff\xff\x8b\x2d\x96\x3c\xfa\x04\x00\x00")
|
||||
|
||||
func templateImportTmplBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
@@ -1005,7 +1005,7 @@ func templateImportTmpl() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "template/import.tmpl", size: 1200, mode: os.FileMode(420), modTime: time.Unix(1, 0)}
|
||||
info := bindataFileInfo{name: "template/import.tmpl", size: 1274, mode: os.FileMode(420), modTime: time.Unix(1, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
@@ -34,13 +34,14 @@ import (
|
||||
|
||||
{{/* A template for importing fields with custom types */}}
|
||||
{{ define "import/types" -}}
|
||||
{{- range $f := $.Fields }}
|
||||
{{- $pkg := $f.Type.PkgPath }}
|
||||
{{- if and $pkg (not (hasImport (base $pkg ))) }}
|
||||
{{- $fields := $.Fields }}{{ if $.ID.UserDefined }}{{ $fields = append $fields $.ID }}{{ end }}
|
||||
{{- range $f := $fields }}
|
||||
{{- $pkg := $f.Type.PkgPath }}
|
||||
{{- if and $pkg (not (hasImport (base $pkg ))) }}
|
||||
"{{ $pkg }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/* A template that can be overrided in order to add additional imports to packages.*/}}
|
||||
{{ define "import/additional" }}{{end}}
|
||||
{{ define "import/additional" }}{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user