From 2e6c06632388d44c4342d84efa6736bff541479a Mon Sep 17 00:00:00 2001 From: Ariel Mashraki <7413593+a8m@users.noreply.github.com> Date: Wed, 28 Oct 2020 18:12:11 +0200 Subject: [PATCH] Revert "entc/gen: invoke chain hook in order to registration (#898)" (#899) This reverts commit cdf2107cf8cbd7a43b614f26ec9ab868106cf399. --- entc/gen/internal/bindata.go | 4 ++-- entc/gen/template/hook.tmpl | 2 +- entc/integration/config/ent/hook/hook.go | 2 +- entc/integration/customid/ent/hook/hook.go | 2 +- entc/integration/ent/hook/hook.go | 2 +- entc/integration/gremlin/ent/hook/hook.go | 2 +- entc/integration/hooks/ent/hook/hook.go | 2 +- entc/integration/idtype/ent/hook/hook.go | 2 +- entc/integration/json/ent/hook/hook.go | 2 +- entc/integration/migrate/entv1/hook/hook.go | 2 +- entc/integration/migrate/entv2/hook/hook.go | 2 +- entc/integration/privacy/ent/hook/hook.go | 2 +- entc/integration/template/ent/hook/hook.go | 2 +- examples/edgeindex/ent/hook/hook.go | 2 +- examples/entcpkg/ent/hook/hook.go | 2 +- examples/m2m2types/ent/hook/hook.go | 2 +- examples/m2mbidi/ent/hook/hook.go | 2 +- examples/m2mrecur/ent/hook/hook.go | 2 +- examples/o2m2types/ent/hook/hook.go | 2 +- examples/o2mrecur/ent/hook/hook.go | 2 +- examples/o2o2types/ent/hook/hook.go | 2 +- examples/o2obidi/ent/hook/hook.go | 2 +- examples/o2orecur/ent/hook/hook.go | 2 +- examples/privacyadmin/ent/hook/hook.go | 2 +- examples/privacytenant/ent/hook/hook.go | 2 +- examples/start/ent/hook/hook.go | 2 +- examples/traversal/ent/hook/hook.go | 2 +- 27 files changed, 28 insertions(+), 28 deletions(-) diff --git a/entc/gen/internal/bindata.go b/entc/gen/internal/bindata.go index 378e4a4bc..03e11c07c 100644 --- a/entc/gen/internal/bindata.go +++ b/entc/gen/internal/bindata.go @@ -970,7 +970,7 @@ func templateHeaderTmpl() (*asset, error) { return a, nil } -var _templateHookTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x58\x5f\x8f\xdb\xb8\x11\x7f\xb6\x3f\xc5\x44\x70\x00\x29\x55\xe8\xf4\xde\xda\x22\x0f\x0b\x5f\x82\x2c\x70\x5d\x17\xd7\x5c\x5f\x0e\x87\x1c\x23\x8e\x6c\xd6\x32\x29\x90\xf4\xee\x1a\x8e\xbe\x7b\x31\x24\x25\xd1\x56\xe2\xdb\xa4\x29\xfa\xb2\x6b\xcf\x0c\xe7\xcf\x6f\xfe\x70\xe8\xd3\x69\xf9\x62\xbe\xd2\xed\xd1\xc8\xcd\xd6\xc1\x0f\xaf\xfe\xfc\x97\x97\xad\x41\x8b\xca\xc1\x5b\x5e\xe1\x47\xad\x77\x70\xab\x2a\x06\x37\x4d\x03\x5e\xc8\x02\xf1\xcd\x3d\x0a\x36\x7f\xbf\x95\x16\xac\x3e\x98\x0a\xa1\xd2\x02\x41\x5a\x68\x64\x85\xca\xa2\x80\x83\x12\x68\xc0\x6d\x11\x6e\x5a\x5e\x6d\x11\x7e\x60\xaf\x7a\x2e\xd4\xfa\xa0\xc4\x5c\x2a\xcf\xff\xe9\x76\xf5\xe6\xee\x9f\x6f\xa0\x96\x0d\x42\xa4\x19\xad\x1d\x08\x69\xb0\x72\xda\x1c\x41\xd7\xe0\x12\x63\xce\x20\xb2\xf9\x8b\x65\xd7\xcd\xe7\xa7\x13\x08\xac\xa5\x42\xc8\xb6\x5a\xef\x32\x88\xc4\x07\xe9\xb6\x80\x8f\x0e\x95\x80\x05\x64\xff\xe0\xd5\x8e\x6f\x30\x4b\xa4\x66\xa7\x13\x38\xdc\xb7\x0d\x77\x74\x18\xb9\x40\x93\x01\x23\xd6\xe9\x04\x74\x8e\x54\xc9\x7d\xab\x8d\x83\xec\x74\x82\x05\x5b\x69\x55\xcb\x0d\x8b\xca\xa0\xeb\x32\x6f\x6b\xd1\xee\x36\xf0\xd7\xd7\xf0\x91\x5b\xfc\x9c\x94\x17\x32\x5c\x6d\x10\x16\x8a\x04\x17\xec\x4e\x0b\xb4\xbd\x17\x0b\xc5\xf7\x48\xf4\xd6\x48\xe5\x60\xa1\xd8\x1d\x11\xb2\xb7\x07\x55\x0d\xae\x2e\xdc\xb1\x1d\x85\x6a\xc8\x5e\x3c\xb7\xec\xb9\xcd\x82\xf5\x85\x62\x7f\x3f\x38\xee\xa4\x56\xfe\x2c\x19\x9d\x2d\x97\xf0\x7e\x8b\x30\x58\xe8\x3a\xf0\x4a\xa4\x05\xae\x80\x0b\xde\x3a\xca\x91\x06\xde\x34\xfa\xc1\x03\x7f\xb0\x48\x68\x6b\x23\xa4\xe2\xe6\xe8\x75\xd4\x07\x55\x91\x62\xe0\x36\xe8\x62\xd1\x04\xec\xc9\xa4\x36\x6c\x3e\xf3\x7a\x53\x43\x74\x28\xaf\xb4\x72\xf8\xe8\x08\x11\xfa\x5f\xc2\x10\x47\xd7\x15\x90\xf7\xd0\x75\x1d\xfb\x17\x6f\x0e\x58\x02\x1a\xa3\x4d\x11\x5c\xf7\xf1\x20\x54\xbc\x69\x2c\xd4\x79\xe5\x1e\x4b\xd8\x17\x6c\x3e\x23\xd5\x90\xd7\xa9\xb9\x22\x4a\x93\x14\x4c\xac\xee\x21\xb1\xd4\xc3\x74\xc5\x3e\x9c\xe6\xb3\xd9\xfe\xbe\x04\xbd\x23\xc0\xf7\x2c\x4f\xfd\x9e\xcf\x66\xb2\x86\x67\x7a\xe7\xc5\x66\x06\xdd\xc1\x28\x50\xb2\x29\xa1\xde\x3b\xf6\x86\x54\xd4\x79\x76\x50\xf8\xd8\x62\xe5\x50\x04\x98\x08\x40\xaf\xe2\xf9\x7b\x06\x81\x95\xc2\x91\x51\x70\xf3\xd9\xac\x9b\x0f\x2a\xfb\x98\xef\x8b\xf9\xec\xac\x26\x97\x4b\x58\x69\x25\xa4\xd7\x49\xc9\x04\x2a\x6a\x8a\x3b\xd2\xfa\x8c\xb1\xb9\xd7\xbe\x3a\x63\x7c\x3e\x2b\x13\x74\x3e\x6a\xdd\x78\x53\x37\x4a\xc0\xc6\xe8\x43\x6b\x47\x0b\x36\xf4\x97\x6f\xef\xbb\x1f\x41\xb7\x68\x42\x21\xf8\xdc\xdc\x28\x91\xd7\xd2\x58\x57\x82\x45\x3a\x33\x7a\x50\xd2\xfc\x70\xc0\x18\x1b\x48\x45\xe2\xdf\x69\x3e\x04\xef\x3d\xfd\x8a\x6c\x92\xbf\x3e\x23\x94\x1c\x6f\xbd\x2f\x19\xf8\xf4\x09\x9e\x05\x47\x06\x52\x9a\xba\x9a\x37\x16\x23\xf4\xb5\x36\xf0\xa1\xf4\x81\x52\xea\x43\xd3\x7a\x97\xfd\x09\xd2\x3d\xd5\x73\xa9\xc8\x6b\x4a\x12\xe9\xcc\x01\x29\x85\x21\x75\x6b\x73\x0d\xce\xf5\xcf\x97\x68\xae\xcd\xff\x17\xcc\x09\x96\x57\xa0\x0c\x91\x3e\x11\xc9\x2f\x03\x19\xd5\x5c\xe2\x18\xf1\xed\x81\xbc\xd3\x0e\x14\x6e\xb8\x43\x6a\x81\x8d\xbc\x47\x35\x42\x1a\xc1\xbb\xd3\x2e\x3f\x07\xed\x7b\x23\x14\x15\x9c\x95\xc5\xe8\xe3\x3b\x6e\xd7\x6d\xe8\xd1\xb1\x3d\x1d\x5a\x27\xd5\x66\x9c\x0b\x21\xe3\xa3\xd7\xfe\x54\xae\xdb\xd4\xf4\xba\xbd\xe2\xf9\x87\x6f\xf6\x7b\xcf\xd6\x6d\x5e\xb0\x5b\x9b\xeb\xb6\xf7\x9b\x0e\x92\xb7\x96\x12\x27\x64\xe5\x20\x7b\xc7\xed\x5b\x89\x8d\xb0\x19\x64\xfe\x43\xe6\x69\x37\x42\xa0\x18\x18\xe3\xb7\xc0\x5d\x35\xc8\x4d\xc2\xf7\x1f\x22\x31\x83\x97\xfe\xa2\x7d\xd9\x5f\x8c\x7d\xa1\xec\xf0\x68\x7b\xf3\xfd\xd5\xb7\x47\xb7\xd5\x9e\xbb\x41\xd7\x33\xc3\x09\xd2\x42\xb7\x45\xef\x33\xdd\x3d\x17\x70\xdf\xf3\x46\x0a\xee\x11\xff\x9d\x25\xea\xba\xee\x77\xa0\x99\xe8\xdd\xeb\xef\x95\x44\x4f\xee\x39\x60\x9d\x91\x6a\x53\x46\x39\xea\xb6\x40\xb9\x48\xc7\x7f\x9b\x0f\xea\x88\xd3\x09\x64\x0d\x0a\x07\x17\x2f\x20\xeb\xba\x0f\x7e\x5a\x87\x8b\x00\x1f\xa5\x75\x36\xdc\x50\x67\x61\x05\xc7\x8b\xbf\xc1\xb3\x28\xf2\xe5\x29\xd5\xb7\x69\x08\x75\xe8\xd3\x18\x6b\x38\xf7\x3f\x77\x6c\xe2\x59\x70\xad\xfb\xec\x60\x09\x45\x93\x5c\x85\xb7\x35\xe0\x23\x56\x07\x1a\x03\x34\x41\xc3\x20\xf0\x37\x62\x58\x42\x93\x99\xb0\x5c\xce\x97\xcb\x19\xf1\xd8\x6d\x9d\xaf\xf4\xbe\x3d\x38\xbc\xb9\x47\xc3\x37\x58\xfa\x7b\x6b\x28\xf4\x9c\x31\x56\x94\x70\x5e\xe4\x9e\x58\x14\xa4\xc7\x57\xcb\x6d\x9d\x6f\x77\x69\x62\xdf\x69\xbd\x8b\x43\x2f\x99\x38\x17\x02\x97\xdd\xab\xf0\xd1\x4d\xaa\xc3\xef\x21\x13\x5a\x5a\x69\x97\x5c\xa4\x7d\x31\xff\xea\x49\x76\x7d\x0d\xba\x3e\xa8\xb7\x3b\xef\x7c\xc1\xc6\xf5\x2b\xee\x31\x67\xd9\x23\x99\xa9\x48\x97\xcc\xc9\xb5\xfa\x62\x12\xb5\x6a\x8e\x40\x65\x3a\xd2\x93\x79\x99\x64\x74\xad\xf2\x9f\xf4\xe6\x6c\x9d\xf9\x11\x1b\x74\xf8\x29\xa1\xac\x0c\x72\x87\x63\x06\xd7\xea\xb3\x19\x9c\xce\xde\x2f\xe7\xd0\x17\x41\x39\x0c\xed\xa2\x88\x31\xfd\xa2\x1a\xb4\x16\xec\x4e\xb6\xdf\x1e\x54\x50\x32\x09\xec\x97\x56\xf0\xf3\xc0\x02\x65\xad\x92\xd8\xe2\xd9\xef\x14\x1f\x5d\xa5\x63\x8c\x7d\x90\x6f\xe5\x23\x0a\xbf\xf3\x26\x9b\x68\x38\x48\x03\x97\x43\x4d\x02\xa1\xa2\xe2\xed\x36\x1e\xc9\xd1\x98\xa1\xd8\xae\xf7\xc8\xf7\x6d\x8f\x27\x6d\xc0\x7f\xd0\x18\xe9\xe2\x8f\xc6\xa4\x05\x4d\xc0\xfc\x8c\xff\xa6\x15\x3f\x48\x0d\xc8\xb8\x2d\x27\x1a\xb1\x2c\x3d\xbb\xc6\xac\xdb\xc0\xdb\x73\x57\x6d\x41\xb7\x7d\x11\x84\xc7\xce\xfb\x02\x08\x14\x9b\x17\xf0\xeb\x6f\x53\xa4\x96\xcb\xc1\x9d\x09\x3b\x70\x67\xc1\x9d\xfc\x6a\x6f\x84\x12\x2a\x4a\x7f\xa2\xa3\xbf\xdd\x50\x4b\xf1\xfc\x93\xea\x66\xeb\x9f\x4d\x49\x9a\xd3\x77\xd1\x73\x3b\xc6\x4c\x25\xa3\xb4\x0b\xef\x4f\x14\x19\xd5\x65\x51\x0c\x89\xf7\xbd\xe9\x69\xb1\xd8\x56\x5b\x2e\x15\x70\x8f\x1d\x41\xda\x48\xeb\xe8\xb9\x4a\xd0\xd2\x9b\x56\x90\x42\xac\x6b\xac\x9c\xbc\xc7\xe6\x08\x72\x4f\x3b\xd6\xc7\x06\x59\x18\x32\x15\x42\xe5\x07\x80\x28\x41\x3a\x78\x90\x4d\x03\xbc\x79\xe0\x47\x0b\x5b\xdd\x08\xdf\x8d\x96\x9e\x94\x16\x13\xc5\xf1\x47\x09\xcf\xd0\x46\xa0\xe9\xdf\x55\xde\x1d\xeb\xcc\xa1\xf2\x5b\x6d\x90\x9e\x64\xa0\x5f\x57\xf1\x21\x1c\x08\x1e\x90\xff\x0a\x1f\xa0\xf2\xb4\xde\x56\xbf\xb6\x46\xd9\x3c\xa8\x64\x8c\x5d\xe8\x2c\xa2\xf1\xb1\x4b\xfc\xf7\x13\x6f\x5b\x54\x22\x9f\xf8\x90\x2b\xd9\x14\x65\xb4\xc1\x58\x31\xec\xa7\xfe\xe1\x48\x47\xc3\x88\x9a\x22\xda\x17\x30\x71\x6b\xa9\x78\xe3\x79\xd1\xcf\xbc\x0a\x76\x43\x79\xe6\x7f\xd8\xc5\xfb\xbe\x4d\x9f\xde\xcd\x34\x24\xe5\xb8\x99\x54\x2c\xb8\xe6\x5b\xb0\x57\xf7\xba\x27\xff\x2a\x7f\xeb\x6d\x5c\x3c\xa6\x23\x75\xbc\x71\x6e\x3c\x52\xf1\x27\x22\xbf\x30\x52\x20\x25\x70\x21\x68\x70\xf9\x84\xb7\x58\xc9\x5a\xa2\xf0\x21\xd3\x21\x1e\x51\xe2\x84\x92\xc2\xa1\x34\x86\x4d\xbe\x6e\xf4\xc3\x04\x9b\x60\xea\x29\xb9\x54\xf8\xe0\xfb\xdc\xef\x4e\x7c\x87\xd3\x44\x96\xf0\xaa\x84\x06\x55\x1e\x23\x2e\xfe\x44\x5f\xc2\xc7\x22\x51\xf0\x1a\x62\x29\xf4\x94\xb2\xc7\x88\xd2\x7f\x5d\x30\x11\x3b\x2b\xae\x5e\xa2\x87\xf0\x4d\xf8\x79\xed\x69\x10\x7a\xde\xb7\x63\x18\x6c\xe5\xa1\x5b\x22\xed\xb2\x05\x2a\x16\x91\xf6\x52\x49\xb4\xe1\x4d\x13\x77\xc6\xff\x04\x00\x00\xff\xff\xd6\x3a\xaf\xae\xf6\x14\x00\x00") +var _templateHookTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x58\xdd\x8f\xdb\xb8\x11\x7f\xb6\xff\x8a\x89\xe0\x00\x52\xaa\xa5\x73\xf7\xd6\x06\x29\xb0\xf0\x25\xc8\x02\xd7\x75\x71\xcd\xf5\xe5\x70\xc8\x31\xe2\xc8\x66\x2d\x93\x02\x49\xef\x07\x1c\xfd\xef\xc5\x90\x94\x44\x5b\x89\x6f\x2f\x4d\x71\x2f\xbb\xf6\xcc\x70\x3e\x7e\xf3\xc1\xa1\x8f\xc7\xe5\x8b\xf9\x4a\xb7\x8f\x46\x6e\xb6\x0e\xbe\x7f\xf9\xdd\x5f\xaf\x5a\x83\x16\x95\x83\xb7\xbc\xc2\x8f\x5a\xef\xe0\x46\x55\x0c\xae\x9b\x06\xbc\x90\x05\xe2\x9b\x3b\x14\x6c\xfe\x7e\x2b\x2d\x58\x7d\x30\x15\x42\xa5\x05\x82\xb4\xd0\xc8\x0a\x95\x45\x01\x07\x25\xd0\x80\xdb\x22\x5c\xb7\xbc\xda\x22\x7c\xcf\x5e\xf6\x5c\xa8\xf5\x41\x89\xb9\x54\x9e\xff\xe3\xcd\xea\xcd\xed\xbf\xde\x40\x2d\x1b\x84\x48\x33\x5a\x3b\x10\xd2\x60\xe5\xb4\x79\x04\x5d\x83\x4b\x8c\x39\x83\xc8\xe6\x2f\x96\x5d\x37\x9f\x1f\x8f\x20\xb0\x96\x0a\x21\xdb\x6a\xbd\xcb\x20\x12\xef\xa5\xdb\x02\x3e\x38\x54\x02\x16\x90\xfd\x93\x57\x3b\xbe\xc1\x2c\x91\x9a\x1d\x8f\xe0\x70\xdf\x36\xdc\xd1\x61\xe4\x02\x4d\x06\x8c\x58\xc7\x23\xd0\x39\x52\x25\xf7\xad\x36\x0e\xb2\xe3\x11\x16\x6c\xa5\x55\x2d\x37\x2c\x2a\x83\xae\xcb\xbc\xad\x45\xbb\xdb\xc0\xdf\x5e\xc3\x47\x6e\xf1\x73\x52\x5e\xc8\x70\xb5\x41\x58\x28\x12\x5c\xb0\x5b\x2d\xd0\xf6\x5e\x2c\x14\xdf\x23\xd1\x5b\x23\x95\x83\x85\x62\xb7\x44\xc8\xde\x1e\x54\x35\xb8\xba\x70\x8f\xed\x28\x54\x43\xf6\xe2\xb9\x65\xcf\x6d\x16\xac\x2f\x14\xfb\xc7\xc1\x71\x27\xb5\xf2\x67\xc9\xe8\x6c\xb9\x84\xf7\x5b\x84\xc1\x42\xd7\x81\x57\x22\x2d\x70\x05\x5c\xf0\xd6\x51\x8e\x34\xf0\xa6\xd1\xf7\x1e\xf8\x83\x45\x42\x5b\x1b\x21\x15\x37\x8f\x5e\x47\x7d\x50\x15\x29\x06\x6e\x83\x2e\x16\x4d\xc0\x9e\x4c\x6a\xc3\xe6\x33\xaf\x37\x35\x44\x87\xf2\x4a\x2b\x87\x0f\x8e\x10\xa1\xff\x25\x0c\x71\x74\x5d\x01\x79\x0f\x5d\xd7\xb1\x7f\xf3\xe6\x80\x25\xa0\x31\xda\x14\xc1\x75\x1f\x0f\x42\xc5\x9b\xc6\x42\x9d\x57\xee\xa1\x84\x7d\xc1\xe6\x33\x52\x0d\x79\x9d\x9a\x2b\xa2\x34\x49\xc1\xc4\xea\x1e\x12\x4b\x3d\x4c\x17\xec\xc3\x71\x3e\x9b\xed\xef\x4a\xd0\x3b\x02\x7c\xcf\xf2\xd4\xef\xf9\x6c\x26\x6b\x78\xa6\x77\x5e\x6c\x66\xd0\x1d\x8c\x02\x25\x9b\x12\xea\xbd\x63\x6f\x48\x45\x9d\x67\x07\x85\x0f\x2d\x56\x0e\x45\x80\x89\x00\xf4\x2a\x9e\xbf\x67\x10\x58\x29\x1c\x19\x05\x37\x9f\xcd\xba\xf9\xa0\xb2\x8f\xf9\xae\x98\xcf\x4e\x6a\x72\xb9\x84\x95\x56\x42\x7a\x9d\x94\x4c\xa0\xa2\xa6\xb8\x23\xad\xcf\x18\x9b\x7b\xed\xab\x13\xc6\xe7\xb3\x32\x41\xe7\xa3\xd6\x8d\x37\x75\xad\x04\x6c\x8c\x3e\xb4\x76\xb4\x60\x43\x7f\xf9\xf6\xbe\xfd\x01\x74\x8b\x26\x14\x82\xcf\xcd\xb5\x12\x79\x2d\x8d\x75\x25\x58\xa4\x33\xa3\x07\x25\xcd\x0f\x07\x8c\xb1\x81\x54\x24\xfe\x1d\xe7\x43\xf0\xde\xd3\x3f\x90\x4d\xf2\xd7\x67\x84\x92\xe3\xad\xf7\x25\x03\x9f\x3e\xc1\xb3\xe0\xc8\x40\x4a\x53\x57\xf3\xc6\x62\x84\xbe\xd6\x06\x3e\x94\x3e\x50\x4a\x7d\x68\x5a\xef\xb2\x3f\x41\xba\xa7\x7a\xce\x15\x79\x4d\x49\x22\x9d\x39\x20\xa5\x30\xa4\x6e\x6d\x2e\xc1\xb9\xfe\xe9\x1c\xcd\xb5\xf9\x73\xc1\x9c\x60\x79\x01\xca\x10\xe9\x13\x91\xfc\x32\x90\x51\xcd\x39\x8e\x11\xdf\x1e\xc8\x5b\xed\x40\xe1\x86\x3b\xa4\x16\xd8\xc8\x3b\x54\x23\xa4\x11\xbc\x5b\xed\xf2\x53\xd0\xbe\x35\x42\x51\xc1\x49\x59\x8c\x3e\xbe\xe3\x76\xdd\x86\x1e\x1d\xdb\xd3\xa1\x75\x52\x6d\xc6\xb9\x10\x32\x3e\x7a\xed\x4f\xe5\xba\x4d\x4d\xaf\xdb\x0b\x9e\x7f\xf8\x6a\xbf\xf7\x6c\xdd\xe6\x05\xbb\xb1\xb9\x6e\x7b\xbf\xe9\x20\x79\x6b\x29\x71\x42\x56\x0e\xb2\x77\xdc\xbe\x95\xd8\x08\x9b\x41\xe6\x3f\x64\x9e\x76\x2d\x04\x8a\x81\x31\x7e\x0b\xdc\x55\x83\xdc\x24\x7c\xff\x21\x12\x33\xb8\xf2\x17\xed\x55\x7f\x31\xf6\x85\xb2\xc3\x47\xdb\x9b\xef\xaf\xbe\x3d\xba\xad\xf6\xdc\x0d\xba\x9e\x19\x4e\x90\x16\xba\x2d\x7a\x9f\xe9\xee\x39\x83\xfb\x8e\x37\x52\x70\x8f\xf8\x6f\x2c\x51\xd7\x75\xbf\x01\xcd\x44\xef\x5e\x7f\xaf\x24\x7a\x72\xcf\x01\xeb\x8c\x54\x9b\x32\xca\x51\xb7\x05\xca\x59\x3a\xfe\xd7\x7c\x50\x47\x1c\x8f\x20\x6b\x50\x38\xb8\x78\x06\x59\xd7\x7d\xf0\xd3\x3a\x5c\x04\xf8\x20\xad\xb3\xe1\x86\x3a\x09\x2b\x38\x5e\xbc\x82\x67\x51\xe4\xcb\x53\xaa\x6f\xd3\x10\xea\xd0\xa7\x31\xd6\x70\xee\xff\xee\xd8\xc4\xb3\xe0\x5a\xf7\xd9\xc1\x12\x8a\x26\xb9\x0a\x6f\x6a\xc0\x07\xac\x0e\x34\x06\x68\x82\x86\x41\xe0\x6f\xc4\xb0\x84\x26\x33\x61\xb9\x9c\x2f\x97\x33\xe2\xb1\x9b\x3a\x5f\xe9\x7d\x7b\x70\x78\x7d\x87\x86\x6f\xb0\xf4\xf7\xd6\x50\xe8\x39\x63\xac\x28\xe1\xb4\xc8\x3d\xb1\x28\x48\x8f\xaf\x96\x9b\x3a\xdf\xee\xd2\xc4\xbe\xd3\x7a\x17\x87\x5e\x32\x71\xce\x04\xce\xbb\x57\xe1\x83\x9b\x54\x87\xdf\x43\x26\xb4\xb4\xd2\xce\xb9\x48\xfb\x62\xfe\x87\x27\xd9\xe5\x35\xe8\xf2\xa0\xde\xee\xbc\xf3\x05\x1b\xd7\xaf\xb8\xc7\x9c\x64\x8f\x64\xa6\x22\x5d\x32\x27\xd7\xea\x8b\x49\xd4\xaa\x79\x04\x2a\xd3\x91\x9e\xcc\xcb\x24\xa3\x6b\x95\xff\xa8\x37\x27\xeb\xcc\x0f\xd8\xa0\xc3\x4f\x09\x65\x65\x90\x3b\x1c\x33\xb8\x56\x9f\xcd\xe0\x74\xf6\x7e\x39\x87\xbe\x08\xca\x61\x68\x17\x45\x8c\xe9\x67\xd5\xa0\xb5\x60\x77\xb2\xfd\xfa\xa0\x82\x92\x49\x60\x3f\xb7\x82\x9f\x06\x16\x28\x6b\x95\xc4\x16\xcf\x7e\xa3\xf8\xe8\x2a\x1d\x63\xec\x83\x7c\x2b\x1f\x50\xf8\x9d\x37\xd9\x44\xc3\x41\x1a\xb8\x1c\x6a\x12\x08\x15\x15\x6f\xb7\xf1\x48\x8e\xc6\x0c\xc5\x76\xb9\x47\xbe\x6d\x7b\x3c\x69\x03\xfe\x9d\xc6\x48\x17\x7f\x34\x26\x2d\x68\x02\xe6\x27\xfc\x0f\xad\xf8\x41\x6a\x40\xc6\x6d\x39\xd1\x88\x65\xe9\xd9\x35\x66\xdd\x06\xde\x9e\xbb\x6a\x0b\xba\xed\x8b\x20\x3c\x76\xde\x17\x40\xa0\xd8\xbc\x80\x5f\x7e\x9d\x22\xb5\x5c\x0e\xee\x4c\xd8\x81\x3b\x0b\xee\xe4\x17\x7b\x23\x94\x50\x51\xfa\x13\x1d\xfd\xed\x86\x5a\x8a\xe7\x9f\x54\x37\x5b\xff\x6c\x4a\xd2\x9c\xbe\x8b\x9e\xdb\x31\x66\x2a\x19\xa5\x5d\x78\x7f\xa2\xc8\xa8\x2e\x8b\x62\x48\xbc\xef\x4d\x4f\x8b\xc5\xb6\xda\x72\xa9\x80\x7b\xec\x08\xd2\x46\x5a\x47\xcf\x55\x82\x96\xde\xb4\x82\x14\x62\x5d\x63\xe5\xe4\x1d\x36\x8f\x20\xf7\xb4\x63\x7d\x6c\x90\x85\x21\x53\x21\x54\x7e\x00\x88\x12\xa4\x83\x7b\xd9\x34\xc0\x9b\x7b\xfe\x68\x61\xab\x1b\xe1\xbb\xd1\xd2\x93\xd2\x62\xa2\x38\xfe\x28\xe1\x19\xda\x08\x34\xfd\xbb\xca\xbb\x63\x9d\x39\x54\x7e\xab\x0d\xd2\x93\x0c\xf4\xeb\x2a\xde\x87\x03\xc1\x03\xf2\x5f\xe1\x3d\x54\x9e\xd6\xdb\xea\xd7\xd6\x28\x9b\x07\x95\x8c\xb1\x33\x9d\x45\x34\x3e\x76\x89\xff\x7e\xe4\x6d\x8b\x4a\xe4\x13\x1f\x72\x25\x9b\xa2\x8c\x36\x18\x2b\x86\xfd\xd4\x3f\x1c\xe9\x68\x18\x51\x53\x44\xfb\x02\x26\x6e\x2d\x15\x6f\x3c\x2f\xfa\x99\x57\xc1\x6e\x28\xcf\xfc\x77\xbb\x78\xdf\xb7\xe9\xd3\xbb\x99\x86\xa4\xa4\x7a\x6a\x50\xe5\x15\xf3\x8e\x15\x70\x05\xdf\xbd\x02\x09\x7f\x7f\x0d\x2f\x5f\x81\xbc\xba\x0a\x2d\xd9\xab\x7f\x0d\x51\xf0\x17\xf9\x6b\x6f\xf3\xec\x71\x1d\xa9\xe3\x0d\x74\xed\x91\x8b\x3f\x19\xf9\x05\x92\x02\x2b\x81\x0b\x41\x83\xcc\x17\x40\x8b\x95\xac\x25\x0a\x0f\x01\x1d\xe2\x11\x35\x4e\xa8\x29\x1c\x4a\x65\xd8\xec\xeb\x46\xdf\x4f\xb0\x0a\xa6\x9e\x92\x5b\x85\xf7\xbe\xef\xfd\x2e\xc5\x77\x38\x4d\x6c\x09\x2f\xcb\x13\x68\xfe\x42\x5f\xc2\xc7\x22\x51\xf0\x1a\x62\x69\xf4\x94\xb2\xc7\x88\xca\xe1\xb2\x60\x22\x76\x52\x6c\xbd\x44\x0f\xe1\x9b\xf0\x73\xdb\xd3\x20\xf4\xbc\xaf\xc7\x30\xd8\xca\x43\xf7\x44\xda\x79\x4b\x54\x2c\x22\xed\xa5\x92\x68\xc3\x1b\x27\xee\x90\xff\x0d\x00\x00\xff\xff\x27\x1e\xba\x4e\x06\x15\x00\x00") func templateHookTmplBytes() ([]byte, error) { return bindataRead( @@ -985,7 +985,7 @@ func templateHookTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/hook.tmpl", size: 5366, mode: os.FileMode(420), modTime: time.Unix(1, 0)} + info := bindataFileInfo{name: "template/hook.tmpl", size: 5382, mode: os.FileMode(420), modTime: time.Unix(1, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/entc/gen/template/hook.tmpl b/entc/gen/template/hook.tmpl index 975e5ca47..f356e6745 100644 --- a/entc/gen/template/hook.tmpl +++ b/entc/gen/template/hook.tmpl @@ -166,7 +166,7 @@ func NewChain(hooks ...{{ $pkg }}.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() {{ $pkg }}.Hook { return func(mutator {{ $pkg }}.Mutator) {{ $pkg }}.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/entc/integration/config/ent/hook/hook.go b/entc/integration/config/ent/hook/hook.go index 135a5b198..b0be3771e 100644 --- a/entc/integration/config/ent/hook/hook.go +++ b/entc/integration/config/ent/hook/hook.go @@ -185,7 +185,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/entc/integration/customid/ent/hook/hook.go b/entc/integration/customid/ent/hook/hook.go index 5a9476c70..333a82e97 100644 --- a/entc/integration/customid/ent/hook/hook.go +++ b/entc/integration/customid/ent/hook/hook.go @@ -237,7 +237,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/entc/integration/ent/hook/hook.go b/entc/integration/ent/hook/hook.go index 6b564fc47..2fc82e5a1 100644 --- a/entc/integration/ent/hook/hook.go +++ b/entc/integration/ent/hook/hook.go @@ -354,7 +354,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/entc/integration/gremlin/ent/hook/hook.go b/entc/integration/gremlin/ent/hook/hook.go index 086427cb1..46fb52bf4 100644 --- a/entc/integration/gremlin/ent/hook/hook.go +++ b/entc/integration/gremlin/ent/hook/hook.go @@ -354,7 +354,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/entc/integration/hooks/ent/hook/hook.go b/entc/integration/hooks/ent/hook/hook.go index 75e9795e9..5e2e3fadc 100644 --- a/entc/integration/hooks/ent/hook/hook.go +++ b/entc/integration/hooks/ent/hook/hook.go @@ -198,7 +198,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/entc/integration/idtype/ent/hook/hook.go b/entc/integration/idtype/ent/hook/hook.go index 623affd28..8337e85a7 100644 --- a/entc/integration/idtype/ent/hook/hook.go +++ b/entc/integration/idtype/ent/hook/hook.go @@ -185,7 +185,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/entc/integration/json/ent/hook/hook.go b/entc/integration/json/ent/hook/hook.go index 79032811f..1b129a54e 100644 --- a/entc/integration/json/ent/hook/hook.go +++ b/entc/integration/json/ent/hook/hook.go @@ -185,7 +185,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/entc/integration/migrate/entv1/hook/hook.go b/entc/integration/migrate/entv1/hook/hook.go index 0f54aebf8..284829e64 100644 --- a/entc/integration/migrate/entv1/hook/hook.go +++ b/entc/integration/migrate/entv1/hook/hook.go @@ -198,7 +198,7 @@ func NewChain(hooks ...entv1.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() entv1.Hook { return func(mutator entv1.Mutator) entv1.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/entc/integration/migrate/entv2/hook/hook.go b/entc/integration/migrate/entv2/hook/hook.go index 61e681efa..cee5fb7d6 100644 --- a/entc/integration/migrate/entv2/hook/hook.go +++ b/entc/integration/migrate/entv2/hook/hook.go @@ -237,7 +237,7 @@ func NewChain(hooks ...entv2.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() entv2.Hook { return func(mutator entv2.Mutator) entv2.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/entc/integration/privacy/ent/hook/hook.go b/entc/integration/privacy/ent/hook/hook.go index b6253db6e..5650147ef 100644 --- a/entc/integration/privacy/ent/hook/hook.go +++ b/entc/integration/privacy/ent/hook/hook.go @@ -211,7 +211,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/entc/integration/template/ent/hook/hook.go b/entc/integration/template/ent/hook/hook.go index 4093ee616..86d7bad14 100644 --- a/entc/integration/template/ent/hook/hook.go +++ b/entc/integration/template/ent/hook/hook.go @@ -211,7 +211,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/examples/edgeindex/ent/hook/hook.go b/examples/edgeindex/ent/hook/hook.go index 408b0127b..b2df98813 100644 --- a/examples/edgeindex/ent/hook/hook.go +++ b/examples/edgeindex/ent/hook/hook.go @@ -198,7 +198,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/examples/entcpkg/ent/hook/hook.go b/examples/entcpkg/ent/hook/hook.go index 47467071e..3fb4df341 100644 --- a/examples/entcpkg/ent/hook/hook.go +++ b/examples/entcpkg/ent/hook/hook.go @@ -185,7 +185,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/examples/m2m2types/ent/hook/hook.go b/examples/m2m2types/ent/hook/hook.go index a38a51cec..ae69bd96c 100644 --- a/examples/m2m2types/ent/hook/hook.go +++ b/examples/m2m2types/ent/hook/hook.go @@ -198,7 +198,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/examples/m2mbidi/ent/hook/hook.go b/examples/m2mbidi/ent/hook/hook.go index c167c850b..da65a7346 100644 --- a/examples/m2mbidi/ent/hook/hook.go +++ b/examples/m2mbidi/ent/hook/hook.go @@ -185,7 +185,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/examples/m2mrecur/ent/hook/hook.go b/examples/m2mrecur/ent/hook/hook.go index 87d50f962..0a772b426 100644 --- a/examples/m2mrecur/ent/hook/hook.go +++ b/examples/m2mrecur/ent/hook/hook.go @@ -185,7 +185,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/examples/o2m2types/ent/hook/hook.go b/examples/o2m2types/ent/hook/hook.go index cabc4b540..b43c580ff 100644 --- a/examples/o2m2types/ent/hook/hook.go +++ b/examples/o2m2types/ent/hook/hook.go @@ -198,7 +198,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/examples/o2mrecur/ent/hook/hook.go b/examples/o2mrecur/ent/hook/hook.go index 449fc3cf3..9f2202359 100644 --- a/examples/o2mrecur/ent/hook/hook.go +++ b/examples/o2mrecur/ent/hook/hook.go @@ -185,7 +185,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/examples/o2o2types/ent/hook/hook.go b/examples/o2o2types/ent/hook/hook.go index b6ec0f7b5..83f0a2891 100644 --- a/examples/o2o2types/ent/hook/hook.go +++ b/examples/o2o2types/ent/hook/hook.go @@ -198,7 +198,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/examples/o2obidi/ent/hook/hook.go b/examples/o2obidi/ent/hook/hook.go index a4acdd00a..0f38f6697 100644 --- a/examples/o2obidi/ent/hook/hook.go +++ b/examples/o2obidi/ent/hook/hook.go @@ -185,7 +185,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/examples/o2orecur/ent/hook/hook.go b/examples/o2orecur/ent/hook/hook.go index b64344874..5869422ed 100644 --- a/examples/o2orecur/ent/hook/hook.go +++ b/examples/o2orecur/ent/hook/hook.go @@ -185,7 +185,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/examples/privacyadmin/ent/hook/hook.go b/examples/privacyadmin/ent/hook/hook.go index 99f21f202..fa57227d1 100644 --- a/examples/privacyadmin/ent/hook/hook.go +++ b/examples/privacyadmin/ent/hook/hook.go @@ -185,7 +185,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/examples/privacytenant/ent/hook/hook.go b/examples/privacytenant/ent/hook/hook.go index d3b22cd04..37b4b69da 100644 --- a/examples/privacytenant/ent/hook/hook.go +++ b/examples/privacytenant/ent/hook/hook.go @@ -211,7 +211,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/examples/start/ent/hook/hook.go b/examples/start/ent/hook/hook.go index 8db812416..969ed54f1 100644 --- a/examples/start/ent/hook/hook.go +++ b/examples/start/ent/hook/hook.go @@ -211,7 +211,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator diff --git a/examples/traversal/ent/hook/hook.go b/examples/traversal/ent/hook/hook.go index badfe3dc3..d92bce85f 100644 --- a/examples/traversal/ent/hook/hook.go +++ b/examples/traversal/ent/hook/hook.go @@ -211,7 +211,7 @@ func NewChain(hooks ...ent.Hook) Chain { // Hook chains the list of hooks and returns the final hook. func (c Chain) Hook() ent.Hook { return func(mutator ent.Mutator) ent.Mutator { - for i := range c.hooks { + for i := len(c.hooks) - 1; i >= 0; i-- { mutator = c.hooks[i](mutator) } return mutator