From 9e760aae58bc3bb018c33ffef3a4d59d0cbe090b Mon Sep 17 00:00:00 2001 From: Ariel Mashraki <7413593+a8m@users.noreply.github.com> Date: Thu, 30 Jan 2020 11:12:53 +0200 Subject: [PATCH] entc/gen: change WithError signature to Err (#322) WithError is too verbose and we like short names --- entc/gen/internal/bindata.go | 4 +-- entc/gen/template/ent.tmpl | 4 +-- entc/integration/customid/ent/group.go | 4 +-- entc/integration/customid/ent/user.go | 12 +++---- entc/integration/ent/card.go | 8 ++--- entc/integration/ent/file.go | 8 ++--- entc/integration/ent/filetype.go | 4 +-- entc/integration/ent/group.go | 16 ++++----- entc/integration/ent/groupinfo.go | 4 +-- entc/integration/ent/node.go | 8 ++--- entc/integration/ent/pet.go | 8 ++--- entc/integration/ent/spec.go | 4 +-- entc/integration/ent/user.go | 44 +++++++++++------------ entc/integration/gremlin/ent/card.go | 8 ++--- entc/integration/gremlin/ent/file.go | 8 ++--- entc/integration/gremlin/ent/filetype.go | 4 +-- entc/integration/gremlin/ent/group.go | 16 ++++----- entc/integration/gremlin/ent/groupinfo.go | 4 +-- entc/integration/gremlin/ent/node.go | 8 ++--- entc/integration/gremlin/ent/pet.go | 8 ++--- entc/integration/gremlin/ent/spec.go | 4 +-- entc/integration/gremlin/ent/user.go | 44 +++++++++++------------ entc/integration/idtype/ent/user.go | 12 +++---- entc/integration/integration_test.go | 10 +++--- entc/integration/migrate/entv1/car.go | 4 +-- entc/integration/migrate/entv1/user.go | 16 ++++----- entc/integration/migrate/entv2/car.go | 4 +-- entc/integration/migrate/entv2/user.go | 4 +-- entc/integration/template/ent/pet.go | 4 +-- entc/integration/template/ent/user.go | 8 ++--- examples/edgeindex/ent/city.go | 4 +-- examples/edgeindex/ent/street.go | 4 +-- examples/m2m2types/ent/group.go | 4 +-- examples/m2m2types/ent/user.go | 4 +-- examples/m2mbidi/ent/user.go | 4 +-- examples/m2mrecur/ent/user.go | 8 ++--- examples/o2m2types/ent/pet.go | 4 +-- examples/o2m2types/ent/user.go | 4 +-- examples/o2mrecur/ent/node.go | 8 ++--- examples/o2o2types/ent/card.go | 4 +-- examples/o2o2types/ent/user.go | 4 +-- examples/o2obidi/ent/user.go | 4 +-- examples/o2orecur/ent/node.go | 8 ++--- examples/start/ent/car.go | 4 +-- examples/start/ent/group.go | 4 +-- examples/start/ent/user.go | 8 ++--- examples/traversal/ent/group.go | 8 ++--- examples/traversal/ent/pet.go | 8 ++--- examples/traversal/ent/user.go | 16 ++++----- 49 files changed, 203 insertions(+), 203 deletions(-) diff --git a/entc/gen/internal/bindata.go b/entc/gen/internal/bindata.go index cef694913..d625fd48f 100644 --- a/entc/gen/internal/bindata.go +++ b/entc/gen/internal/bindata.go @@ -821,7 +821,7 @@ func templateDialectSqlUpdateTmpl() (*asset, error) { return a, nil } -var _templateEntTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x58\xdf\x6f\xdb\x38\xf2\x7f\xb6\xfe\x8a\x59\xc1\xdd\xb5\x0d\x87\xea\x77\xdf\xbe\xb9\xcb\x01\xd9\xa4\x05\x0c\x14\xb9\x1f\x49\xb1\x0f\x45\xd1\xd2\xd2\xc8\xe2\x45\x26\x5d\x92\x72\x62\x08\xfe\xdf\x0f\x43\x8a\x32\x65\x3b\xd9\xdc\xde\x93\x65\x72\x7e\x7e\x86\x33\x9c\x61\xdb\x66\xb3\xe4\x46\x6d\x76\x5a\xac\x2a\x0b\xbf\xbe\xff\xbf\xff\xbf\xd8\x68\x34\x28\x2d\x7c\xe4\x39\x2e\x95\x7a\x84\x85\xcc\x19\x5c\xd7\x35\x38\x22\x03\xb4\xaf\xb7\x58\xb0\xe4\xa1\x12\x06\x8c\x6a\x74\x8e\x90\xab\x02\x41\x18\xa8\x45\x8e\xd2\x60\x01\x8d\x2c\x50\x83\xad\x10\xae\x37\x3c\xaf\x10\x7e\x65\xef\xc3\x2e\x94\xaa\x91\x45\x22\xa4\xdb\xff\xb4\xb8\xf9\x70\x77\xff\x01\x4a\x51\x23\x74\x6b\x5a\x29\x0b\x85\xd0\x98\x5b\xa5\x77\xa0\x4a\xb0\x91\x32\xab\x11\x59\x32\xcb\xf6\xfb\x24\x69\x5b\x28\xb0\x14\x12\x21\x5d\xab\x02\xeb\x14\xba\xd5\xf1\xe6\x71\x05\x97\x57\xb0\xe4\x06\x61\xcc\x6e\x94\x2c\xc5\x8a\xfd\x83\xe7\x8f\x7c\x85\x44\xd4\xb6\x60\x71\xbd\xa9\xb9\x45\x48\x2b\xe4\x05\xea\x14\xc6\x81\xfd\xb0\x25\xd6\x1b\xa5\x6d\xd8\xca\x32\x20\xe1\xec\x8e\xaf\x49\x0a\xf9\x4c\x06\x3b\xdd\x80\xd2\x0a\xbb\x83\x52\x79\xcf\x07\x84\x26\xaf\x70\xcd\x59\x62\x77\x9b\xe3\x1d\xab\x9b\xdc\x42\x9b\x8c\x72\x67\x24\x0c\xd4\x3b\xc9\x99\x5a\x0b\x6b\xf9\xca\x74\x66\x8c\xb2\x0c\x16\xb7\x1e\x17\x24\xb5\x2c\x19\x2d\x6e\xbd\xd8\xc5\x2d\x7b\x20\x1d\xfb\x3d\x7c\xff\xb7\x51\xf2\x32\x15\xc5\x9c\xf8\x71\xbd\xb1\xbb\xf4\x7b\x32\x6a\xdb\x0b\xd0\x5c\xae\x10\xc6\xdf\xe6\x30\x2e\x09\xa6\x31\xfb\x28\xb0\x2e\x8c\x93\x3e\xea\xbc\x2c\xd9\xbd\xb3\xcd\x6d\x91\xc0\x4a\x11\x09\xe9\xdc\xf2\xba\xc1\x60\x40\xea\x89\x3b\x87\x52\x28\x89\x9e\x25\x00\x00\xa3\xb3\x72\xda\x16\x44\xe9\x58\x44\x5d\xf3\x65\x4d\x6c\xb3\xb6\x05\x94\xb4\xed\x59\x82\x13\x9e\x56\x2a\xeb\xe4\xa0\x34\xc2\x8a\x2d\xed\x7c\x8f\x45\x3f\xf0\x55\xb7\x84\xb5\x41\x2f\xe4\x75\x10\x7b\x75\x1e\x90\xf8\xfb\x49\xd8\x0a\xc6\xec\x43\xb1\xc2\x03\x20\xfe\xdf\x01\x01\x8d\x35\xb7\x42\x49\x93\xa1\xdb\xa1\xa8\x2b\x5b\xa1\x06\xa9\x0a\x34\xe1\x28\xaf\x34\xdf\x54\xcc\x8b\x78\x08\xc0\x19\xe0\x1a\x61\x89\x42\xae\x60\xa3\x36\x0d\x59\x59\xc0\x72\x77\x72\x6c\xfe\xd9\xa0\xde\xc1\x53\x85\x12\x90\xaf\x50\x5f\xd4\x8a\x17\xc4\x45\xd9\x80\x14\xf6\x91\xb7\x2b\x66\xf2\x2b\x5d\xf0\x9d\x71\x21\xea\xe4\xe4\x45\xf0\x32\x9b\xc1\x75\x51\x08\xf2\x81\xd7\x3e\x66\x06\xac\x02\x5e\xf4\xa6\x18\xab\x34\xa5\x4b\xa1\xc5\x16\x35\x03\x97\x73\x8e\x79\x6c\xd7\x9b\x9a\x0e\xce\x46\x0b\x69\x4b\x48\x0b\xc1\x6b\xcc\x6d\xf6\xce\x64\x1e\x6d\x2f\x30\x85\x31\xbb\xef\xa4\x04\x5e\x51\x42\xc5\xcd\x43\x88\x8e\x17\xe5\x60\xa6\xdd\x67\x3b\xdc\x60\x67\x43\xf4\x06\xe3\x1b\x13\x9b\x7c\x72\x1a\x3c\x4f\xc6\x7b\x29\x5d\x6e\xb9\xfc\x3f\x3d\x03\x47\x89\xff\xbf\x9d\x86\x93\x22\xe0\xc5\x1d\x2a\x41\x94\xa2\x48\x28\xb3\x41\x5e\xe2\x1b\xf3\xd2\xd3\x86\x3a\x43\x86\x31\x07\xf2\x19\x09\x51\x96\x21\xfb\x2c\xc5\x8f\x86\x78\xbe\x7c\xed\xb3\x64\xe6\xd9\x28\x2b\x7b\x89\x6d\xdb\xc1\x84\x27\x59\xc8\x42\x36\x9e\x49\xb1\x2c\x03\x3a\xc6\x58\x90\xb0\x18\x44\x21\x4b\xa5\xd7\x0e\x47\x07\xa0\x46\x2a\xbd\xee\xb8\x97\xc0\x1d\xa3\x43\xee\x89\x9b\x4e\x02\x4c\x1c\xd9\x8f\x06\x8d\xc5\x62\x4a\x30\x0f\xf3\x44\x51\x00\x28\x4f\x62\x8d\x5f\xda\x16\x6a\x94\xce\xc8\xaf\x4b\xa5\xea\x10\xf4\x0e\x72\x31\x1f\xc0\xfe\x02\xea\xbf\x0b\x5b\x7d\xd0\xda\x19\x60\x1b\x2d\x4d\x84\xf9\x11\xba\x5d\x54\x34\x70\x09\xe8\x58\x44\x57\xba\x8b\x15\x3a\x05\xe4\x12\xa1\xdf\xb9\x75\xec\x47\x57\x30\xa3\xd0\xcc\x49\x5c\x47\xbd\x6c\x6c\x2f\xc0\xdd\xad\x3d\xf0\x2c\x19\x95\x8d\xcc\x61\x72\xe6\xb8\x4d\x5f\xf7\x6a\x32\x85\xc9\x9f\x39\x15\x73\xef\xe1\x94\x8e\xf1\x48\x94\x80\x2c\x82\x9e\x90\x1f\x0b\x82\xdd\x6d\x87\x72\x10\x4b\xa7\x65\xcf\x77\x16\xca\xab\x2b\x90\xa2\xf6\xdc\x7d\x51\x25\x18\x8f\x4e\x7b\x74\x46\x8e\xc1\x9c\xf7\xbc\x27\xc0\x31\xbf\xe5\x03\x4a\x8a\xe6\xf0\xf3\x9d\xb2\x1f\x69\xcf\xa1\xd2\xd6\x7c\x89\xf5\x25\x44\x7e\x1f\x7a\x0a\xf6\x89\x36\xbd\x07\xfb\xe0\x5e\x38\xf5\xbd\xd4\xf3\x8e\xcd\x49\x5b\xe2\xf9\x8e\xd5\x7f\x72\x7e\x78\xfd\xe4\xea\xa5\xbf\x71\x7b\x67\xd3\x7d\x32\xda\x27\x91\xb2\xe8\xd3\xf5\x42\xae\x90\x9e\xad\xd5\x05\x52\xeb\x96\x29\x89\x47\x95\xba\x6d\x4f\x2a\x71\xdf\x1c\x8d\x35\xe6\x48\x37\x82\xef\x1c\xfe\x15\xfe\x75\xdb\x51\x6f\x81\x9e\xe2\x70\x93\xba\x3b\x9b\x4e\x64\xb8\x3a\x20\x75\x77\x5c\x7a\x8a\x48\x9f\x78\x8e\x7e\xbf\x87\x1f\x0d\x6a\x81\xe6\x85\xd2\x16\x17\xbd\xb0\xd1\x1f\xff\x81\xd1\xfb\x3d\xcc\x62\xaa\x69\xac\x65\x32\x85\xe3\x43\x1d\xae\xe1\xf6\x10\x9a\xc9\xcf\xb1\x80\x9b\x5a\xa0\xb4\x2d\x1c\x69\x61\xbe\x9f\xdb\x4f\x59\x2c\xff\x88\x68\xea\x43\xd7\x87\x2b\xcb\xe0\xf3\xa6\x20\xd0\x43\x55\xe1\xb0\x6c\x44\x4d\xed\x34\xd5\xc4\x86\x36\xa9\xb2\xb9\x8e\x78\xe8\x6c\x96\xc1\x9d\xb2\x08\xb6\xe2\x76\x0e\x3b\xd5\x80\x44\x2c\xe8\x5a\xcc\x79\x5d\x0f\x89\x3f\xcb\x27\xcd\x37\x93\x29\x2c\xb1\x54\x1a\x1d\x45\x2f\x76\x8d\xb6\x52\xc5\xdc\x57\xa9\x23\x35\x49\x57\xad\xbc\x79\x58\x40\xa9\xd5\x1a\x38\x58\xcd\xa5\xe1\x39\x15\xef\x39\x70\x59\xb8\x60\x44\x8b\x8e\x29\x57\x6b\x6a\xc2\xb0\xa0\xea\xa5\x55\x5d\x53\xf5\xe2\xf9\x23\x4b\xde\x14\x27\x8f\x4c\x08\x51\x58\xf7\xab\x7f\x97\x48\x11\xfa\x73\x01\xea\x45\x9c\x86\xa7\x8b\x89\x83\x0b\x1a\xf7\x63\x42\xdb\x4d\xdd\x3e\x81\xfd\x47\x80\x00\x2f\x2d\x6a\x10\x9e\x30\xaf\x95\xc1\x62\x4e\x62\x8d\xf2\xfc\x14\x1e\x89\xcf\xb6\x3f\xe3\x4f\xa2\xae\x61\x89\x80\xcf\x98\x37\x84\x97\xad\xb4\x6a\x56\x95\xd3\xec\xdb\x31\x78\xaa\x44\x5e\x41\xae\x91\x7b\x82\x01\xdc\x6f\x45\x34\x1c\x83\xc1\x3a\x01\x69\x9f\xe7\xa0\x1e\x29\x4f\xcf\xa3\xc6\xba\xa6\x70\x32\xb3\xcf\xb7\xee\x73\x9a\x50\xdd\xfe\x49\x3d\xba\x4c\xd9\x70\x29\xf2\x49\x1a\x46\xb1\xfd\xfe\xf2\x64\x72\xa2\xb2\x3b\xc0\x89\x87\x19\x2a\x75\x69\x31\x7a\x55\x33\x5c\x81\x7d\x66\x85\xde\xf6\x41\x3f\x22\xef\x42\x77\x6f\xb5\x6b\x21\xd6\x9b\x1a\xd7\x28\xad\x8f\x5e\xb9\xb6\xcc\xef\xa0\x7e\x23\x56\x9e\x7c\x32\xa5\x3e\x8d\x24\xb6\xc9\x68\xcb\x75\x9f\x9d\x7e\xd5\xb0\xdf\xfc\xff\x64\xd4\x6d\xb0\xdf\xb5\xb0\xd8\x31\xa7\xb1\xc8\x09\xb9\x79\x8e\xca\x19\xe7\xab\xf5\x24\x15\xc5\xd5\xbb\x6d\x3a\x3f\x09\xc3\xe2\x76\x3a\x1d\x74\x8a\xe2\xfc\x30\x17\xee\xd8\xe1\xf4\x44\x17\xd2\x59\x03\xe7\x30\x98\xe6\xae\xfe\x6a\x02\xd7\xdf\xc8\x5c\x7f\xa7\xf9\x19\x2b\x5c\x71\x63\x53\xc6\xa3\xc0\x3b\xc3\xde\x51\xe3\xdf\x1b\x7b\x32\x00\xc6\x57\xff\x60\x08\x0c\x97\xff\x36\x9c\x3b\x53\xc2\x7e\xff\x17\xd8\xc2\x4f\x83\x7b\xff\x4d\x96\x3b\x73\x07\x9a\x16\xe6\x41\xac\x7b\x3d\xe7\xc5\x6c\xd9\x47\xd7\x84\x4e\xac\x58\x23\xbb\xbe\xbb\x5f\xdc\x4c\x23\x41\xce\xf5\x20\xad\x3b\x5a\xaf\xca\x9b\x6d\x8f\xb9\x5f\x25\x1f\x84\xde\xc5\x7d\xb6\x1d\xe8\xef\xdb\x89\xa8\xc5\x88\xa4\xfe\x37\xc8\xbc\x08\xcc\x39\x21\x7d\x34\x5e\xc4\xe7\x8f\xe0\x79\x55\xea\x91\x88\xd7\x78\x4e\x21\x3a\x48\x89\xc4\xc8\xf8\xa4\xf5\xff\x8e\x07\xc9\xf0\x3d\x50\xf4\xdb\xce\xe2\xe4\x97\xe9\x2f\xd3\xbe\xb4\x84\xed\x50\x03\xc2\xc4\x40\xae\xb2\xc5\xed\xc0\xd9\x2c\x03\x51\x0c\x86\x02\xea\x73\x34\x76\x6f\x6b\x7e\xbe\xe9\xba\x95\xc5\x6d\x78\x2d\x79\x53\x09\x12\xc5\x64\xea\xa4\xb5\xc9\x48\x14\x73\xf8\x46\x79\x62\xac\xce\x95\xdc\xb2\x6b\xab\xc4\xb1\x00\xaa\x12\xbd\x13\xa2\x48\x4e\x7b\x43\x53\x8b\xdc\xb5\x69\x9b\xba\xd1\xbc\x1e\x5e\xf4\x07\x02\x5f\xb1\x39\x6c\xb8\x36\x2e\x59\xfd\xb2\x2a\x8f\x7a\x90\x7e\xb4\xed\xd9\xbe\x7c\x1d\x38\xe1\xb4\xba\xb1\x11\x9f\x2d\x19\x32\x86\xf4\x9e\x68\xd3\x03\x8f\xaf\xfc\xaf\x3c\x31\x74\x6d\xeb\x9a\xcb\xdd\xe9\x0b\xc3\xf9\x27\x84\xa8\xc7\x3a\x0f\x75\x6c\xf4\x14\xfc\x55\x33\xc9\xcb\x55\xf7\xe9\x06\x1a\xea\xc0\xbe\x09\x32\xca\xd7\xdc\x13\x19\xdd\x7c\x1d\xad\x7d\xf9\x26\xbe\x76\x17\x17\x5c\x41\x5e\xae\xe8\x66\x1b\x98\xd3\xb6\xd9\x0c\xae\x0f\x0f\x14\xee\xed\x80\xda\x24\x3a\x4f\xfe\x4d\xe0\xc2\xf2\x95\xe9\x1e\x33\x8e\x9f\x3c\xa3\x77\x2d\xf7\xaa\xd5\xbd\x5c\x3c\xf0\x95\x9f\x76\xfd\x20\x1e\xdd\x11\x36\x8c\xb6\xdd\x78\x47\xcb\xf0\xbe\x83\xe0\xf0\x04\x67\xe9\xce\x4e\x2f\xd2\x7e\xf1\x7b\xbc\xfd\x92\xf1\xae\x9d\xc9\xb9\xa4\xe6\x45\x6d\x51\x6b\xd1\x8d\x60\x4a\xbb\x17\x61\xff\x44\xc3\xcf\xbd\xdd\xb8\xa6\x8a\xe7\x95\x1b\xf2\xd9\x79\x5f\xcf\xbc\xda\x90\x39\x28\x8b\xfd\x3e\xf9\x4f\x00\x00\x00\xff\xff\xd8\x5f\x5b\xcb\xd1\x16\x00\x00") +var _templateEntTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x58\x5f\x6f\xe3\xb8\x11\x7f\xb6\x3e\xc5\x9c\xe0\xbd\xb3\x0d\x87\xda\xde\x5b\xb7\x4d\x81\x5c\x92\x05\x0c\x2c\xd2\x3f\xc9\xa2\x0f\x8b\xc5\x2e\x2d\x8d\x6c\x36\x32\xe9\x25\x29\x27\x86\xe0\xef\x5e\x0c\x29\xca\x94\xad\xe4\xd2\xeb\x93\x65\x72\xfe\xfe\x86\x33\x9c\x61\xd3\x64\xb3\xe4\x5a\x6d\xf7\x5a\xac\xd6\x16\x7e\x7d\xff\xa7\x3f\x5f\x6c\x35\x1a\x94\x16\x3e\xf2\x1c\x97\x4a\x3d\xc2\x42\xe6\x0c\xae\xaa\x0a\x1c\x91\x01\xda\xd7\x3b\x2c\x58\xf2\xb0\x16\x06\x8c\xaa\x75\x8e\x90\xab\x02\x41\x18\xa8\x44\x8e\xd2\x60\x01\xb5\x2c\x50\x83\x5d\x23\x5c\x6d\x79\xbe\x46\xf8\x95\xbd\x0f\xbb\x50\xaa\x5a\x16\x89\x90\x6e\xff\xd3\xe2\xfa\xf6\xee\xfe\x16\x4a\x51\x21\xb4\x6b\x5a\x29\x0b\x85\xd0\x98\x5b\xa5\xf7\xa0\x4a\xb0\x91\x32\xab\x11\x59\x32\xcb\x0e\x87\x24\x69\x1a\x28\xb0\x14\x12\x21\xdd\xa8\x02\xab\x14\xda\xd5\xf1\xf6\x71\x05\x1f\x2e\x61\xc9\x0d\xc2\x98\x5d\x2b\x59\x8a\x15\xfb\x07\xcf\x1f\xf9\x0a\x89\xa8\x69\xc0\xe2\x66\x5b\x71\x8b\x90\xae\x91\x17\xa8\x53\x18\x07\xf6\xe3\x96\xd8\x6c\x95\xb6\x61\x2b\xcb\x80\x84\xb3\x3b\xbe\x21\x29\xe4\x33\x19\xec\x74\x03\x4a\x2b\xec\x1e\x4a\xe5\x3d\xef\x11\x9a\x7c\x8d\x1b\xce\x12\xbb\xdf\x9e\xee\x58\x5d\xe7\x16\x9a\x64\x94\x3b\x23\xa1\xa7\xde\x49\xce\xd4\x46\x58\xcb\x57\xa6\x35\x63\x94\x65\xb0\xb8\xf1\xb8\x20\xa9\x65\xc9\x68\x71\xe3\xc5\x2e\x6e\xd8\x03\xe9\x38\x1c\xe0\xfb\x7f\x8c\x92\x1f\x52\x51\xcc\x89\x1f\x37\x5b\xbb\x4f\xbf\x27\xa3\xa6\xb9\x00\xcd\xe5\x0a\x61\xfc\x6d\x0e\xe3\x92\x60\x1a\xb3\x8f\x02\xab\xc2\x38\xe9\xa3\xd6\xcb\x92\xdd\x3b\xdb\xdc\x16\x09\x5c\x2b\x22\x21\x9d\x3b\x5e\xd5\x18\x0c\x48\x3d\x71\xeb\x50\x0a\x25\xd1\xb3\x04\x00\x60\x34\x28\xa7\x69\x40\x94\x8e\x45\x54\x15\x5f\x56\xc4\x36\x6b\x1a\x40\x49\xdb\x9e\x25\x38\xe1\x69\xa5\xb2\x4e\x0e\x4a\x23\xac\xd8\xd1\xce\xf7\x58\xf4\x03\x5f\xb5\x4b\x58\x19\xf4\x42\x5e\x07\xb1\x53\xe7\x01\x89\xbf\x9f\x84\x5d\xc3\x98\xdd\x16\x2b\x3c\x02\xe2\xff\x1d\x11\xd0\x58\x71\x2b\x94\x34\x19\xba\x1d\x8a\xba\xb2\x6b\xd4\x20\x55\x81\x26\x1c\xe5\x95\xe6\xdb\x35\xf3\x22\x1e\x02\x70\x06\xb8\x46\x58\xa2\x90\x2b\xd8\xaa\x6d\x4d\x56\x16\xb0\xdc\x9f\x1d\x9b\x7f\xd6\xa8\xf7\xf0\xb4\x46\x09\xc8\x57\xa8\x2f\x2a\xc5\x0b\xe2\xa2\x6c\x40\x0a\xfb\xc8\xdb\x15\x33\xf9\x95\x36\xf8\xce\xb8\x10\x75\x72\xf2\x22\x78\x99\xcd\xe0\xaa\x28\x04\xf9\xc0\x2b\x1f\x33\x03\x56\x01\x2f\x3a\x53\x8c\x55\x9a\xd2\xa5\xd0\x62\x87\x9a\x81\xcb\x39\xc7\x3c\xb6\x9b\x6d\x45\x07\x67\xab\x85\xb4\x25\xa4\x85\xe0\x15\xe6\x36\x7b\x67\x32\x8f\xb6\x17\x98\xc2\x98\xdd\xb7\x52\x02\xaf\x28\x61\xcd\xcd\x43\x88\x8e\x17\xe5\x60\xa6\xdd\x67\xdb\xdf\x60\x83\x21\x7a\x83\xf1\xb5\x89\x4d\x3e\x3b\x0d\x9e\x27\xe3\x9d\x94\x36\xb7\x5c\xfe\x9f\x9f\x81\x93\xc4\xff\xff\x4e\xc3\x59\x11\xf0\xe2\x8e\x95\x20\x4a\x51\x24\x94\x59\x2f\x2f\xf1\x8d\x79\xe9\x69\x43\x9d\x21\xc3\x98\x03\x79\x40\x42\x94\x65\xc8\x3e\x4b\xf1\xa3\x26\x9e\x2f\x5f\xbb\x2c\x99\x79\x36\xca\xca\x4e\x62\xd3\xb4\x30\xe1\x59\x16\xb2\x90\x8d\x03\x29\x96\x65\x40\xc7\x18\x0b\x12\x16\x83\x28\x64\xa9\xf4\xc6\xe1\xe8\x00\xd4\x48\xa5\xd7\x1d\xf7\x12\xb8\x63\x74\xc8\x3d\x71\xd3\x4a\x80\x89\x23\xfb\x51\xa3\xb1\x58\x4c\x09\xe6\x7e\x9e\x28\x0a\x00\xe5\x49\xac\xf1\x4b\xd3\x40\x85\xd2\x19\xf9\x75\xa9\x54\x15\x82\xde\x42\x2e\xe6\x3d\xd8\x5f\x40\xfd\x56\x93\x6a\x5b\x6b\x69\x22\xb4\x4f\x70\x6d\xe3\xa1\x81\x4b\x40\xad\x95\x26\x57\x5c\xd1\x2e\x56\xe8\x44\x93\x33\x84\x7b\xeb\xd0\xa9\x07\x6d\xa9\x8c\x82\x32\x27\x71\x2d\xf5\xb2\xb6\x9d\x00\x77\xab\x76\x90\xb3\x64\x54\xd6\x32\x87\xc9\xc0\x41\x9b\xbe\xe4\xcf\x64\x0a\x93\x3f\x72\x12\xe6\xde\xb7\x29\x1d\xdd\x91\x28\x01\x59\x04\x37\xa1\x3d\x16\x04\xb5\xdb\x0e\x25\x20\x96\x4e\xcb\x9e\x6f\x10\xc4\xcb\x4b\x90\xa2\xf2\xdc\x5d\x21\x25\x00\x4f\x4e\x78\x74\x2e\x4e\x61\x9c\x77\xbc\x67\x90\x31\xbf\xe5\x43\x49\x8a\xe6\xf0\xf3\x9d\xb2\x1f\x69\xef\x96\xdc\x6a\x2a\xbe\xc4\xea\x03\x44\x7e\x1f\xfb\x08\xf6\x89\x36\xbd\x07\x87\xe0\x5e\x38\xe9\x9d\xd4\x61\xc7\xe6\xa4\x2d\xf1\x7c\xa7\xea\x3f\x39\x3f\xbc\x7e\x72\xf5\x83\xbf\x65\x3b\x67\xd3\x43\x32\x3a\x24\x91\xb2\xe8\xd3\xf5\x3f\xae\x78\x0e\xd6\xe7\x02\xa9\x5d\xcb\x94\xc4\x93\xea\xdc\x34\x67\xd5\xb7\x6b\x88\xc6\x1a\x73\xa4\x5b\xc0\x77\x0b\xff\x0a\xff\xda\xed\xa8\x9f\x40\x4f\x71\xbc\x3d\xdd\x3d\x4d\x67\x31\x5c\x17\x90\xba\x7b\x2d\x3d\x47\xa4\x4b\x36\x47\x7f\x38\xc0\x8f\x1a\xb5\x40\xf3\x42\x39\x8b\x0b\x5d\xd8\xe8\x0e\x7e\xcf\xe8\xc3\x01\x66\x31\xd5\x34\xd6\x32\x99\xc2\xe9\xa1\x0e\x57\x6f\x73\x0c\xcd\xe4\xe7\x58\xc0\x75\x25\x50\xda\x06\x4e\xb4\x30\xdf\xc3\x1d\xa6\x2c\x96\x7f\x42\x34\xf5\xa1\xeb\xc2\x95\x65\xf0\x79\x5b\x10\xe8\xa1\x9e\x70\x58\xd6\xa2\xa2\x16\x9a\xea\x60\x4d\x9b\x54\xcd\x5c\x17\xdc\x77\x36\xcb\xe0\x4e\x59\x04\xbb\xe6\x76\x0e\x7b\x55\x83\x44\x2c\xe8\x2a\xcc\x79\x55\xf5\x89\x3f\xcb\x27\xcd\xb7\x93\x29\x2c\xb1\x54\x1a\x1d\x45\x27\x76\x83\x76\xad\x8a\xb9\xaf\x4f\x27\x6a\x92\xb6\x4e\x79\xf3\xb0\x80\x52\xab\x0d\x70\xb0\x9a\x4b\xc3\x73\x2a\xd8\x73\xe0\xb2\x70\xc1\x88\x16\x1d\x53\xae\x36\xd4\x78\x61\x41\x75\x4b\xab\xaa\xa2\xba\xc5\xf3\x47\x96\xbc\x29\x4e\x1e\x99\x10\xa2\xb0\xee\x57\xff\x2e\x91\x22\xf4\xc7\x02\xd4\x89\x38\x0f\x4f\x1b\x13\x07\x17\xd4\xee\xc7\x84\x56\x9b\x3a\x7c\x02\xfb\xf7\x00\x01\x5e\x5a\xd4\x20\x3c\x61\x5e\x29\x83\xc5\x9c\xc4\x1a\xe5\xf9\x29\x3c\x12\x9f\x6d\x77\xc6\x9f\x44\x55\xc1\x12\x01\x9f\x31\xaf\x09\x2f\xbb\xd6\xaa\x5e\xad\x9d\x66\xdf\x82\xc1\xd3\x5a\xe4\x6b\xc8\x35\x72\x4f\xd0\x83\xfb\xad\x88\x86\x63\xd0\x5b\x27\x20\xed\xf3\x1c\xd4\x23\xe5\xe9\x30\x6a\xac\x6d\x04\x27\x33\xfb\x7c\xe3\x3e\xa7\x09\xd5\xed\x9f\xd4\xa3\xcb\x94\x2d\x97\x22\x9f\xa4\x61\xfc\x3a\x1c\x3e\x9c\x4d\x4b\x54\x76\x7b\x38\xf1\x30\x37\xa5\x2e\x2d\x46\xaf\x6a\x86\x4b\xb0\xcf\xac\xd0\xbb\x2e\xe8\x27\xe4\x6d\xe8\xee\xad\x76\x6d\xc3\x66\x5b\xe1\x06\xa5\xf5\xd1\x2b\x37\x96\xf9\x1d\xd4\x6f\xc4\xca\x93\x4f\xa6\xd4\x9b\x91\xc4\x26\x19\xed\xb8\xee\xb2\xd3\xaf\x1a\xf6\x9b\xff\x9f\x8c\xda\x0d\xf6\x6f\x2d\x2c\xb6\xcc\x69\x2c\x72\x42\x6e\x0e\x51\x39\xe3\x7c\xb5\x9e\xa4\xa2\xb8\x7c\xb7\x4b\xe7\x67\x61\x58\xdc\x4c\xa7\xbd\xee\x50\x0c\x0f\x70\xe1\x8e\xed\x4f\x4c\x74\x21\x0d\x1a\x38\x87\xde\x04\x77\xf9\x57\x13\xb8\xfe\x46\xe6\xfa\x3b\xcd\xcf\x55\xe1\x8a\x1b\x9b\x32\x6e\xff\xdf\x19\xf6\x8e\x9a\xfd\xce\xd8\xb3\xa1\x2f\xbe\xfa\x7b\x83\x5f\xb8\xfc\x77\xe1\xdc\x99\x12\x0e\x87\xbf\xc0\x0e\x7e\xea\xdd\xfb\x6f\xb2\xdc\x99\xdb\xd3\xb4\x30\x0f\x62\xd3\xe9\x19\x16\xb3\x63\x1f\x5d\xe3\x39\xb1\x62\x83\xec\xea\xee\x7e\x71\x3d\x8d\x04\x39\xd7\x83\xb4\xf6\x68\xbd\x2a\x6f\xb6\x3b\xe5\x7e\x95\xbc\x17\x7a\x17\xf7\xd9\xae\xa7\xbf\x6b\x27\xa2\x16\x23\x92\xfa\xbf\x20\xf3\x22\x30\x43\x42\xba\x68\xbc\x88\xcf\xef\xc1\xf3\xaa\xd4\x13\x11\xaf\xf1\x9c\x43\x74\x94\x12\x89\x91\xf1\x49\xeb\xfe\x9d\x0e\x8f\xe1\xbb\xa7\xe8\xb7\xbd\xc5\xc9\x2f\xd3\x5f\xa6\x5d\x69\x09\xdb\xa1\x06\x84\x29\x81\x5c\x65\x8b\x9b\x9e\xb3\x59\x06\xa2\xe8\x8d\x03\xd4\xe7\x68\x6c\xdf\xd3\xfc\x4c\xd3\x76\x2b\x8b\x9b\xf0\x42\xf2\xa6\x12\x24\x8a\xc9\xd4\x49\x6b\x92\x91\x28\xe6\xf0\x8d\xf2\xc4\x58\x9d\x2b\xb9\x63\x57\x56\x89\x53\x01\x54\x25\x3a\x27\x44\x91\x9c\xf7\x86\xa6\x12\xb9\x6b\xd3\xb6\x55\xad\x79\xd5\xbf\xe8\x8f\x04\xbe\x62\x73\xd8\x72\x6d\x5c\xb2\xfa\x65\x55\x9e\xf4\x20\xdd\x38\xdb\xb1\x7d\xf9\xda\x73\xc2\x69\x75\xa3\x22\x3e\x5b\x32\x64\x0c\xe9\x3d\xd1\xa6\x47\x1e\x5f\xf9\x5f\x79\x56\x68\xdb\xd6\x0d\x97\xfb\xf3\x57\x85\xe1\x67\x83\xa8\xc7\x1a\x86\x3a\x36\x7a\x0a\xfe\xaa\x99\xe4\xe5\xaa\xfd\x74\x03\x0d\x75\x60\xdf\x04\x19\xe5\x6b\xee\x99\x8c\x76\xa6\x8e\xd6\xbe\x7c\x13\x5f\xdb\x8b\x0b\x2e\x21\x2f\x57\x74\xb3\xf5\xcc\x69\x9a\x6c\x06\x57\xc7\x47\x09\xf7\x5e\x40\x6d\x12\x9d\x27\xff\x0e\x70\x61\xf9\xca\xb4\x0f\x18\xa7\xcf\x9c\xd1\x5b\x96\x7b\xc9\x6a\x5f\x2b\x1e\xf8\xca\x4f\xb8\x7e\xf8\x8e\xee\x08\x1b\xc6\xd9\x76\xbc\xa3\x65\x78\xdf\x42\x70\x7c\x76\xb3\x74\x67\xa7\x17\x69\xb7\xf8\x3d\xde\x7e\xc9\x78\xd7\xce\xe4\x5c\x52\xf3\xa2\x76\xa8\xb5\x68\x47\x30\xa5\xdd\x2b\xb0\x7f\x96\xe1\x43\xef\x35\xae\xa9\xe2\xf9\xda\x0d\xf6\x6c\xd8\xd7\x81\x97\x1a\x32\x07\x65\x71\x38\x24\xff\x0d\x00\x00\xff\xff\xde\x34\x01\x7b\xc5\x16\x00\x00") func templateEntTmplBytes() ([]byte, error) { return bindataRead( @@ -836,7 +836,7 @@ func templateEntTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/ent.tmpl", size: 5841, mode: os.FileMode(420), modTime: time.Unix(1, 0)} + info := bindataFileInfo{name: "template/ent.tmpl", size: 5829, mode: os.FileMode(420), modTime: time.Unix(1, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/entc/gen/template/ent.tmpl b/entc/gen/template/ent.tmpl index 8d97a7654..0180346e1 100644 --- a/entc/gen/template/ent.tmpl +++ b/entc/gen/template/ent.tmpl @@ -47,9 +47,9 @@ type {{ $.Name }}Edges struct { } {{- range $i, $e := . }} - // {{ $e.StructField }}WithError returns the {{ $e.StructField }} value or an error if the edge + // {{ $e.StructField }}Err returns the {{ $e.StructField }} value or an error if the edge // was not loaded in eager-loading{{ if $e.Unique }}, or loaded but was not found{{ end }}. - func (e {{ $.Name }}Edges) {{ $e.StructField }}WithError() ({{ if not $e.Unique }}[]{{ end }}*{{ $e.Type.Name }}, error) { + func (e {{ $.Name }}Edges) {{ $e.StructField }}Err() ({{ if not $e.Unique }}[]{{ end }}*{{ $e.Type.Name }}, error) { if e.loadedTypes[{{ $i }}] { {{- if $e.Unique }} if e.{{ $e.StructField }} == nil { diff --git a/entc/integration/customid/ent/group.go b/entc/integration/customid/ent/group.go index 4aaee1c79..a0265c504 100644 --- a/entc/integration/customid/ent/group.go +++ b/entc/integration/customid/ent/group.go @@ -33,9 +33,9 @@ type GroupEdges struct { loadedTypes [1]bool } -// UsersWithError returns the Users value or an error if the edge +// UsersErr returns the Users value or an error if the edge // was not loaded in eager-loading. -func (e GroupEdges) UsersWithError() ([]*User, error) { +func (e GroupEdges) UsersErr() ([]*User, error) { if e.loadedTypes[0] { return e.Users, nil } diff --git a/entc/integration/customid/ent/user.go b/entc/integration/customid/ent/user.go index 507544c95..c7c97b8e2 100644 --- a/entc/integration/customid/ent/user.go +++ b/entc/integration/customid/ent/user.go @@ -38,18 +38,18 @@ type UserEdges struct { loadedTypes [3]bool } -// GroupsWithError returns the Groups value or an error if the edge +// GroupsErr returns the Groups value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) GroupsWithError() ([]*Group, error) { +func (e UserEdges) GroupsErr() ([]*Group, error) { if e.loadedTypes[0] { return e.Groups, nil } return nil, &NotLoadedError{edge: "groups"} } -// ParentWithError returns the Parent value or an error if the edge +// ParentErr returns the Parent value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e UserEdges) ParentWithError() (*User, error) { +func (e UserEdges) ParentErr() (*User, error) { if e.loadedTypes[1] { if e.Parent == nil { // The edge parent was loaded in eager-loading, @@ -61,9 +61,9 @@ func (e UserEdges) ParentWithError() (*User, error) { return nil, &NotLoadedError{edge: "parent"} } -// ChildrenWithError returns the Children value or an error if the edge +// ChildrenErr returns the Children value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) ChildrenWithError() ([]*User, error) { +func (e UserEdges) ChildrenErr() ([]*User, error) { if e.loadedTypes[2] { return e.Children, nil } diff --git a/entc/integration/ent/card.go b/entc/integration/ent/card.go index bd4990fab..e31a836ac 100644 --- a/entc/integration/ent/card.go +++ b/entc/integration/ent/card.go @@ -50,9 +50,9 @@ type CardEdges struct { loadedTypes [2]bool } -// OwnerWithError returns the Owner value or an error if the edge +// OwnerErr returns the Owner value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e CardEdges) OwnerWithError() (*User, error) { +func (e CardEdges) OwnerErr() (*User, error) { if e.loadedTypes[0] { if e.Owner == nil { // The edge owner was loaded in eager-loading, @@ -64,9 +64,9 @@ func (e CardEdges) OwnerWithError() (*User, error) { return nil, &NotLoadedError{edge: "owner"} } -// SpecWithError returns the Spec value or an error if the edge +// SpecErr returns the Spec value or an error if the edge // was not loaded in eager-loading. -func (e CardEdges) SpecWithError() ([]*Spec, error) { +func (e CardEdges) SpecErr() ([]*Spec, error) { if e.loadedTypes[1] { return e.Spec, nil } diff --git a/entc/integration/ent/file.go b/entc/integration/ent/file.go index dd6fd1c9f..52dd589ab 100644 --- a/entc/integration/ent/file.go +++ b/entc/integration/ent/file.go @@ -49,9 +49,9 @@ type FileEdges struct { loadedTypes [2]bool } -// OwnerWithError returns the Owner value or an error if the edge +// OwnerErr returns the Owner value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e FileEdges) OwnerWithError() (*User, error) { +func (e FileEdges) OwnerErr() (*User, error) { if e.loadedTypes[0] { if e.Owner == nil { // The edge owner was loaded in eager-loading, @@ -63,9 +63,9 @@ func (e FileEdges) OwnerWithError() (*User, error) { return nil, &NotLoadedError{edge: "owner"} } -// TypeWithError returns the Type value or an error if the edge +// TypeErr returns the Type value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e FileEdges) TypeWithError() (*FileType, error) { +func (e FileEdges) TypeErr() (*FileType, error) { if e.loadedTypes[1] { if e.Type == nil { // The edge type was loaded in eager-loading, diff --git a/entc/integration/ent/filetype.go b/entc/integration/ent/filetype.go index 7034f5b55..f22ffc1f5 100644 --- a/entc/integration/ent/filetype.go +++ b/entc/integration/ent/filetype.go @@ -36,9 +36,9 @@ type FileTypeEdges struct { loadedTypes [1]bool } -// FilesWithError returns the Files value or an error if the edge +// FilesErr returns the Files value or an error if the edge // was not loaded in eager-loading. -func (e FileTypeEdges) FilesWithError() ([]*File, error) { +func (e FileTypeEdges) FilesErr() ([]*File, error) { if e.loadedTypes[0] { return e.Files, nil } diff --git a/entc/integration/ent/group.go b/entc/integration/ent/group.go index c7901ca3a..a353e904e 100644 --- a/entc/integration/ent/group.go +++ b/entc/integration/ent/group.go @@ -53,36 +53,36 @@ type GroupEdges struct { loadedTypes [4]bool } -// FilesWithError returns the Files value or an error if the edge +// FilesErr returns the Files value or an error if the edge // was not loaded in eager-loading. -func (e GroupEdges) FilesWithError() ([]*File, error) { +func (e GroupEdges) FilesErr() ([]*File, error) { if e.loadedTypes[0] { return e.Files, nil } return nil, &NotLoadedError{edge: "files"} } -// BlockedWithError returns the Blocked value or an error if the edge +// BlockedErr returns the Blocked value or an error if the edge // was not loaded in eager-loading. -func (e GroupEdges) BlockedWithError() ([]*User, error) { +func (e GroupEdges) BlockedErr() ([]*User, error) { if e.loadedTypes[1] { return e.Blocked, nil } return nil, &NotLoadedError{edge: "blocked"} } -// UsersWithError returns the Users value or an error if the edge +// UsersErr returns the Users value or an error if the edge // was not loaded in eager-loading. -func (e GroupEdges) UsersWithError() ([]*User, error) { +func (e GroupEdges) UsersErr() ([]*User, error) { if e.loadedTypes[2] { return e.Users, nil } return nil, &NotLoadedError{edge: "users"} } -// InfoWithError returns the Info value or an error if the edge +// InfoErr returns the Info value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e GroupEdges) InfoWithError() (*GroupInfo, error) { +func (e GroupEdges) InfoErr() (*GroupInfo, error) { if e.loadedTypes[3] { if e.Info == nil { // The edge info was loaded in eager-loading, diff --git a/entc/integration/ent/groupinfo.go b/entc/integration/ent/groupinfo.go index 2ce319f80..3b022885d 100644 --- a/entc/integration/ent/groupinfo.go +++ b/entc/integration/ent/groupinfo.go @@ -38,9 +38,9 @@ type GroupInfoEdges struct { loadedTypes [1]bool } -// GroupsWithError returns the Groups value or an error if the edge +// GroupsErr returns the Groups value or an error if the edge // was not loaded in eager-loading. -func (e GroupInfoEdges) GroupsWithError() ([]*Group, error) { +func (e GroupInfoEdges) GroupsErr() ([]*Group, error) { if e.loadedTypes[0] { return e.Groups, nil } diff --git a/entc/integration/ent/node.go b/entc/integration/ent/node.go index 051171829..1d826504d 100644 --- a/entc/integration/ent/node.go +++ b/entc/integration/ent/node.go @@ -39,9 +39,9 @@ type NodeEdges struct { loadedTypes [2]bool } -// PrevWithError returns the Prev value or an error if the edge +// PrevErr returns the Prev value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e NodeEdges) PrevWithError() (*Node, error) { +func (e NodeEdges) PrevErr() (*Node, error) { if e.loadedTypes[0] { if e.Prev == nil { // The edge prev was loaded in eager-loading, @@ -53,9 +53,9 @@ func (e NodeEdges) PrevWithError() (*Node, error) { return nil, &NotLoadedError{edge: "prev"} } -// NextWithError returns the Next value or an error if the edge +// NextErr returns the Next value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e NodeEdges) NextWithError() (*Node, error) { +func (e NodeEdges) NextErr() (*Node, error) { if e.loadedTypes[1] { if e.Next == nil { // The edge next was loaded in eager-loading, diff --git a/entc/integration/ent/pet.go b/entc/integration/ent/pet.go index d28c90910..aeca43b45 100644 --- a/entc/integration/ent/pet.go +++ b/entc/integration/ent/pet.go @@ -41,9 +41,9 @@ type PetEdges struct { loadedTypes [2]bool } -// TeamWithError returns the Team value or an error if the edge +// TeamErr returns the Team value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e PetEdges) TeamWithError() (*User, error) { +func (e PetEdges) TeamErr() (*User, error) { if e.loadedTypes[0] { if e.Team == nil { // The edge team was loaded in eager-loading, @@ -55,9 +55,9 @@ func (e PetEdges) TeamWithError() (*User, error) { return nil, &NotLoadedError{edge: "team"} } -// OwnerWithError returns the Owner value or an error if the edge +// OwnerErr returns the Owner value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e PetEdges) OwnerWithError() (*User, error) { +func (e PetEdges) OwnerErr() (*User, error) { if e.loadedTypes[1] { if e.Owner == nil { // The edge owner was loaded in eager-loading, diff --git a/entc/integration/ent/spec.go b/entc/integration/ent/spec.go index f09f980dc..5fdc7b431 100644 --- a/entc/integration/ent/spec.go +++ b/entc/integration/ent/spec.go @@ -34,9 +34,9 @@ type SpecEdges struct { loadedTypes [1]bool } -// CardWithError returns the Card value or an error if the edge +// CardErr returns the Card value or an error if the edge // was not loaded in eager-loading. -func (e SpecEdges) CardWithError() ([]*Card, error) { +func (e SpecEdges) CardErr() ([]*Card, error) { if e.loadedTypes[0] { return e.Card, nil } diff --git a/entc/integration/ent/user.go b/entc/integration/ent/user.go index a7a7495e3..121547c33 100644 --- a/entc/integration/ent/user.go +++ b/entc/integration/ent/user.go @@ -75,9 +75,9 @@ type UserEdges struct { loadedTypes [11]bool } -// CardWithError returns the Card value or an error if the edge +// CardErr returns the Card value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e UserEdges) CardWithError() (*Card, error) { +func (e UserEdges) CardErr() (*Card, error) { if e.loadedTypes[0] { if e.Card == nil { // The edge card was loaded in eager-loading, @@ -89,63 +89,63 @@ func (e UserEdges) CardWithError() (*Card, error) { return nil, &NotLoadedError{edge: "card"} } -// PetsWithError returns the Pets value or an error if the edge +// PetsErr returns the Pets value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) PetsWithError() ([]*Pet, error) { +func (e UserEdges) PetsErr() ([]*Pet, error) { if e.loadedTypes[1] { return e.Pets, nil } return nil, &NotLoadedError{edge: "pets"} } -// FilesWithError returns the Files value or an error if the edge +// FilesErr returns the Files value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) FilesWithError() ([]*File, error) { +func (e UserEdges) FilesErr() ([]*File, error) { if e.loadedTypes[2] { return e.Files, nil } return nil, &NotLoadedError{edge: "files"} } -// GroupsWithError returns the Groups value or an error if the edge +// GroupsErr returns the Groups value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) GroupsWithError() ([]*Group, error) { +func (e UserEdges) GroupsErr() ([]*Group, error) { if e.loadedTypes[3] { return e.Groups, nil } return nil, &NotLoadedError{edge: "groups"} } -// FriendsWithError returns the Friends value or an error if the edge +// FriendsErr returns the Friends value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) FriendsWithError() ([]*User, error) { +func (e UserEdges) FriendsErr() ([]*User, error) { if e.loadedTypes[4] { return e.Friends, nil } return nil, &NotLoadedError{edge: "friends"} } -// FollowersWithError returns the Followers value or an error if the edge +// FollowersErr returns the Followers value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) FollowersWithError() ([]*User, error) { +func (e UserEdges) FollowersErr() ([]*User, error) { if e.loadedTypes[5] { return e.Followers, nil } return nil, &NotLoadedError{edge: "followers"} } -// FollowingWithError returns the Following value or an error if the edge +// FollowingErr returns the Following value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) FollowingWithError() ([]*User, error) { +func (e UserEdges) FollowingErr() ([]*User, error) { if e.loadedTypes[6] { return e.Following, nil } return nil, &NotLoadedError{edge: "following"} } -// TeamWithError returns the Team value or an error if the edge +// TeamErr returns the Team value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e UserEdges) TeamWithError() (*Pet, error) { +func (e UserEdges) TeamErr() (*Pet, error) { if e.loadedTypes[7] { if e.Team == nil { // The edge team was loaded in eager-loading, @@ -157,9 +157,9 @@ func (e UserEdges) TeamWithError() (*Pet, error) { return nil, &NotLoadedError{edge: "team"} } -// SpouseWithError returns the Spouse value or an error if the edge +// SpouseErr returns the Spouse value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e UserEdges) SpouseWithError() (*User, error) { +func (e UserEdges) SpouseErr() (*User, error) { if e.loadedTypes[8] { if e.Spouse == nil { // The edge spouse was loaded in eager-loading, @@ -171,18 +171,18 @@ func (e UserEdges) SpouseWithError() (*User, error) { return nil, &NotLoadedError{edge: "spouse"} } -// ChildrenWithError returns the Children value or an error if the edge +// ChildrenErr returns the Children value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) ChildrenWithError() ([]*User, error) { +func (e UserEdges) ChildrenErr() ([]*User, error) { if e.loadedTypes[9] { return e.Children, nil } return nil, &NotLoadedError{edge: "children"} } -// ParentWithError returns the Parent value or an error if the edge +// ParentErr returns the Parent value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e UserEdges) ParentWithError() (*User, error) { +func (e UserEdges) ParentErr() (*User, error) { if e.loadedTypes[10] { if e.Parent == nil { // The edge parent was loaded in eager-loading, diff --git a/entc/integration/gremlin/ent/card.go b/entc/integration/gremlin/ent/card.go index 1840d07f5..c5d7787c0 100644 --- a/entc/integration/gremlin/ent/card.go +++ b/entc/integration/gremlin/ent/card.go @@ -48,9 +48,9 @@ type CardEdges struct { loadedTypes [2]bool } -// OwnerWithError returns the Owner value or an error if the edge +// OwnerErr returns the Owner value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e CardEdges) OwnerWithError() (*User, error) { +func (e CardEdges) OwnerErr() (*User, error) { if e.loadedTypes[0] { if e.Owner == nil { // The edge owner was loaded in eager-loading, @@ -62,9 +62,9 @@ func (e CardEdges) OwnerWithError() (*User, error) { return nil, &NotLoadedError{edge: "owner"} } -// SpecWithError returns the Spec value or an error if the edge +// SpecErr returns the Spec value or an error if the edge // was not loaded in eager-loading. -func (e CardEdges) SpecWithError() ([]*Spec, error) { +func (e CardEdges) SpecErr() ([]*Spec, error) { if e.loadedTypes[1] { return e.Spec, nil } diff --git a/entc/integration/gremlin/ent/file.go b/entc/integration/gremlin/ent/file.go index b7c1d86ad..d0bc46f68 100644 --- a/entc/integration/gremlin/ent/file.go +++ b/entc/integration/gremlin/ent/file.go @@ -45,9 +45,9 @@ type FileEdges struct { loadedTypes [2]bool } -// OwnerWithError returns the Owner value or an error if the edge +// OwnerErr returns the Owner value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e FileEdges) OwnerWithError() (*User, error) { +func (e FileEdges) OwnerErr() (*User, error) { if e.loadedTypes[0] { if e.Owner == nil { // The edge owner was loaded in eager-loading, @@ -59,9 +59,9 @@ func (e FileEdges) OwnerWithError() (*User, error) { return nil, &NotLoadedError{edge: "owner"} } -// TypeWithError returns the Type value or an error if the edge +// TypeErr returns the Type value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e FileEdges) TypeWithError() (*FileType, error) { +func (e FileEdges) TypeErr() (*FileType, error) { if e.loadedTypes[1] { if e.Type == nil { // The edge type was loaded in eager-loading, diff --git a/entc/integration/gremlin/ent/filetype.go b/entc/integration/gremlin/ent/filetype.go index 80ce4ff93..4590ca60c 100644 --- a/entc/integration/gremlin/ent/filetype.go +++ b/entc/integration/gremlin/ent/filetype.go @@ -35,9 +35,9 @@ type FileTypeEdges struct { loadedTypes [1]bool } -// FilesWithError returns the Files value or an error if the edge +// FilesErr returns the Files value or an error if the edge // was not loaded in eager-loading. -func (e FileTypeEdges) FilesWithError() ([]*File, error) { +func (e FileTypeEdges) FilesErr() ([]*File, error) { if e.loadedTypes[0] { return e.Files, nil } diff --git a/entc/integration/gremlin/ent/group.go b/entc/integration/gremlin/ent/group.go index a271a91a8..8f5a1ec82 100644 --- a/entc/integration/gremlin/ent/group.go +++ b/entc/integration/gremlin/ent/group.go @@ -51,36 +51,36 @@ type GroupEdges struct { loadedTypes [4]bool } -// FilesWithError returns the Files value or an error if the edge +// FilesErr returns the Files value or an error if the edge // was not loaded in eager-loading. -func (e GroupEdges) FilesWithError() ([]*File, error) { +func (e GroupEdges) FilesErr() ([]*File, error) { if e.loadedTypes[0] { return e.Files, nil } return nil, &NotLoadedError{edge: "files"} } -// BlockedWithError returns the Blocked value or an error if the edge +// BlockedErr returns the Blocked value or an error if the edge // was not loaded in eager-loading. -func (e GroupEdges) BlockedWithError() ([]*User, error) { +func (e GroupEdges) BlockedErr() ([]*User, error) { if e.loadedTypes[1] { return e.Blocked, nil } return nil, &NotLoadedError{edge: "blocked"} } -// UsersWithError returns the Users value or an error if the edge +// UsersErr returns the Users value or an error if the edge // was not loaded in eager-loading. -func (e GroupEdges) UsersWithError() ([]*User, error) { +func (e GroupEdges) UsersErr() ([]*User, error) { if e.loadedTypes[2] { return e.Users, nil } return nil, &NotLoadedError{edge: "users"} } -// InfoWithError returns the Info value or an error if the edge +// InfoErr returns the Info value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e GroupEdges) InfoWithError() (*GroupInfo, error) { +func (e GroupEdges) InfoErr() (*GroupInfo, error) { if e.loadedTypes[3] { if e.Info == nil { // The edge info was loaded in eager-loading, diff --git a/entc/integration/gremlin/ent/groupinfo.go b/entc/integration/gremlin/ent/groupinfo.go index 7f63351c9..3376e0ddd 100644 --- a/entc/integration/gremlin/ent/groupinfo.go +++ b/entc/integration/gremlin/ent/groupinfo.go @@ -37,9 +37,9 @@ type GroupInfoEdges struct { loadedTypes [1]bool } -// GroupsWithError returns the Groups value or an error if the edge +// GroupsErr returns the Groups value or an error if the edge // was not loaded in eager-loading. -func (e GroupInfoEdges) GroupsWithError() ([]*Group, error) { +func (e GroupInfoEdges) GroupsErr() ([]*Group, error) { if e.loadedTypes[0] { return e.Groups, nil } diff --git a/entc/integration/gremlin/ent/node.go b/entc/integration/gremlin/ent/node.go index 2e9730f52..50e867ae1 100644 --- a/entc/integration/gremlin/ent/node.go +++ b/entc/integration/gremlin/ent/node.go @@ -38,9 +38,9 @@ type NodeEdges struct { loadedTypes [2]bool } -// PrevWithError returns the Prev value or an error if the edge +// PrevErr returns the Prev value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e NodeEdges) PrevWithError() (*Node, error) { +func (e NodeEdges) PrevErr() (*Node, error) { if e.loadedTypes[0] { if e.Prev == nil { // The edge prev was loaded in eager-loading, @@ -52,9 +52,9 @@ func (e NodeEdges) PrevWithError() (*Node, error) { return nil, &NotLoadedError{edge: "prev"} } -// NextWithError returns the Next value or an error if the edge +// NextErr returns the Next value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e NodeEdges) NextWithError() (*Node, error) { +func (e NodeEdges) NextErr() (*Node, error) { if e.loadedTypes[1] { if e.Next == nil { // The edge next was loaded in eager-loading, diff --git a/entc/integration/gremlin/ent/pet.go b/entc/integration/gremlin/ent/pet.go index 875f3daf5..fb5b5f028 100644 --- a/entc/integration/gremlin/ent/pet.go +++ b/entc/integration/gremlin/ent/pet.go @@ -38,9 +38,9 @@ type PetEdges struct { loadedTypes [2]bool } -// TeamWithError returns the Team value or an error if the edge +// TeamErr returns the Team value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e PetEdges) TeamWithError() (*User, error) { +func (e PetEdges) TeamErr() (*User, error) { if e.loadedTypes[0] { if e.Team == nil { // The edge team was loaded in eager-loading, @@ -52,9 +52,9 @@ func (e PetEdges) TeamWithError() (*User, error) { return nil, &NotLoadedError{edge: "team"} } -// OwnerWithError returns the Owner value or an error if the edge +// OwnerErr returns the Owner value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e PetEdges) OwnerWithError() (*User, error) { +func (e PetEdges) OwnerErr() (*User, error) { if e.loadedTypes[1] { if e.Owner == nil { // The edge owner was loaded in eager-loading, diff --git a/entc/integration/gremlin/ent/spec.go b/entc/integration/gremlin/ent/spec.go index dd205fe73..d1232c58a 100644 --- a/entc/integration/gremlin/ent/spec.go +++ b/entc/integration/gremlin/ent/spec.go @@ -33,9 +33,9 @@ type SpecEdges struct { loadedTypes [1]bool } -// CardWithError returns the Card value or an error if the edge +// CardErr returns the Card value or an error if the edge // was not loaded in eager-loading. -func (e SpecEdges) CardWithError() ([]*Card, error) { +func (e SpecEdges) CardErr() ([]*Card, error) { if e.loadedTypes[0] { return e.Card, nil } diff --git a/entc/integration/gremlin/ent/user.go b/entc/integration/gremlin/ent/user.go index 68ff6afed..8ff4bf372 100644 --- a/entc/integration/gremlin/ent/user.go +++ b/entc/integration/gremlin/ent/user.go @@ -72,9 +72,9 @@ type UserEdges struct { loadedTypes [11]bool } -// CardWithError returns the Card value or an error if the edge +// CardErr returns the Card value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e UserEdges) CardWithError() (*Card, error) { +func (e UserEdges) CardErr() (*Card, error) { if e.loadedTypes[0] { if e.Card == nil { // The edge card was loaded in eager-loading, @@ -86,63 +86,63 @@ func (e UserEdges) CardWithError() (*Card, error) { return nil, &NotLoadedError{edge: "card"} } -// PetsWithError returns the Pets value or an error if the edge +// PetsErr returns the Pets value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) PetsWithError() ([]*Pet, error) { +func (e UserEdges) PetsErr() ([]*Pet, error) { if e.loadedTypes[1] { return e.Pets, nil } return nil, &NotLoadedError{edge: "pets"} } -// FilesWithError returns the Files value or an error if the edge +// FilesErr returns the Files value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) FilesWithError() ([]*File, error) { +func (e UserEdges) FilesErr() ([]*File, error) { if e.loadedTypes[2] { return e.Files, nil } return nil, &NotLoadedError{edge: "files"} } -// GroupsWithError returns the Groups value or an error if the edge +// GroupsErr returns the Groups value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) GroupsWithError() ([]*Group, error) { +func (e UserEdges) GroupsErr() ([]*Group, error) { if e.loadedTypes[3] { return e.Groups, nil } return nil, &NotLoadedError{edge: "groups"} } -// FriendsWithError returns the Friends value or an error if the edge +// FriendsErr returns the Friends value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) FriendsWithError() ([]*User, error) { +func (e UserEdges) FriendsErr() ([]*User, error) { if e.loadedTypes[4] { return e.Friends, nil } return nil, &NotLoadedError{edge: "friends"} } -// FollowersWithError returns the Followers value or an error if the edge +// FollowersErr returns the Followers value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) FollowersWithError() ([]*User, error) { +func (e UserEdges) FollowersErr() ([]*User, error) { if e.loadedTypes[5] { return e.Followers, nil } return nil, &NotLoadedError{edge: "followers"} } -// FollowingWithError returns the Following value or an error if the edge +// FollowingErr returns the Following value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) FollowingWithError() ([]*User, error) { +func (e UserEdges) FollowingErr() ([]*User, error) { if e.loadedTypes[6] { return e.Following, nil } return nil, &NotLoadedError{edge: "following"} } -// TeamWithError returns the Team value or an error if the edge +// TeamErr returns the Team value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e UserEdges) TeamWithError() (*Pet, error) { +func (e UserEdges) TeamErr() (*Pet, error) { if e.loadedTypes[7] { if e.Team == nil { // The edge team was loaded in eager-loading, @@ -154,9 +154,9 @@ func (e UserEdges) TeamWithError() (*Pet, error) { return nil, &NotLoadedError{edge: "team"} } -// SpouseWithError returns the Spouse value or an error if the edge +// SpouseErr returns the Spouse value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e UserEdges) SpouseWithError() (*User, error) { +func (e UserEdges) SpouseErr() (*User, error) { if e.loadedTypes[8] { if e.Spouse == nil { // The edge spouse was loaded in eager-loading, @@ -168,18 +168,18 @@ func (e UserEdges) SpouseWithError() (*User, error) { return nil, &NotLoadedError{edge: "spouse"} } -// ChildrenWithError returns the Children value or an error if the edge +// ChildrenErr returns the Children value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) ChildrenWithError() ([]*User, error) { +func (e UserEdges) ChildrenErr() ([]*User, error) { if e.loadedTypes[9] { return e.Children, nil } return nil, &NotLoadedError{edge: "children"} } -// ParentWithError returns the Parent value or an error if the edge +// ParentErr returns the Parent value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e UserEdges) ParentWithError() (*User, error) { +func (e UserEdges) ParentErr() (*User, error) { if e.loadedTypes[10] { if e.Parent == nil { // The edge parent was loaded in eager-loading, diff --git a/entc/integration/idtype/ent/user.go b/entc/integration/idtype/ent/user.go index 6330213cc..41a273644 100644 --- a/entc/integration/idtype/ent/user.go +++ b/entc/integration/idtype/ent/user.go @@ -40,9 +40,9 @@ type UserEdges struct { loadedTypes [3]bool } -// SpouseWithError returns the Spouse value or an error if the edge +// SpouseErr returns the Spouse value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e UserEdges) SpouseWithError() (*User, error) { +func (e UserEdges) SpouseErr() (*User, error) { if e.loadedTypes[0] { if e.Spouse == nil { // The edge spouse was loaded in eager-loading, @@ -54,18 +54,18 @@ func (e UserEdges) SpouseWithError() (*User, error) { return nil, &NotLoadedError{edge: "spouse"} } -// FollowersWithError returns the Followers value or an error if the edge +// FollowersErr returns the Followers value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) FollowersWithError() ([]*User, error) { +func (e UserEdges) FollowersErr() ([]*User, error) { if e.loadedTypes[1] { return e.Followers, nil } return nil, &NotLoadedError{edge: "followers"} } -// FollowingWithError returns the Following value or an error if the edge +// FollowingErr returns the Following value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) FollowingWithError() ([]*User, error) { +func (e UserEdges) FollowingErr() ([]*User, error) { if e.loadedTypes[2] { return e.Following, nil } diff --git a/entc/integration/integration_test.go b/entc/integration/integration_test.go index dc8c7c509..42276c0ca 100644 --- a/entc/integration/integration_test.go +++ b/entc/integration/integration_test.go @@ -911,19 +911,19 @@ func EagerLoading(t *testing.T, client *ent.Client) { require.Nil(users[1].Edges.Card) edges := users[0].Edges - pets, err := edges.PetsWithError() + pets, err := edges.PetsErr() require.True(ent.IsNotLoaded(err)) require.Nil(pets) - groups, err := edges.GroupsWithError() + groups, err := edges.GroupsErr() require.True(ent.IsNotLoaded(err)) require.Nil(groups) - card, err := edges.CardWithError() + card, err := edges.CardErr() require.Nil(err) require.NotNil(card) - spouse, err := edges.SpouseWithError() + spouse, err := edges.SpouseErr() require.Nil(err) require.NotNil(spouse) - parent, err := edges.ParentWithError() + parent, err := edges.ParentErr() require.True(ent.IsNotFound(err), "loaded but was not found") require.Nil(parent) }) diff --git a/entc/integration/migrate/entv1/car.go b/entc/integration/migrate/entv1/car.go index 1c2611047..31bd15fa1 100644 --- a/entc/integration/migrate/entv1/car.go +++ b/entc/integration/migrate/entv1/car.go @@ -35,9 +35,9 @@ type CarEdges struct { loadedTypes [1]bool } -// OwnerWithError returns the Owner value or an error if the edge +// OwnerErr returns the Owner value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e CarEdges) OwnerWithError() (*User, error) { +func (e CarEdges) OwnerErr() (*User, error) { if e.loadedTypes[0] { if e.Owner == nil { // The edge owner was loaded in eager-loading, diff --git a/entc/integration/migrate/entv1/user.go b/entc/integration/migrate/entv1/user.go index 5e3404835..f1fd5942d 100644 --- a/entc/integration/migrate/entv1/user.go +++ b/entc/integration/migrate/entv1/user.go @@ -56,9 +56,9 @@ type UserEdges struct { loadedTypes [4]bool } -// ParentWithError returns the Parent value or an error if the edge +// ParentErr returns the Parent value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e UserEdges) ParentWithError() (*User, error) { +func (e UserEdges) ParentErr() (*User, error) { if e.loadedTypes[0] { if e.Parent == nil { // The edge parent was loaded in eager-loading, @@ -70,18 +70,18 @@ func (e UserEdges) ParentWithError() (*User, error) { return nil, &NotLoadedError{edge: "parent"} } -// ChildrenWithError returns the Children value or an error if the edge +// ChildrenErr returns the Children value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) ChildrenWithError() ([]*User, error) { +func (e UserEdges) ChildrenErr() ([]*User, error) { if e.loadedTypes[1] { return e.Children, nil } return nil, &NotLoadedError{edge: "children"} } -// SpouseWithError returns the Spouse value or an error if the edge +// SpouseErr returns the Spouse value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e UserEdges) SpouseWithError() (*User, error) { +func (e UserEdges) SpouseErr() (*User, error) { if e.loadedTypes[2] { if e.Spouse == nil { // The edge spouse was loaded in eager-loading, @@ -93,9 +93,9 @@ func (e UserEdges) SpouseWithError() (*User, error) { return nil, &NotLoadedError{edge: "spouse"} } -// CarWithError returns the Car value or an error if the edge +// CarErr returns the Car value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e UserEdges) CarWithError() (*Car, error) { +func (e UserEdges) CarErr() (*Car, error) { if e.loadedTypes[3] { if e.Car == nil { // The edge car was loaded in eager-loading, diff --git a/entc/integration/migrate/entv2/car.go b/entc/integration/migrate/entv2/car.go index 463b8604d..4e54db6f0 100644 --- a/entc/integration/migrate/entv2/car.go +++ b/entc/integration/migrate/entv2/car.go @@ -35,9 +35,9 @@ type CarEdges struct { loadedTypes [1]bool } -// OwnerWithError returns the Owner value or an error if the edge +// OwnerErr returns the Owner value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e CarEdges) OwnerWithError() (*User, error) { +func (e CarEdges) OwnerErr() (*User, error) { if e.loadedTypes[0] { if e.Owner == nil { // The edge owner was loaded in eager-loading, diff --git a/entc/integration/migrate/entv2/user.go b/entc/integration/migrate/entv2/user.go index 46776a5d8..1b61d4fe4 100644 --- a/entc/integration/migrate/entv2/user.go +++ b/entc/integration/migrate/entv2/user.go @@ -51,9 +51,9 @@ type UserEdges struct { loadedTypes [1]bool } -// CarWithError returns the Car value or an error if the edge +// CarErr returns the Car value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) CarWithError() ([]*Car, error) { +func (e UserEdges) CarErr() ([]*Car, error) { if e.loadedTypes[0] { return e.Car, nil } diff --git a/entc/integration/template/ent/pet.go b/entc/integration/template/ent/pet.go index 8a47efaaf..76372df98 100644 --- a/entc/integration/template/ent/pet.go +++ b/entc/integration/template/ent/pet.go @@ -40,9 +40,9 @@ type PetEdges struct { loadedTypes [1]bool } -// OwnerWithError returns the Owner value or an error if the edge +// OwnerErr returns the Owner value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e PetEdges) OwnerWithError() (*User, error) { +func (e PetEdges) OwnerErr() (*User, error) { if e.loadedTypes[0] { if e.Owner == nil { // The edge owner was loaded in eager-loading, diff --git a/entc/integration/template/ent/user.go b/entc/integration/template/ent/user.go index 13e633ac6..0d6df8310 100644 --- a/entc/integration/template/ent/user.go +++ b/entc/integration/template/ent/user.go @@ -37,18 +37,18 @@ type UserEdges struct { loadedTypes [2]bool } -// PetsWithError returns the Pets value or an error if the edge +// PetsErr returns the Pets value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) PetsWithError() ([]*Pet, error) { +func (e UserEdges) PetsErr() ([]*Pet, error) { if e.loadedTypes[0] { return e.Pets, nil } return nil, &NotLoadedError{edge: "pets"} } -// FriendsWithError returns the Friends value or an error if the edge +// FriendsErr returns the Friends value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) FriendsWithError() ([]*User, error) { +func (e UserEdges) FriendsErr() ([]*User, error) { if e.loadedTypes[1] { return e.Friends, nil } diff --git a/examples/edgeindex/ent/city.go b/examples/edgeindex/ent/city.go index 19b94815c..2d9a7fb1a 100644 --- a/examples/edgeindex/ent/city.go +++ b/examples/edgeindex/ent/city.go @@ -35,9 +35,9 @@ type CityEdges struct { loadedTypes [1]bool } -// StreetsWithError returns the Streets value or an error if the edge +// StreetsErr returns the Streets value or an error if the edge // was not loaded in eager-loading. -func (e CityEdges) StreetsWithError() ([]*Street, error) { +func (e CityEdges) StreetsErr() ([]*Street, error) { if e.loadedTypes[0] { return e.Streets, nil } diff --git a/examples/edgeindex/ent/street.go b/examples/edgeindex/ent/street.go index 562fe77a4..548a52e57 100644 --- a/examples/edgeindex/ent/street.go +++ b/examples/edgeindex/ent/street.go @@ -37,9 +37,9 @@ type StreetEdges struct { loadedTypes [1]bool } -// CityWithError returns the City value or an error if the edge +// CityErr returns the City value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e StreetEdges) CityWithError() (*City, error) { +func (e StreetEdges) CityErr() (*City, error) { if e.loadedTypes[0] { if e.City == nil { // The edge city was loaded in eager-loading, diff --git a/examples/m2m2types/ent/group.go b/examples/m2m2types/ent/group.go index 5977350fa..5ac9c184b 100644 --- a/examples/m2m2types/ent/group.go +++ b/examples/m2m2types/ent/group.go @@ -35,9 +35,9 @@ type GroupEdges struct { loadedTypes [1]bool } -// UsersWithError returns the Users value or an error if the edge +// UsersErr returns the Users value or an error if the edge // was not loaded in eager-loading. -func (e GroupEdges) UsersWithError() ([]*User, error) { +func (e GroupEdges) UsersErr() ([]*User, error) { if e.loadedTypes[0] { return e.Users, nil } diff --git a/examples/m2m2types/ent/user.go b/examples/m2m2types/ent/user.go index 04330bef0..e850aa12f 100644 --- a/examples/m2m2types/ent/user.go +++ b/examples/m2m2types/ent/user.go @@ -37,9 +37,9 @@ type UserEdges struct { loadedTypes [1]bool } -// GroupsWithError returns the Groups value or an error if the edge +// GroupsErr returns the Groups value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) GroupsWithError() ([]*Group, error) { +func (e UserEdges) GroupsErr() ([]*Group, error) { if e.loadedTypes[0] { return e.Groups, nil } diff --git a/examples/m2mbidi/ent/user.go b/examples/m2mbidi/ent/user.go index 5d8f10ca4..819fd4963 100644 --- a/examples/m2mbidi/ent/user.go +++ b/examples/m2mbidi/ent/user.go @@ -37,9 +37,9 @@ type UserEdges struct { loadedTypes [1]bool } -// FriendsWithError returns the Friends value or an error if the edge +// FriendsErr returns the Friends value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) FriendsWithError() ([]*User, error) { +func (e UserEdges) FriendsErr() ([]*User, error) { if e.loadedTypes[0] { return e.Friends, nil } diff --git a/examples/m2mrecur/ent/user.go b/examples/m2mrecur/ent/user.go index 9aa1dc3ef..7296477b3 100644 --- a/examples/m2mrecur/ent/user.go +++ b/examples/m2mrecur/ent/user.go @@ -39,18 +39,18 @@ type UserEdges struct { loadedTypes [2]bool } -// FollowersWithError returns the Followers value or an error if the edge +// FollowersErr returns the Followers value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) FollowersWithError() ([]*User, error) { +func (e UserEdges) FollowersErr() ([]*User, error) { if e.loadedTypes[0] { return e.Followers, nil } return nil, &NotLoadedError{edge: "followers"} } -// FollowingWithError returns the Following value or an error if the edge +// FollowingErr returns the Following value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) FollowingWithError() ([]*User, error) { +func (e UserEdges) FollowingErr() ([]*User, error) { if e.loadedTypes[1] { return e.Following, nil } diff --git a/examples/o2m2types/ent/pet.go b/examples/o2m2types/ent/pet.go index a47c1d465..9a303aa97 100644 --- a/examples/o2m2types/ent/pet.go +++ b/examples/o2m2types/ent/pet.go @@ -37,9 +37,9 @@ type PetEdges struct { loadedTypes [1]bool } -// OwnerWithError returns the Owner value or an error if the edge +// OwnerErr returns the Owner value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e PetEdges) OwnerWithError() (*User, error) { +func (e PetEdges) OwnerErr() (*User, error) { if e.loadedTypes[0] { if e.Owner == nil { // The edge owner was loaded in eager-loading, diff --git a/examples/o2m2types/ent/user.go b/examples/o2m2types/ent/user.go index 1d6bfa162..bd9d7a3a0 100644 --- a/examples/o2m2types/ent/user.go +++ b/examples/o2m2types/ent/user.go @@ -37,9 +37,9 @@ type UserEdges struct { loadedTypes [1]bool } -// PetsWithError returns the Pets value or an error if the edge +// PetsErr returns the Pets value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) PetsWithError() ([]*Pet, error) { +func (e UserEdges) PetsErr() ([]*Pet, error) { if e.loadedTypes[0] { return e.Pets, nil } diff --git a/examples/o2mrecur/ent/node.go b/examples/o2mrecur/ent/node.go index f940e9c41..f7d7600da 100644 --- a/examples/o2mrecur/ent/node.go +++ b/examples/o2mrecur/ent/node.go @@ -38,9 +38,9 @@ type NodeEdges struct { loadedTypes [2]bool } -// ParentWithError returns the Parent value or an error if the edge +// ParentErr returns the Parent value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e NodeEdges) ParentWithError() (*Node, error) { +func (e NodeEdges) ParentErr() (*Node, error) { if e.loadedTypes[0] { if e.Parent == nil { // The edge parent was loaded in eager-loading, @@ -52,9 +52,9 @@ func (e NodeEdges) ParentWithError() (*Node, error) { return nil, &NotLoadedError{edge: "parent"} } -// ChildrenWithError returns the Children value or an error if the edge +// ChildrenErr returns the Children value or an error if the edge // was not loaded in eager-loading. -func (e NodeEdges) ChildrenWithError() ([]*Node, error) { +func (e NodeEdges) ChildrenErr() ([]*Node, error) { if e.loadedTypes[1] { return e.Children, nil } diff --git a/examples/o2o2types/ent/card.go b/examples/o2o2types/ent/card.go index 3daee164e..c0b4c0463 100644 --- a/examples/o2o2types/ent/card.go +++ b/examples/o2o2types/ent/card.go @@ -40,9 +40,9 @@ type CardEdges struct { loadedTypes [1]bool } -// OwnerWithError returns the Owner value or an error if the edge +// OwnerErr returns the Owner value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e CardEdges) OwnerWithError() (*User, error) { +func (e CardEdges) OwnerErr() (*User, error) { if e.loadedTypes[0] { if e.Owner == nil { // The edge owner was loaded in eager-loading, diff --git a/examples/o2o2types/ent/user.go b/examples/o2o2types/ent/user.go index 76ffed0b5..31374a544 100644 --- a/examples/o2o2types/ent/user.go +++ b/examples/o2o2types/ent/user.go @@ -38,9 +38,9 @@ type UserEdges struct { loadedTypes [1]bool } -// CardWithError returns the Card value or an error if the edge +// CardErr returns the Card value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e UserEdges) CardWithError() (*Card, error) { +func (e UserEdges) CardErr() (*Card, error) { if e.loadedTypes[0] { if e.Card == nil { // The edge card was loaded in eager-loading, diff --git a/examples/o2obidi/ent/user.go b/examples/o2obidi/ent/user.go index a89fedafa..3f4536cea 100644 --- a/examples/o2obidi/ent/user.go +++ b/examples/o2obidi/ent/user.go @@ -38,9 +38,9 @@ type UserEdges struct { loadedTypes [1]bool } -// SpouseWithError returns the Spouse value or an error if the edge +// SpouseErr returns the Spouse value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e UserEdges) SpouseWithError() (*User, error) { +func (e UserEdges) SpouseErr() (*User, error) { if e.loadedTypes[0] { if e.Spouse == nil { // The edge spouse was loaded in eager-loading, diff --git a/examples/o2orecur/ent/node.go b/examples/o2orecur/ent/node.go index 8d4d0aa8d..87e41006c 100644 --- a/examples/o2orecur/ent/node.go +++ b/examples/o2orecur/ent/node.go @@ -38,9 +38,9 @@ type NodeEdges struct { loadedTypes [2]bool } -// PrevWithError returns the Prev value or an error if the edge +// PrevErr returns the Prev value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e NodeEdges) PrevWithError() (*Node, error) { +func (e NodeEdges) PrevErr() (*Node, error) { if e.loadedTypes[0] { if e.Prev == nil { // The edge prev was loaded in eager-loading, @@ -52,9 +52,9 @@ func (e NodeEdges) PrevWithError() (*Node, error) { return nil, &NotLoadedError{edge: "prev"} } -// NextWithError returns the Next value or an error if the edge +// NextErr returns the Next value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e NodeEdges) NextWithError() (*Node, error) { +func (e NodeEdges) NextErr() (*Node, error) { if e.loadedTypes[1] { if e.Next == nil { // The edge next was loaded in eager-loading, diff --git a/examples/start/ent/car.go b/examples/start/ent/car.go index 4689028b8..1319ce4f5 100644 --- a/examples/start/ent/car.go +++ b/examples/start/ent/car.go @@ -40,9 +40,9 @@ type CarEdges struct { loadedTypes [1]bool } -// OwnerWithError returns the Owner value or an error if the edge +// OwnerErr returns the Owner value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e CarEdges) OwnerWithError() (*User, error) { +func (e CarEdges) OwnerErr() (*User, error) { if e.loadedTypes[0] { if e.Owner == nil { // The edge owner was loaded in eager-loading, diff --git a/examples/start/ent/group.go b/examples/start/ent/group.go index d978320cc..2c5294190 100644 --- a/examples/start/ent/group.go +++ b/examples/start/ent/group.go @@ -35,9 +35,9 @@ type GroupEdges struct { loadedTypes [1]bool } -// UsersWithError returns the Users value or an error if the edge +// UsersErr returns the Users value or an error if the edge // was not loaded in eager-loading. -func (e GroupEdges) UsersWithError() ([]*User, error) { +func (e GroupEdges) UsersErr() ([]*User, error) { if e.loadedTypes[0] { return e.Users, nil } diff --git a/examples/start/ent/user.go b/examples/start/ent/user.go index e4a5e9811..10edc9538 100644 --- a/examples/start/ent/user.go +++ b/examples/start/ent/user.go @@ -39,18 +39,18 @@ type UserEdges struct { loadedTypes [2]bool } -// CarsWithError returns the Cars value or an error if the edge +// CarsErr returns the Cars value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) CarsWithError() ([]*Car, error) { +func (e UserEdges) CarsErr() ([]*Car, error) { if e.loadedTypes[0] { return e.Cars, nil } return nil, &NotLoadedError{edge: "cars"} } -// GroupsWithError returns the Groups value or an error if the edge +// GroupsErr returns the Groups value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) GroupsWithError() ([]*Group, error) { +func (e UserEdges) GroupsErr() ([]*Group, error) { if e.loadedTypes[1] { return e.Groups, nil } diff --git a/examples/traversal/ent/group.go b/examples/traversal/ent/group.go index a45b4c261..ecea45668 100644 --- a/examples/traversal/ent/group.go +++ b/examples/traversal/ent/group.go @@ -39,18 +39,18 @@ type GroupEdges struct { loadedTypes [2]bool } -// UsersWithError returns the Users value or an error if the edge +// UsersErr returns the Users value or an error if the edge // was not loaded in eager-loading. -func (e GroupEdges) UsersWithError() ([]*User, error) { +func (e GroupEdges) UsersErr() ([]*User, error) { if e.loadedTypes[0] { return e.Users, nil } return nil, &NotLoadedError{edge: "users"} } -// AdminWithError returns the Admin value or an error if the edge +// AdminErr returns the Admin value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e GroupEdges) AdminWithError() (*User, error) { +func (e GroupEdges) AdminErr() (*User, error) { if e.loadedTypes[1] { if e.Admin == nil { // The edge admin was loaded in eager-loading, diff --git a/examples/traversal/ent/pet.go b/examples/traversal/ent/pet.go index d6c595d7a..1bd91a08e 100644 --- a/examples/traversal/ent/pet.go +++ b/examples/traversal/ent/pet.go @@ -39,18 +39,18 @@ type PetEdges struct { loadedTypes [2]bool } -// FriendsWithError returns the Friends value or an error if the edge +// FriendsErr returns the Friends value or an error if the edge // was not loaded in eager-loading. -func (e PetEdges) FriendsWithError() ([]*Pet, error) { +func (e PetEdges) FriendsErr() ([]*Pet, error) { if e.loadedTypes[0] { return e.Friends, nil } return nil, &NotLoadedError{edge: "friends"} } -// OwnerWithError returns the Owner value or an error if the edge +// OwnerErr returns the Owner value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e PetEdges) OwnerWithError() (*User, error) { +func (e PetEdges) OwnerErr() (*User, error) { if e.loadedTypes[1] { if e.Owner == nil { // The edge owner was loaded in eager-loading, diff --git a/examples/traversal/ent/user.go b/examples/traversal/ent/user.go index 9007d4515..a34228755 100644 --- a/examples/traversal/ent/user.go +++ b/examples/traversal/ent/user.go @@ -43,36 +43,36 @@ type UserEdges struct { loadedTypes [4]bool } -// PetsWithError returns the Pets value or an error if the edge +// PetsErr returns the Pets value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) PetsWithError() ([]*Pet, error) { +func (e UserEdges) PetsErr() ([]*Pet, error) { if e.loadedTypes[0] { return e.Pets, nil } return nil, &NotLoadedError{edge: "pets"} } -// FriendsWithError returns the Friends value or an error if the edge +// FriendsErr returns the Friends value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) FriendsWithError() ([]*User, error) { +func (e UserEdges) FriendsErr() ([]*User, error) { if e.loadedTypes[1] { return e.Friends, nil } return nil, &NotLoadedError{edge: "friends"} } -// GroupsWithError returns the Groups value or an error if the edge +// GroupsErr returns the Groups value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) GroupsWithError() ([]*Group, error) { +func (e UserEdges) GroupsErr() ([]*Group, error) { if e.loadedTypes[2] { return e.Groups, nil } return nil, &NotLoadedError{edge: "groups"} } -// ManageWithError returns the Manage value or an error if the edge +// ManageErr returns the Manage value or an error if the edge // was not loaded in eager-loading. -func (e UserEdges) ManageWithError() ([]*Group, error) { +func (e UserEdges) ManageErr() ([]*Group, error) { if e.loadedTypes[3] { return e.Manage, nil }