diff --git a/entc/gen/internal/bindata.go b/entc/gen/internal/bindata.go index 037a2ad80..ce2e09775 100644 --- a/entc/gen/internal/bindata.go +++ b/entc/gen/internal/bindata.go @@ -266,7 +266,7 @@ func templateBuilderUpdateTmpl() (*asset, error) { return a, nil } -var _templateClientTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x59\xdf\x73\xe3\xb6\xf1\x7f\x16\xff\x8a\xfd\x72\x7c\xf7\x25\x3d\x32\x98\xe6\xad\xea\xf8\xe1\x62\x5f\x13\xcd\x24\x76\xd2\x73\xda\xce\x64\x32\x39\x18\x04\x25\xd4\x14\x40\x83\xa0\x2d\x8f\xea\xff\xbd\xb3\x0b\xf0\x97\x44\xeb\x9c\xdc\x75\xfa\x62\x8b\x00\xb1\xbb\xf8\xec\x67\x17\xbb\xe0\x6e\x97\x9d\x46\x17\xa6\x7a\xb2\x6a\xb5\x76\xf0\xf5\x57\x7f\xfa\xf3\x59\x65\x65\x2d\xb5\x83\xbf\x72\x21\x6f\x8d\xb9\x83\xa5\x16\x0c\xde\x95\x25\xd0\x4b\x35\xe0\xbc\x7d\x90\x39\x8b\x6e\xd6\xaa\x86\xda\x34\x56\x48\x10\x26\x97\xa0\x6a\x28\x95\x90\xba\x96\x39\x34\x3a\x97\x16\xdc\x5a\xc2\xbb\x8a\x8b\xb5\x84\xaf\xd9\x57\xed\x2c\x14\xa6\xd1\x79\xa4\x34\xcd\x7f\xbf\xbc\x78\x7f\xf5\xe1\x3d\x14\xaa\x94\x10\xc6\xac\x31\x0e\x72\x65\xa5\x70\xc6\x3e\x81\x29\xc0\x0d\x94\x39\x2b\x25\x8b\x4e\xb3\xe7\xe7\x28\xda\xed\x20\x97\x85\xd2\x12\x62\x51\x2a\xa9\x5d\x0c\x61\xf8\xa4\xba\x5b\xc1\xe2\x1c\x6e\x79\x2d\xe1\x84\x5d\x18\x5d\xa8\x15\xfb\x91\x8b\x3b\xbe\x92\xf8\xd2\x6e\x07\x4e\x6e\xaa\x92\x3b\x09\xf1\x5a\xf2\x5c\xda\x18\x4e\x68\xb9\xda\x54\xc6\x3a\x48\xa2\x59\x5c\x9a\x55\x1c\x45\xb3\x18\x25\x1e\x0a\xc9\x36\x6a\x65\xb9\x93\x71\x34\xdb\xed\xc0\x72\xbd\x92\x70\xf2\xdb\x1c\x4e\x34\xaa\x3e\x61\x57\x26\x97\x35\x8a\x9c\x79\x09\x7a\x42\x84\x1f\xef\x07\x48\xd6\x19\x48\x9d\x93\x2d\xb3\x78\xa5\xdc\xba\xb9\x65\xc2\x6c\xb2\x22\xb8\x25\x93\xda\x65\xb9\xe2\xa5\x14\xee\x40\x77\xb0\x9e\x0c\xf8\xe0\x8c\xe5\x2b\xc9\x96\x34\x56\xc3\x59\x6f\x4b\x78\x2d\x28\x24\x7d\x38\x9b\x46\x51\x96\xc1\x05\x81\x89\x2e\x45\x7f\x78\x68\xc1\xad\xb9\x83\xb5\x29\xf3\x1a\x78\x59\x02\x0e\xdd\x36\xaa\xcc\xa5\xad\x59\xe4\x9e\x2a\xd9\x2e\xab\x9d\x6d\x84\x83\x5d\x34\x13\xb4\x5d\xbf\x23\x55\xa0\x41\x4d\x85\x6a\x7f\xf0\xb8\x79\x68\xb2\x0c\x3e\x88\xb5\xdc\xf0\x3d\x7d\x85\xb1\x20\xac\xe4\x4e\xe9\xd5\x1c\x3c\xd4\x4a\xaf\x80\xeb\x1c\x72\x6b\xaa\x0a\x1f\x6a\x5a\xc9\xa2\xd9\x2c\xc8\x38\x0d\x3e\x61\xfe\x79\x84\x26\xfd\x0e\x50\x1d\xba\x28\xcb\xc0\x3b\xe3\x8a\x6f\xd0\xb4\x09\x73\x94\x76\xd2\x72\x41\x66\x3c\x2a\xb7\xa6\xf9\xf1\xa2\x1e\x92\xd9\x6c\x3c\x73\x3a\x7a\xf4\x58\xed\x9b\x37\xe0\xa4\x57\x9b\x15\x4a\x96\x79\x9d\xf1\x3c\x57\x4e\x19\xcd\xcb\xc0\xd2\x67\x72\xd4\x95\x7c\x0c\xa0\x13\x52\xb2\x06\x0e\x5a\x3e\xb6\x36\x7b\xfc\x1b\x2b\xf3\xde\xdc\x95\x7a\x90\x1a\x4c\x85\xd2\x6a\x16\x15\x8d\x16\xbd\x98\xc4\x54\xae\x06\xc6\xd8\x35\xcd\xa7\x70\x1a\xc4\xa3\x33\x0b\x8a\x28\x2f\x73\x57\x9a\xd5\x02\x4a\xb3\x62\x3f\x5a\xa5\x5d\xa9\xe7\xb0\x36\xe6\xae\x5e\xc0\x5b\xfa\xbf\xc3\xfd\x88\x62\xc5\x82\x22\x12\xcc\x18\x4b\xa3\x59\xb0\x6d\x71\x0e\x6f\xbd\xf0\x9d\x17\xb9\x00\x51\xac\x9e\xdb\x79\xa6\xb4\x72\x49\x1a\xcd\xac\x74\x8d\xd5\x61\x47\xb8\x6d\xb2\x38\x11\xad\x69\x29\xf8\x37\xd1\xc4\xa3\x3c\x13\x81\x12\x70\x0e\x2d\x47\xae\xe4\xa3\x1f\x4b\x04\xcb\xad\x7a\x90\x36\x7d\x35\x61\x00\x00\x66\x82\x8d\x7d\x7c\x0e\x88\xe5\x84\xa3\x13\xc1\xfc\x2e\xc7\x0a\xbc\x17\xaf\x2b\xf2\x88\xd4\xe8\xbe\x9c\x3b\x8e\x59\x2b\xab\xef\x4b\x76\xf9\x0d\xd4\x95\x14\xaa\x50\x32\x87\xdb\x27\x72\xa0\x37\x14\x34\x8a\xe7\x3a\x47\x01\x34\xcc\x1d\x6f\x73\x24\xce\xcd\x29\x50\x3c\x7a\x7b\xb4\xe0\xce\x61\x56\xce\xc1\x19\x50\x8e\x79\x13\x3c\xbb\xa0\xe2\x96\x6f\xa4\x93\xb6\x06\xc1\x35\xdc\x4a\xe0\x79\x2e\x73\x1f\x8d\x81\x4e\x48\xff\x3e\x32\x02\x87\x70\x13\x89\xb7\xed\x8a\xd4\xa3\x41\x1f\xc8\x1e\x42\xa2\x76\x96\x02\x39\x10\x62\x48\xb2\x24\xb8\x72\x0e\xd2\x5a\x63\xc9\x95\xf5\xa3\x72\x62\x0d\xbd\x40\xa2\x20\x66\xf3\xdd\x0e\xfe\x65\x94\x1e\xa4\xb7\x4b\x9f\x0a\x6b\x88\xe7\x80\x27\xc0\x82\x62\xef\x0c\x4e\xdc\xa6\x2a\xd1\x6d\x15\x72\xb4\x80\x38\xe4\xcc\xec\x4d\x9d\x85\xf0\x42\xd4\xe3\x5e\x54\xc8\x90\xb8\x78\xdb\x85\xa2\x17\xc3\xfc\x5c\x2e\x0b\xde\x94\x0e\x55\x04\x66\x6a\x55\xce\xa1\xd8\x38\xf6\x1e\x8d\x2f\x92\xb8\xd1\xb5\xa7\x9f\xcc\x83\xfd\x0b\x78\x73\x1f\xcf\x07\x9b\x49\xa3\x59\xeb\xfc\x9b\xed\x9e\x93\x9c\xe5\xba\xc6\x24\x43\xfe\x08\x18\xc3\xcd\x5a\x42\x65\xcd\x83\x42\x67\x08\xa3\x9d\xdc\x3a\x5c\xae\x6a\x68\xfc\x91\xeb\x54\x49\x5e\x19\xac\xc7\x59\x61\x36\x1b\xe5\xd0\x16\x63\xc1\x9a\xb2\x44\x26\x71\x71\xc7\x0e\x03\xe9\x66\x9b\x08\xb7\x6d\xa5\xe3\x61\x85\xff\xd1\x3f\x37\xdb\xa1\x6f\x54\x01\xbf\xcd\xc1\xdc\x51\x3a\x08\x81\xc3\x92\x53\xb7\xbd\xf4\x31\xf4\x17\x9c\xdb\x1d\x41\xa8\x3d\xa0\x9f\x9f\x17\xc8\x32\x6d\xf0\xd0\xe0\xd6\x01\x1f\x59\x8f\x39\x4b\xe9\xf1\x60\x4c\xd0\xcd\x9c\x37\x08\x2d\xd0\xf2\xd1\x1b\x3e\x87\x41\x14\xab\x82\xe6\xff\xef\x1c\xb5\xbf\xda\x18\xb2\x82\x0e\x99\xa1\xce\x05\xbc\x79\x88\x49\x9f\x57\x3e\xce\x84\xad\x8b\xd1\x00\xca\x8a\x82\x95\x66\x35\x87\x5c\xde\x36\xf4\x44\x3f\xba\xfc\x28\x18\xfd\x78\xee\x32\xdb\xdb\x9b\x2d\x9a\x27\xdc\x76\x01\xb8\x0b\xfc\xdd\x27\xc4\xb9\x3f\x47\x5e\x2a\x2e\x3c\x5f\xc7\x27\xcd\xe2\xc5\x1c\x54\xac\xd2\x20\xaf\x3d\xef\x67\xcf\x73\x44\x24\xa2\xaa\xe9\x0c\xb2\x53\x58\x16\xc4\xa2\x3a\x04\x44\xc8\x36\x81\xd1\x35\xdc\x6c\xaf\x43\x00\x27\xa5\xba\x93\xf0\xe1\xa7\xef\x53\xa0\x6a\xac\x8f\xb8\xc9\x80\x73\xdb\x10\xf9\xc3\x70\x0b\xcb\x54\x01\x6b\x5e\xdf\x8c\x03\x2e\xe4\xd8\xe9\x58\x0c\x0b\xdb\x32\x29\xcb\xe0\x12\x51\xde\x0b\x25\x42\xfe\xac\x0d\xa1\xa5\xfb\xff\x10\x2c\xce\xc0\x4a\x3a\x78\x90\xf6\xd6\xd4\x12\xbd\xb6\x42\xa7\x1b\xdd\x66\x5b\x81\xe9\x18\xeb\x0d\x3a\x23\xb3\x2c\xca\xb2\xf6\x5c\x22\x3d\x49\x8a\xa3\x84\x64\xa2\x74\x2e\xb7\x9d\x43\xbe\x4a\x5b\xd0\xfd\x1b\x3f\x35\xd2\x3e\xb5\xaf\x5f\x98\x06\xdd\xe0\xb6\x29\xca\x3c\x88\xbf\x20\x7a\x78\xe8\xaa\xa2\x25\xd0\x90\xc3\xe2\x08\x0d\x03\xe4\xc1\xce\x36\x22\xe6\x9e\x95\xe9\x24\x45\x9d\x6d\xe4\x04\x3f\x3f\xf7\xa0\xa6\x42\x12\xf1\x15\xf8\xb7\xee\x4e\x29\xaa\xc9\x85\xd1\x5a\xfa\x30\xc7\x73\xaa\xb2\xf2\x41\x6a\x57\x93\xdb\xee\x1b\x69\x95\xac\xa1\xb0\x66\xd3\x85\xe4\x44\xbe\x22\xe9\x49\xea\x33\x13\xe2\xd3\x9a\xd0\xe6\xa4\xf0\x42\x30\xe6\xe7\x9a\x0e\x33\x6f\xc8\xa6\x71\xe4\x5e\xbf\x6d\x64\x04\x16\xb5\x38\x23\xb5\x53\xee\x29\xec\x83\xbc\x0f\x4b\x0d\xc6\x52\x4b\x63\x50\xc2\x60\x4d\x4f\x18\x11\x8e\x30\xc1\xcb\x72\x01\x1f\x03\x38\x48\x0a\xf6\x73\x2d\x13\xac\x7d\x3e\x4e\xec\x01\xe7\xbc\x38\xc6\xd8\x77\xc6\xdc\x75\x85\xcc\xd1\x7e\x62\xaf\xf0\x60\x9d\x18\x5f\x63\x8d\x4b\x8c\xe8\x78\x77\x82\x92\x7a\x5f\x53\xe8\x76\xa2\xe3\x8b\xbe\xaf\x0a\x05\x72\x78\xd5\x17\xc8\x7c\x58\x1e\x1f\x56\xc3\x6d\x79\x4e\xed\xc1\x78\xf1\x41\x97\x10\x1a\x37\x2b\x05\xd9\xa7\xd9\xdf\xa4\x90\x94\x7c\x9e\x9f\x77\x3b\xcc\x11\xf2\xde\x4f\xc7\x22\xf6\x63\xf4\xd4\x67\x9b\x37\xec\x6b\xcc\x2e\x41\xfd\xbf\xa1\x34\x8f\xed\xea\x41\xa2\x08\xc9\xb1\xb7\xa4\xcf\x19\x47\xf7\x42\x6c\xec\x2b\x68\x6f\x75\x5f\x40\x8f\x64\x26\x22\xcc\xa7\xbe\xec\xef\x95\xf5\x2c\x7d\x3b\x9a\xe8\x63\xeb\x79\x9f\xae\x1c\x4a\x55\x3b\xec\x83\x0f\x49\x8b\xf6\xf8\x87\xda\xd1\xa1\x9e\x65\xf0\x8e\x38\x88\xb3\x1f\x91\x16\xc5\x1c\xf0\xf4\x49\x3f\x82\xbc\x6f\x78\x49\xcb\x3e\xee\xb7\x9d\x44\xbd\x3a\x29\x92\x55\xb2\x4e\xd2\x34\x1d\x71\x75\x64\xe8\x4b\x94\x0d\x79\xe3\xa0\x20\xe6\x55\x25\x75\x9e\x4c\x4e\x87\xa4\x43\x9c\x0d\x09\x83\xda\x98\xa1\x4b\xfc\x40\x68\xab\xc8\x35\x63\xe6\xbf\x68\xa6\x17\x95\xa4\x6d\xe3\xe5\x9f\x5b\xc3\x76\xd1\xac\x43\xd3\x17\x11\xfe\xad\x1f\xc2\x60\x78\xaf\xab\xdb\xe7\x70\x5d\x79\x09\xe9\xd8\x83\x7b\x82\x7b\x3f\x76\x0b\xbb\xc4\xea\x31\x4e\xe7\x9d\x1f\x17\xdd\xaf\xd6\xe9\xdf\x34\xe5\xdd\x01\x06\xc3\xcd\xb7\x1d\x31\x0d\x97\x77\xc8\x8a\x31\xe2\x94\xbe\x94\xac\x3f\x05\x0c\x6a\x4a\xda\x6e\x15\x3d\x39\x05\xd3\x1e\x78\xb8\x66\x00\xe0\x14\x0c\x83\x57\x26\xa0\x68\xf5\x2d\xba\x5f\x1d\xdb\xab\x7c\xb4\x69\x0d\x8d\x1f\xf9\x03\x9e\xf7\xb2\x7a\xcf\xfb\xe7\xcf\xf1\xbc\x97\x70\xe0\xf9\x91\xe0\xcf\xf4\xbc\x97\x75\xad\x3f\x85\x41\x9f\x81\xfc\x41\xf5\x29\x18\xae\xb5\x4c\xda\x54\x79\x70\x0b\xb1\x07\xd1\xb5\xfe\x02\x28\x5d\x6b\x39\x47\x4f\xf9\x83\x24\xc6\x22\x3e\x1e\xa8\x1c\x18\x93\xbe\x00\x68\x6f\xc6\x97\xc2\x74\x79\xf9\x6a\x54\x55\xfe\x0a\x44\x97\x97\x89\xca\x03\x1d\x97\x97\xec\x06\x8f\xb7\xff\x01\x9a\xf1\xf2\x12\x4f\xc2\x44\xe5\xff\x75\x28\x2f\x65\x29\x47\x49\x29\xf7\x03\x7f\x20\x3c\xbd\xa8\x3e\x3c\xfd\xf3\xe7\x40\xe5\x25\x1c\x40\x30\x12\xfc\x45\xf6\x3f\x0a\xcf\x29\x08\x5e\x1f\x9d\x9d\xc0\x57\x44\x67\xf7\xee\x61\xf2\x15\xfd\xe4\xf2\x72\x20\x8a\x2d\x2f\xd3\x7d\xd3\x87\x51\x70\xdc\xf8\x63\x41\x30\xd4\x77\x2c\x08\xa6\x8c\x6e\xb5\xd1\xc5\x41\xcb\x03\xf6\x8f\xb5\xb4\x1e\x86\x51\x49\x42\xf2\x91\xd8\x61\x15\x6b\x7d\xc2\x54\x0e\xe7\xf0\x56\xe5\x13\x53\xa6\x82\xf3\x8e\x11\xd7\x5a\x4e\x73\x62\x10\x16\x41\x42\xeb\x67\xea\xd7\x06\x30\xdd\xd3\xf3\x1f\x60\x79\x68\xfc\x5a\x34\xe8\xf1\xc5\xb3\x73\x38\x7b\x40\xd4\xd6\xb4\x6f\xa5\x1b\x18\x36\x71\xea\x3f\xc1\xed\x13\x28\x57\x1f\x75\xdf\xb7\xd2\x4d\xdd\xf2\xcc\x61\xd2\x97\xc9\xe9\x5e\xc1\xd6\xdf\x02\x75\x04\x6c\x5b\xdc\xe3\x6e\x64\xd7\xba\x7c\xf2\xbd\x6f\xb7\x9d\x7f\xfa\xaf\x46\x77\x12\x1f\xb0\x3a\x70\x50\x71\xad\x44\x8d\xd5\x3e\xd7\xa1\xb1\x33\x42\x34\xf6\x48\x3d\x83\x82\x7e\xc7\x96\xc6\x3b\xf2\xdd\x56\x1b\x35\xdd\xa5\x92\x60\x01\x27\x14\x32\x79\x9d\x44\x86\x26\xdd\x9d\x50\x40\xa3\x17\x15\xfa\x99\x41\xdf\x25\x43\x5f\xf3\x3e\x5f\xf5\x8d\xd7\x20\x22\x4e\x24\x19\x39\x22\x43\x47\x49\x3c\x02\x78\x2d\x78\x89\xaf\xb5\xb6\xb7\x8d\x72\xdb\xac\xf4\x33\x32\x5f\x49\xac\x0d\xf9\xef\xa2\xeb\x94\x92\x4f\xa6\xa7\x76\x07\x1e\x4b\x1f\x2f\x8b\x73\xcf\xec\x7e\x6e\x82\xd5\xfe\x5d\x56\x71\xb7\x86\x73\x40\xc3\x5e\xb8\x7e\xc4\xce\xeb\xef\xb4\x91\xee\xca\xf7\x9b\x4e\xf0\x1c\x7e\x1b\x90\x92\x3a\x5f\xfa\xd6\x21\xb7\x0e\x9b\xbe\x13\x0d\x71\xdb\x48\xc6\xa1\x7d\x44\x07\xc4\xe8\x8f\x78\x99\x53\x73\x1b\x93\x86\x18\xfa\xcb\xb4\x23\x37\xc7\x64\x75\x86\x2b\xf6\x6e\xb2\x66\x47\x2f\x8e\xbb\x9e\xdc\x3f\x05\xbe\x90\x62\x7f\x05\x37\x60\x11\xa9\x88\x88\x20\x83\xc6\x95\x4e\xa9\x2e\x03\x0c\x3e\x4d\xf9\x26\xea\x45\xd7\x86\xd3\x0d\x7e\xf9\x15\x7f\x0d\xbe\x93\x18\x4b\xde\x6c\x36\x5e\xf2\x89\x66\xdf\xf1\xfa\x47\x53\x2a\xf1\xe4\xf7\xe3\xbb\x3c\x0a\x87\x89\xee\xad\xdf\x45\xe8\xf1\xe8\x9d\x5f\x16\xa5\xd4\xfe\x67\x3a\xf8\xf9\xeb\x1c\xa6\x7b\xce\x5f\x16\xbf\x0e\xee\x2c\xca\x7a\x2c\xf9\x05\xc5\xe3\xfb\x8d\x1e\xa6\x01\x60\xbb\x5d\x76\x0a\xef\xfa\x0f\x6a\xf4\xf9\x32\x7c\xd2\x30\x0f\xd2\x5a\xba\x49\x57\x7b\x37\x3b\xfd\x77\x36\xf0\x5f\xde\xda\x26\x3b\xdc\xe7\x84\x9b\xce\xbd\xcf\xce\x53\x5f\xe9\x46\xd7\x0e\xff\x09\x00\x00\xff\xff\x18\xa1\x9a\xae\x6d\x1f\x00\x00") +var _templateClientTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x59\x5f\x73\xe3\xb6\x11\x7f\x16\x3f\xc5\x96\xe3\xbb\x92\x1e\x19\x4c\xf3\x56\x75\xfc\x70\xb1\xaf\x89\x66\x12\x3b\xe9\x39\x6d\x67\x32\x99\x1c\x0c\x82\x12\x62\x0a\xa0\x41\xd0\x96\x47\xf5\x77\xef\xec\x02\xfc\x27\xd1\x3a\x27\x97\x4e\x5f\x6c\x11\x20\x76\x17\xbf\xfd\xed\x62\x17\xdc\xed\xb2\xd3\xe8\xc2\x54\x4f\x56\xad\xd6\x0e\xbe\xfc\xe2\x2f\x7f\x3d\xab\xac\xac\xa5\x76\xf0\x77\x2e\xe4\xad\x31\x77\xb0\xd4\x82\xc1\xbb\xb2\x04\x7a\xa9\x06\x9c\xb7\x0f\x32\x67\xd1\xcd\x5a\xd5\x50\x9b\xc6\x0a\x09\xc2\xe4\x12\x54\x0d\xa5\x12\x52\xd7\x32\x87\x46\xe7\xd2\x82\x5b\x4b\x78\x57\x71\xb1\x96\xf0\x25\xfb\xa2\x9d\x85\xc2\x34\x3a\x8f\x94\xa6\xf9\x6f\x97\x17\xef\xaf\x3e\xbc\x87\x42\x95\x12\xc2\x98\x35\xc6\x41\xae\xac\x14\xce\xd8\x27\x30\x05\xb8\x81\x32\x67\xa5\x64\xd1\x69\xf6\xfc\x1c\x45\xbb\x1d\xe4\xb2\x50\x5a\x42\x2c\x4a\x25\xb5\x8b\x21\x0c\x9f\x54\x77\x2b\x58\x9c\xc3\x2d\xaf\x25\x9c\xb0\x0b\xa3\x0b\xb5\x62\xdf\x73\x71\xc7\x57\x12\x5f\xda\xed\xc0\xc9\x4d\x55\x72\x27\x21\x5e\x4b\x9e\x4b\x1b\xc3\x09\x2d\x57\x9b\xca\x58\x07\x49\x34\x8b\x4b\xb3\x8a\xa3\x68\x16\xa3\xc4\x43\x21\xd9\x46\xad\x2c\x77\x32\x8e\x66\xbb\x1d\x58\xae\x57\x12\x4e\x7e\x99\xc3\x89\x46\xd5\x27\xec\xca\xe4\xb2\x46\x91\x33\x2f\x41\x4f\x88\xf0\xe3\xfd\x00\xc9\x3a\x03\xa9\x73\xb2\x65\x16\xaf\x94\x5b\x37\xb7\x4c\x98\x4d\x56\x04\xb7\x64\x52\xbb\x2c\x57\xbc\x94\xc2\x1d\xe8\x0e\xd6\x93\x01\x1f\x9c\xb1\x7c\x25\xd9\x92\xc6\x6a\x38\xeb\x6d\x09\xaf\x05\x85\xa4\x0f\x67\xd3\x28\xca\x32\xb8\x20\x30\xd1\xa5\xe8\x0f\x0f\x2d\xb8\x35\x77\xb0\x36\x65\x5e\x03\x2f\x4b\xc0\xa1\xdb\x46\x95\xb9\xb4\x35\x8b\xdc\x53\x25\xdb\x65\xb5\xb3\x8d\x70\xb0\x8b\x66\x82\xb6\xeb\x77\xa4\x0a\x34\xa8\xa9\x50\xed\x77\x1e\x37\x0f\x4d\x96\xc1\x07\xb1\x96\x1b\xbe\xa7\xaf\x30\x16\x84\x95\xdc\x29\xbd\x9a\x83\x87\x5a\xe9\x15\x70\x9d\x43\x6e\x4d\x55\xe1\x43\x4d\x2b\x59\x34\x9b\x05\x19\xa7\xc1\x27\xcc\x3f\x8f\xd0\xa4\xdf\x01\xaa\x43\x17\x65\x19\x78\x67\x5c\xf1\x0d\x9a\x36\x61\x8e\xd2\x4e\x5a\x2e\xc8\x8c\x47\xe5\xd6\x34\x3f\x5e\xd4\x43\x32\x9b\x8d\x67\x4e\x47\x8f\x1e\xab\x7d\xf3\x06\x9c\xf4\x6a\xb3\x42\xc9\x32\xaf\x33\x9e\xe7\xca\x29\xa3\x79\x19\x58\xfa\x4c\x8e\xba\x92\x8f\x01\x74\x42\x4a\xd6\xc0\x41\xcb\xc7\xd6\x66\x8f\x7f\x63\x65\xde\x9b\xbb\x52\x0f\x52\x83\xa9\x50\x5a\xcd\xa2\xa2\xd1\xa2\x17\x93\x98\xca\xd5\xc0\x18\xbb\xa6\xf9\x14\x4e\x83\x78\x74\x66\x41\x11\xe5\x65\xee\x4a\xb3\x5a\x40\x69\x56\xec\x7b\xab\xb4\x2b\xf5\x1c\xd6\xc6\xdc\xd5\x0b\x78\x4b\xff\x77\xb8\x1f\x51\xac\x58\x50\x44\x82\x19\x63\x69\x34\x0b\xb6\x2d\xce\xe1\xad\x17\xbe\xf3\x22\x17\x20\x8a\xd5\x73\x3b\xcf\x94\x56\x2e\x49\xa3\x99\x95\xae\xb1\x3a\xec\x08\xb7\x4d\x16\x27\xa2\x35\x2d\x05\xff\x26\x9a\x78\x94\x67\x22\x50\x02\xce\xa1\xe5\xc8\x95\x7c\xf4\x63\x89\x60\xb9\x55\x0f\xd2\xa6\xaf\x26\x0c\x00\xc0\x4c\xb0\xb1\x8f\xcf\x01\xb1\x9c\x70\x74\x22\x98\xdf\xe5\x58\x81\xf7\xe2\x75\x45\x1e\x91\x1a\xdd\x97\x73\xc7\x31\x6b\x65\xf5\x7d\xc9\x2e\xbf\x82\xba\x92\x42\x15\x4a\xe6\x70\xfb\x44\x0e\xf4\x86\x82\x46\xf1\x5c\xe7\x28\x80\x86\xb9\xe3\x6d\x8e\xc4\xb9\x39\x05\x8a\x47\x6f\x8f\x16\xdc\x39\xcc\xca\x39\x38\x03\xca\x31\x6f\x82\x67\x17\x54\xdc\xf2\x8d\x74\xd2\xd6\x20\xb8\x86\x5b\x09\x3c\xcf\x65\xee\xa3\x31\xd0\x09\xe9\xdf\x47\x46\xe0\x10\x6e\x22\xf1\xb6\x5d\x91\x7a\x34\xe8\x03\xd9\x43\x48\xd4\xce\x52\x20\x07\x42\x0c\x49\x96\x04\x57\xce\x41\x5a\x6b\x2c\xb9\xb2\x7e\x54\x4e\xac\xa1\x17\x48\x14\xc4\x6c\xbe\xdb\xc1\xaf\x46\xe9\x41\x7a\xbb\xf4\xa9\xb0\x86\x78\x0e\x78\x02\x2c\x28\xf6\xce\xe0\xc4\x6d\xaa\x12\xdd\x56\x21\x47\x0b\x88\x43\xce\xcc\xde\xd4\x59\x08\x2f\x44\x3d\xee\x45\x85\x0c\x89\x8b\xb7\x5d\x28\x7a\x31\xcc\xcf\xe5\xb2\xe0\x4d\xe9\x50\x45\x60\xa6\x56\xe5\x1c\x8a\x8d\x63\xef\xd1\xf8\x22\x89\x1b\x5d\x7b\xfa\xc9\x3c\xd8\xbf\x80\x37\xf7\xf1\x7c\xb0\x99\x34\x9a\xb5\xce\xbf\xd9\xee\x39\xc9\x59\xae\x6b\x4c\x32\xe4\x8f\x80\x31\xdc\xac\x25\x54\xd6\x3c\x28\x74\x86\x30\xda\xc9\xad\xc3\xe5\xaa\x86\xc6\x1f\xb9\x4e\x95\xe4\x95\xc1\x7a\x9c\x15\x66\xb3\x51\x0e\x6d\x31\x16\xac\x29\x4b\x64\x12\x17\x77\xec\x30\x90\x6e\xb6\x89\x70\xdb\x56\x3a\x1e\x56\xf8\x1f\xfd\x73\xb3\x1d\xfa\x46\x15\xf0\xcb\x1c\xcc\x1d\xa5\x83\x10\x38\x2c\x39\x75\xdb\x4b\x1f\x43\x7f\xc3\xb9\xdd\x11\x84\xda\x03\xfa\xf9\x79\x81\x2c\xd3\x06\x0f\x0d\x6e\x1d\xf0\x91\xf5\x98\xb3\x94\x1e\x0f\xc6\x04\xdd\xcc\x79\x83\xd0\x02\x2d\x1f\xbd\xe1\x73\x18\x44\xb1\x2a\x68\xfe\x4f\xe7\xa8\xfd\xd5\xc6\x90\x15\x74\xc8\x0c\x75\x2e\xe0\xcd\x43\x4c\xfa\xbc\xf2\x71\x26\x6c\x5d\x8c\x06\x50\x56\x14\xac\x34\xab\x39\xe4\xf2\xb6\xa1\x27\xfa\xd1\xe5\x47\xc1\xe8\xc7\x73\x97\xd9\xde\xde\x6c\xd1\x3c\xe1\xb6\x0b\xc0\x5d\xe0\xef\x3e\x21\xce\xfd\x39\xf2\x52\x71\xe1\xf9\x3a\x3e\x69\x16\x2f\xe6\xa0\x62\x95\x06\x79\xed\x79\x3f\x7b\x9e\x23\x22\x11\x55\x4d\x67\x90\x9d\xc2\xb2\x20\x16\xd5\x21\x20\x42\xb6\x09\x8c\xae\xe1\x66\x7b\x1d\x02\x38\x29\xd5\x9d\x84\x0f\x3f\x7c\x9b\x02\x55\x63\x7d\xc4\x4d\x06\x9c\xdb\x86\xc8\x1f\x86\x5b\x58\xa6\x0a\x58\xf3\xfa\x66\x1c\x70\x21\xc7\x4e\xc7\x62\x58\xd8\x96\x49\x59\x06\x97\x88\xf2\x5e\x28\x11\xf2\x67\x6d\x08\x2d\xdd\x9f\x43\xb0\x38\x03\x2b\xe9\xe0\x41\xda\x5b\x53\x4b\xf4\xda\x0a\x9d\x6e\x74\x9b\x6d\x05\xa6\x63\xac\x37\xe8\x8c\xcc\xb2\x28\xcb\xda\x73\x89\xf4\x24\x29\x8e\x12\x92\x89\xd2\xb9\xdc\x76\x0e\xf9\x22\x6d\x41\xf7\x6f\xfc\xd0\x48\xfb\xd4\xbe\x7e\x61\x1a\x74\x83\xdb\xa6\x28\xf3\x20\xfe\x82\xe8\xe1\xa1\xab\x8a\x96\x40\x43\x0e\x8b\x23\x34\x0c\x90\x07\x3b\xdb\x88\x98\x7b\x56\xa6\x93\x14\x75\xb6\x91\x13\xfc\xfc\xdc\x83\x9a\x0a\x49\xc4\x57\xe0\xdf\xba\x3b\xa5\xa8\x26\x17\x46\x6b\xe9\xc3\x1c\xcf\xa9\xca\xca\x07\xa9\x5d\x4d\x6e\xbb\x6f\xa4\x55\xb2\x86\xc2\x9a\x4d\x17\x92\x13\xf9\x8a\xa4\x27\xa9\xcf\x4c\x88\x4f\x6b\x42\x9b\x93\xc2\x0b\xc1\x98\x1f\x6b\x3a\xcc\xbc\x21\x9b\xc6\x91\x7b\xfd\xb6\x91\x11\x58\xd4\xe2\x8c\xd4\x4e\xb9\xa7\xb0\x0f\xf2\x3e\x2c\x35\x18\x4b\x2d\x8d\x41\x09\x83\x35\x3d\x61\x44\x38\xc2\x04\x2f\xcb\x05\x7c\x0c\xe0\x20\x29\xd8\x8f\xb5\x4c\xb0\xf6\xf9\x38\xb1\x07\x9c\xf3\xe2\x18\x63\xdf\x18\x73\xd7\x15\x32\x47\xfb\x89\xbd\xc2\x83\x75\x62\x7c\x8d\x35\x2e\x31\xa2\xe3\xdd\x09\x4a\xea\x7d\x4d\xa1\xdb\x89\x8e\x2f\xfa\xbe\x2a\x14\xc8\xe1\x55\x5f\x20\xf3\x61\x79\x7c\x58\x0d\xb7\xe5\x39\xb5\x07\xe3\xc5\x07\x5d\x42\x68\xdc\xac\x14\x64\x9f\x66\xff\x90\x42\x52\xf2\x79\x7e\xde\xed\x30\x47\xc8\x7b\x3f\x1d\x8b\xd8\x8f\xd1\x53\x9f\x6d\xde\xb0\x2f\x31\xbb\x04\xf5\xff\x81\xd2\x3c\xb6\xab\x07\x89\x22\x24\xc7\xde\x92\x3e\x67\x1c\xdd\x0b\xb1\xb1\xaf\xa0\xbd\xd5\x7d\x01\x3d\x92\x99\x88\x30\x9f\xfa\xb2\xbf\x57\xd6\xb3\xf4\xed\x68\xa2\x8f\xad\xe7\x7d\xba\x72\x28\x55\xed\xb0\x0f\x3e\x24\x2d\xda\xe3\x1f\x6a\x47\x87\x7a\x96\xc1\x3b\xe2\x20\xce\x7e\x44\x5a\x14\x73\xc0\xd3\x27\xfd\x08\xf2\xbe\xe1\x25\x2d\xfb\xb8\xdf\x76\x12\xf5\xea\xa4\x48\x56\xc9\x3a\x49\xd3\x74\xc4\xd5\x91\xa1\x2f\x51\x36\xe4\x8d\x83\x82\x98\x57\x95\xd4\x79\x32\x39\x1d\x92\x0e\x71\x36\x24\x0c\x6a\x63\x86\x2e\xf1\x03\xa1\xad\x22\xd7\x8c\x99\xff\xa2\x99\x5e\x54\x92\xb6\x8d\x97\x7f\x6e\x0d\xdb\x45\xb3\x0e\x4d\x5f\x44\xf8\xb7\xbe\x0b\x83\xe1\xbd\xae\x6e\x9f\xc3\x75\xe5\x25\xa4\x63\x0f\xee\x09\xee\xfd\xd8\x2d\xec\x12\xab\xc7\x38\x9d\x77\x7e\x5c\x74\xbf\x5a\xa7\x7f\xd5\x94\x77\x07\x18\x0c\x37\xdf\x76\xc4\x34\x5c\xde\x21\x2b\xc6\x88\x53\xfa\x52\xb2\xfe\x14\x30\xa8\x29\x69\xbb\x55\xf4\xe4\x14\x4c\x7b\xe0\xe1\x9a\x01\x80\x53\x30\x0c\x5e\x99\x80\xa2\xd5\xb7\xe8\x7e\x75\x6c\xaf\xf2\xd1\xa6\x35\x34\x7e\xe4\x77\x78\xde\xcb\xea\x3d\xef\x9f\x3f\xc7\xf3\x5e\xc2\x81\xe7\x47\x82\x3f\xd3\xf3\x5e\xd6\xb5\xfe\x14\x06\x7d\x06\xf2\x07\xd5\xa7\x60\xb8\xd6\x32\x69\x53\xe5\xc1\x2d\xc4\x1e\x44\xd7\xfa\x0f\x40\xe9\x5a\xcb\x39\x7a\xca\x1f\x24\x31\x16\xf1\xf1\x40\xe5\xc0\x98\xf4\x05\x40\x7b\x33\xfe\x28\x4c\x97\x97\xaf\x46\x55\xe5\xaf\x40\x74\x79\x99\xa8\x3c\xd0\x71\x79\xc9\x6e\xf0\x78\xfb\x3f\xa0\x19\x2f\x2f\xf1\x24\x4c\x54\xfe\x3f\x87\xf2\x52\x96\x72\x94\x94\x72\x3f\xf0\x3b\xc2\xd3\x8b\xea\xc3\xd3\x3f\x7f\x0e\x54\x5e\xc2\x01\x04\x23\xc1\x7f\xc8\xfe\x47\xe1\x39\x05\xc1\xeb\xa3\xb3\x13\xf8\x8a\xe8\xec\xde\x3d\x4c\xbe\xa2\x9f\x5c\x5e\x0e\x44\xb1\xe5\x65\xba\x6f\xfa\x30\x0a\x8e\x1b\x7f\x2c\x08\x86\xfa\x8e\x05\xc1\x94\xd1\xad\x36\xba\x38\x68\x79\xc0\xfe\xb5\x96\xd6\xc3\x30\x2a\x49\x48\x3e\x12\x3b\xac\x62\xad\x4f\x98\xca\xe1\x1c\xde\xaa\x7c\x62\xca\x54\x70\xde\x31\xe2\x5a\xcb\x69\x4e\x0c\xc2\x22\x48\x68\xfd\x4c\xfd\xda\x00\xa6\x7b\x7a\xfe\x1d\x2c\x0f\x8d\x5f\x8b\x06\x3d\xbe\x78\x76\x0e\x67\x0f\x88\xda\x9a\xf6\xb5\x74\x03\xc3\x26\x4e\xfd\x27\xb8\x7d\x02\xe5\xea\xa3\xee\xfb\x5a\xba\xa9\x5b\x9e\x39\x4c\xfa\x32\x39\xdd\x2b\xd8\xfa\x5b\xa0\x8e\x80\x6d\x8b\x7b\xdc\x8d\xec\x5a\x97\x4f\xbe\xf7\xed\xb6\xf3\x6f\xff\xd5\xe8\x4e\xe2\x03\x56\x07\x0e\x2a\xae\x95\xa8\xb1\xda\xe7\x3a\x34\x76\x46\x88\xc6\x1e\xa9\x67\x50\xd0\x6f\xd8\xd2\x78\x47\xb8\x13\x73\xfb\x6b\x77\x9b\x24\x58\x00\x08\x57\x4f\xde\x23\x91\x85\x49\x77\x19\x14\x60\x30\xb7\xbf\x86\x0e\x66\xd0\x69\xc9\xd0\xc9\xbc\xcf\x57\x7d\xab\x35\x88\x81\x13\x49\x66\x8d\xdc\xdf\x91\x10\x93\x3e\xaf\x05\x2f\xf1\xb5\xd6\xda\xb6\x35\x6e\xdb\x93\x7e\x46\xe6\x2b\x89\xd5\x20\xff\x4d\x04\x9d\x52\xf2\xc9\x84\xd4\xee\xc0\xa3\xe7\x23\x64\x71\xee\xb9\xdc\xcf\x4d\xf0\xd8\xbf\xcb\x2a\xee\xd6\x70\x0e\x68\xd8\x0b\x17\x8e\xd8\x6b\xfd\x93\x36\xd2\x5d\xf2\x7e\xd5\x09\x9e\xc3\x2f\x03\x1a\x52\xaf\x4b\x5f\x37\xe4\xd6\x61\x9b\x77\xa2\x21\x6e\x5b\xc7\x38\x34\x8c\xe8\x80\x18\xfd\x11\x2f\x73\x6a\x67\x63\xd2\x10\x43\x7f\x7d\x76\xe4\xae\x98\xac\xce\x70\xc5\xde\xdd\xd5\xec\xe8\x55\x71\xd7\x85\xfb\xa7\x40\x14\x52\xec\x2f\xdd\x06\xf4\x21\x15\x11\x11\x64\xd0\xaa\xd2\xb9\xd4\xc5\xfc\xe0\x63\x94\x6f\x9b\x5e\x74\x6d\x38\xcf\xe0\xa7\x9f\xf1\xd7\xe0\xcb\x88\xb1\xe4\xcd\x66\xe3\x25\x9f\x68\xf6\x0d\xaf\xbf\x37\xa5\x12\x4f\x7e\x3f\xbe\xaf\xa3\x38\x98\xe8\xd7\xfa\x5d\x84\xae\x8e\xde\xf9\x69\x51\x4a\xed\x7f\xa6\x83\x9f\x3f\xcf\x61\xba\xcb\xfc\x69\xf1\xf3\xe0\x96\xa2\xac\xc7\x92\x5f\x50\x3c\xbe\xd1\xe8\x61\x1a\x00\xb6\xdb\x65\xa7\xf0\xae\xff\x84\x46\x1f\x2c\xc3\x47\x0c\xf3\x20\xad\xa5\xbb\x73\xb5\x77\x97\xd3\x7f\x59\x03\xff\xad\xad\x6d\xab\xc3\x0d\x4e\xb8\xdb\xdc\xfb\xd0\x3c\xf5\x5d\x6e\x74\xd1\xf0\xdf\x00\x00\x00\xff\xff\x08\x95\xba\x14\x5f\x1f\x00\x00") func templateClientTmplBytes() ([]byte, error) { return bindataRead( @@ -281,7 +281,7 @@ func templateClientTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/client.tmpl", size: 8045, mode: os.FileMode(420), modTime: time.Unix(1, 0)} + info := bindataFileInfo{name: "template/client.tmpl", size: 8031, mode: os.FileMode(420), modTime: time.Unix(1, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/entc/gen/template/client.tmpl b/entc/gen/template/client.tmpl index b4d1c3929..b3faced0c 100644 --- a/entc/gen/template/client.tmpl +++ b/entc/gen/template/client.tmpl @@ -205,11 +205,11 @@ func (c *{{ $client }}) Get(ctx context.Context, id {{ $n.ID.Type }}) (*{{ $n.Na // GetX is like Get, but panics if an error occurs. func (c *{{ $client }}) GetX(ctx context.Context, id {{ $n.ID.Type }}) *{{ $n.Name }} { - {{ $rec }}, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return {{ $rec }} + return obj } {{ range $_, $e := $n.Edges }} diff --git a/entc/integration/config/ent/client.go b/entc/integration/config/ent/client.go index 4fe50ea27..7d1053b51 100644 --- a/entc/integration/config/ent/client.go +++ b/entc/integration/config/ent/client.go @@ -196,11 +196,11 @@ func (c *UserClient) Get(ctx context.Context, id int) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id int) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // Hooks returns the client hooks. diff --git a/entc/integration/customid/ent/client.go b/entc/integration/customid/ent/client.go index 09aac1ac8..2a10c93cb 100644 --- a/entc/integration/customid/ent/client.go +++ b/entc/integration/customid/ent/client.go @@ -226,11 +226,11 @@ func (c *BlobClient) Get(ctx context.Context, id uuid.UUID) (*Blob, error) { // GetX is like Get, but panics if an error occurs. func (c *BlobClient) GetX(ctx context.Context, id uuid.UUID) *Blob { - b, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return b + return obj } // QueryParent queries the parent edge of a Blob. @@ -346,11 +346,11 @@ func (c *CarClient) Get(ctx context.Context, id int) (*Car, error) { // GetX is like Get, but panics if an error occurs. func (c *CarClient) GetX(ctx context.Context, id int) *Car { - ca, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return ca + return obj } // QueryOwner queries the owner edge of a Car. @@ -450,11 +450,11 @@ func (c *GroupClient) Get(ctx context.Context, id int) (*Group, error) { // GetX is like Get, but panics if an error occurs. func (c *GroupClient) GetX(ctx context.Context, id int) *Group { - gr, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return gr + return obj } // QueryUsers queries the users edge of a Group. @@ -554,11 +554,11 @@ func (c *PetClient) Get(ctx context.Context, id string) (*Pet, error) { // GetX is like Get, but panics if an error occurs. func (c *PetClient) GetX(ctx context.Context, id string) *Pet { - pe, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return pe + return obj } // QueryOwner queries the owner edge of a Pet. @@ -706,11 +706,11 @@ func (c *UserClient) Get(ctx context.Context, id int) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id int) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // QueryGroups queries the groups edge of a User. diff --git a/entc/integration/ent/client.go b/entc/integration/ent/client.go index 824f59e36..a6240ac20 100644 --- a/entc/integration/ent/client.go +++ b/entc/integration/ent/client.go @@ -281,11 +281,11 @@ func (c *CardClient) Get(ctx context.Context, id int) (*Card, error) { // GetX is like Get, but panics if an error occurs. func (c *CardClient) GetX(ctx context.Context, id int) *Card { - ca, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return ca + return obj } // QueryOwner queries the owner edge of a Card. @@ -401,11 +401,11 @@ func (c *CommentClient) Get(ctx context.Context, id int) (*Comment, error) { // GetX is like Get, but panics if an error occurs. func (c *CommentClient) GetX(ctx context.Context, id int) *Comment { - co, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return co + return obj } // Hooks returns the client hooks. @@ -489,11 +489,11 @@ func (c *FieldTypeClient) Get(ctx context.Context, id int) (*FieldType, error) { // GetX is like Get, but panics if an error occurs. func (c *FieldTypeClient) GetX(ctx context.Context, id int) *FieldType { - ft, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return ft + return obj } // Hooks returns the client hooks. @@ -577,11 +577,11 @@ func (c *FileClient) Get(ctx context.Context, id int) (*File, error) { // GetX is like Get, but panics if an error occurs. func (c *FileClient) GetX(ctx context.Context, id int) *File { - f, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return f + return obj } // QueryOwner queries the owner edge of a File. @@ -713,11 +713,11 @@ func (c *FileTypeClient) Get(ctx context.Context, id int) (*FileType, error) { // GetX is like Get, but panics if an error occurs. func (c *FileTypeClient) GetX(ctx context.Context, id int) *FileType { - ft, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return ft + return obj } // QueryFiles queries the files edge of a FileType. @@ -817,11 +817,11 @@ func (c *GroupClient) Get(ctx context.Context, id int) (*Group, error) { // GetX is like Get, but panics if an error occurs. func (c *GroupClient) GetX(ctx context.Context, id int) *Group { - gr, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return gr + return obj } // QueryFiles queries the files edge of a Group. @@ -969,11 +969,11 @@ func (c *GroupInfoClient) Get(ctx context.Context, id int) (*GroupInfo, error) { // GetX is like Get, but panics if an error occurs. func (c *GroupInfoClient) GetX(ctx context.Context, id int) *GroupInfo { - gi, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return gi + return obj } // QueryGroups queries the groups edge of a GroupInfo. @@ -1073,11 +1073,11 @@ func (c *ItemClient) Get(ctx context.Context, id int) (*Item, error) { // GetX is like Get, but panics if an error occurs. func (c *ItemClient) GetX(ctx context.Context, id int) *Item { - i, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return i + return obj } // Hooks returns the client hooks. @@ -1161,11 +1161,11 @@ func (c *NodeClient) Get(ctx context.Context, id int) (*Node, error) { // GetX is like Get, but panics if an error occurs. func (c *NodeClient) GetX(ctx context.Context, id int) *Node { - n, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return n + return obj } // QueryPrev queries the prev edge of a Node. @@ -1281,11 +1281,11 @@ func (c *PetClient) Get(ctx context.Context, id int) (*Pet, error) { // GetX is like Get, but panics if an error occurs. func (c *PetClient) GetX(ctx context.Context, id int) *Pet { - pe, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return pe + return obj } // QueryTeam queries the team edge of a Pet. @@ -1401,11 +1401,11 @@ func (c *SpecClient) Get(ctx context.Context, id int) (*Spec, error) { // GetX is like Get, but panics if an error occurs. func (c *SpecClient) GetX(ctx context.Context, id int) *Spec { - s, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return s + return obj } // QueryCard queries the card edge of a Spec. @@ -1505,11 +1505,11 @@ func (c *TaskClient) Get(ctx context.Context, id int) (*Task, error) { // GetX is like Get, but panics if an error occurs. func (c *TaskClient) GetX(ctx context.Context, id int) *Task { - t, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return t + return obj } // Hooks returns the client hooks. @@ -1593,11 +1593,11 @@ func (c *UserClient) Get(ctx context.Context, id int) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id int) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // QueryCard queries the card edge of a User. diff --git a/entc/integration/gremlin/ent/client.go b/entc/integration/gremlin/ent/client.go index 081a7414b..fd0354cb7 100644 --- a/entc/integration/gremlin/ent/client.go +++ b/entc/integration/gremlin/ent/client.go @@ -259,11 +259,11 @@ func (c *CardClient) Get(ctx context.Context, id string) (*Card, error) { // GetX is like Get, but panics if an error occurs. func (c *CardClient) GetX(ctx context.Context, id string) *Card { - ca, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return ca + return obj } // QueryOwner queries the owner edge of a Card. @@ -369,11 +369,11 @@ func (c *CommentClient) Get(ctx context.Context, id string) (*Comment, error) { // GetX is like Get, but panics if an error occurs. func (c *CommentClient) GetX(ctx context.Context, id string) *Comment { - co, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return co + return obj } // Hooks returns the client hooks. @@ -457,11 +457,11 @@ func (c *FieldTypeClient) Get(ctx context.Context, id string) (*FieldType, error // GetX is like Get, but panics if an error occurs. func (c *FieldTypeClient) GetX(ctx context.Context, id string) *FieldType { - ft, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return ft + return obj } // Hooks returns the client hooks. @@ -545,11 +545,11 @@ func (c *FileClient) Get(ctx context.Context, id string) (*File, error) { // GetX is like Get, but panics if an error occurs. func (c *FileClient) GetX(ctx context.Context, id string) *File { - f, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return f + return obj } // QueryOwner queries the owner edge of a File. @@ -666,11 +666,11 @@ func (c *FileTypeClient) Get(ctx context.Context, id string) (*FileType, error) // GetX is like Get, but panics if an error occurs. func (c *FileTypeClient) GetX(ctx context.Context, id string) *FileType { - ft, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return ft + return obj } // QueryFiles queries the files edge of a FileType. @@ -765,11 +765,11 @@ func (c *GroupClient) Get(ctx context.Context, id string) (*Group, error) { // GetX is like Get, but panics if an error occurs. func (c *GroupClient) GetX(ctx context.Context, id string) *Group { - gr, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return gr + return obj } // QueryFiles queries the files edge of a Group. @@ -897,11 +897,11 @@ func (c *GroupInfoClient) Get(ctx context.Context, id string) (*GroupInfo, error // GetX is like Get, but panics if an error occurs. func (c *GroupInfoClient) GetX(ctx context.Context, id string) *GroupInfo { - gi, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return gi + return obj } // QueryGroups queries the groups edge of a GroupInfo. @@ -996,11 +996,11 @@ func (c *ItemClient) Get(ctx context.Context, id string) (*Item, error) { // GetX is like Get, but panics if an error occurs. func (c *ItemClient) GetX(ctx context.Context, id string) *Item { - i, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return i + return obj } // Hooks returns the client hooks. @@ -1084,11 +1084,11 @@ func (c *NodeClient) Get(ctx context.Context, id string) (*Node, error) { // GetX is like Get, but panics if an error occurs. func (c *NodeClient) GetX(ctx context.Context, id string) *Node { - n, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return n + return obj } // QueryPrev queries the prev edge of a Node. @@ -1194,11 +1194,11 @@ func (c *PetClient) Get(ctx context.Context, id string) (*Pet, error) { // GetX is like Get, but panics if an error occurs. func (c *PetClient) GetX(ctx context.Context, id string) *Pet { - pe, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return pe + return obj } // QueryTeam queries the team edge of a Pet. @@ -1304,11 +1304,11 @@ func (c *SpecClient) Get(ctx context.Context, id string) (*Spec, error) { // GetX is like Get, but panics if an error occurs. func (c *SpecClient) GetX(ctx context.Context, id string) *Spec { - s, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return s + return obj } // QueryCard queries the card edge of a Spec. @@ -1403,11 +1403,11 @@ func (c *TaskClient) Get(ctx context.Context, id string) (*Task, error) { // GetX is like Get, but panics if an error occurs. func (c *TaskClient) GetX(ctx context.Context, id string) *Task { - t, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return t + return obj } // Hooks returns the client hooks. @@ -1491,11 +1491,11 @@ func (c *UserClient) Get(ctx context.Context, id string) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id string) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // QueryCard queries the card edge of a User. diff --git a/entc/integration/hooks/ent/client.go b/entc/integration/hooks/ent/client.go index e2f468148..fea36ae79 100644 --- a/entc/integration/hooks/ent/client.go +++ b/entc/integration/hooks/ent/client.go @@ -204,11 +204,11 @@ func (c *CardClient) Get(ctx context.Context, id int) (*Card, error) { // GetX is like Get, but panics if an error occurs. func (c *CardClient) GetX(ctx context.Context, id int) *Card { - ca, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return ca + return obj } // QueryOwner queries the owner edge of a Card. @@ -309,11 +309,11 @@ func (c *UserClient) Get(ctx context.Context, id int) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id int) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // QueryCards queries the cards edge of a User. diff --git a/entc/integration/idtype/ent/client.go b/entc/integration/idtype/ent/client.go index 8552f2790..682b59ece 100644 --- a/entc/integration/idtype/ent/client.go +++ b/entc/integration/idtype/ent/client.go @@ -197,11 +197,11 @@ func (c *UserClient) Get(ctx context.Context, id uint64) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id uint64) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // QuerySpouse queries the spouse edge of a User. diff --git a/entc/integration/json/ent/client.go b/entc/integration/json/ent/client.go index 181bf293f..da5a5949f 100644 --- a/entc/integration/json/ent/client.go +++ b/entc/integration/json/ent/client.go @@ -196,11 +196,11 @@ func (c *UserClient) Get(ctx context.Context, id int) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id int) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // Hooks returns the client hooks. diff --git a/entc/integration/migrate/entv1/client.go b/entc/integration/migrate/entv1/client.go index 149edd849..ccfbea67a 100644 --- a/entc/integration/migrate/entv1/client.go +++ b/entc/integration/migrate/entv1/client.go @@ -204,11 +204,11 @@ func (c *CarClient) Get(ctx context.Context, id int) (*Car, error) { // GetX is like Get, but panics if an error occurs. func (c *CarClient) GetX(ctx context.Context, id int) *Car { - ca, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return ca + return obj } // QueryOwner queries the owner edge of a Car. @@ -308,11 +308,11 @@ func (c *UserClient) Get(ctx context.Context, id int) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id int) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // QueryParent queries the parent edge of a User. diff --git a/entc/integration/migrate/entv2/client.go b/entc/integration/migrate/entv2/client.go index de0ae41c1..55974fca8 100644 --- a/entc/integration/migrate/entv2/client.go +++ b/entc/integration/migrate/entv2/client.go @@ -218,11 +218,11 @@ func (c *CarClient) Get(ctx context.Context, id int) (*Car, error) { // GetX is like Get, but panics if an error occurs. func (c *CarClient) GetX(ctx context.Context, id int) *Car { - ca, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return ca + return obj } // QueryOwner queries the owner edge of a Car. @@ -322,11 +322,11 @@ func (c *GroupClient) Get(ctx context.Context, id int) (*Group, error) { // GetX is like Get, but panics if an error occurs. func (c *GroupClient) GetX(ctx context.Context, id int) *Group { - gr, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return gr + return obj } // Hooks returns the client hooks. @@ -410,11 +410,11 @@ func (c *PetClient) Get(ctx context.Context, id int) (*Pet, error) { // GetX is like Get, but panics if an error occurs. func (c *PetClient) GetX(ctx context.Context, id int) *Pet { - pe, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return pe + return obj } // QueryOwner queries the owner edge of a Pet. @@ -514,11 +514,11 @@ func (c *UserClient) Get(ctx context.Context, id int) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id int) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // QueryCar queries the car edge of a User. diff --git a/entc/integration/privacy/ent/client.go b/entc/integration/privacy/ent/client.go index 2424390ec..c9fef888e 100644 --- a/entc/integration/privacy/ent/client.go +++ b/entc/integration/privacy/ent/client.go @@ -204,11 +204,11 @@ func (c *GalaxyClient) Get(ctx context.Context, id int) (*Galaxy, error) { // GetX is like Get, but panics if an error occurs. func (c *GalaxyClient) GetX(ctx context.Context, id int) *Galaxy { - ga, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return ga + return obj } // QueryPlanets queries the planets edge of a Galaxy. @@ -309,11 +309,11 @@ func (c *PlanetClient) Get(ctx context.Context, id int) (*Planet, error) { // GetX is like Get, but panics if an error occurs. func (c *PlanetClient) GetX(ctx context.Context, id int) *Planet { - pl, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return pl + return obj } // QueryNeighbors queries the neighbors edge of a Planet. diff --git a/entc/integration/template/ent/client.go b/entc/integration/template/ent/client.go index dc70274e1..1c322b246 100644 --- a/entc/integration/template/ent/client.go +++ b/entc/integration/template/ent/client.go @@ -214,11 +214,11 @@ func (c *GroupClient) Get(ctx context.Context, id int) (*Group, error) { // GetX is like Get, but panics if an error occurs. func (c *GroupClient) GetX(ctx context.Context, id int) *Group { - gr, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return gr + return obj } // Hooks returns the client hooks. @@ -302,11 +302,11 @@ func (c *PetClient) Get(ctx context.Context, id int) (*Pet, error) { // GetX is like Get, but panics if an error occurs. func (c *PetClient) GetX(ctx context.Context, id int) *Pet { - pe, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return pe + return obj } // QueryOwner queries the owner edge of a Pet. @@ -406,11 +406,11 @@ func (c *UserClient) Get(ctx context.Context, id int) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id int) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // QueryPets queries the pets edge of a User. diff --git a/examples/edgeindex/ent/client.go b/examples/edgeindex/ent/client.go index 5f9bbaab4..6d1c068fd 100644 --- a/examples/edgeindex/ent/client.go +++ b/examples/edgeindex/ent/client.go @@ -204,11 +204,11 @@ func (c *CityClient) Get(ctx context.Context, id int) (*City, error) { // GetX is like Get, but panics if an error occurs. func (c *CityClient) GetX(ctx context.Context, id int) *City { - ci, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return ci + return obj } // QueryStreets queries the streets edge of a City. @@ -308,11 +308,11 @@ func (c *StreetClient) Get(ctx context.Context, id int) (*Street, error) { // GetX is like Get, but panics if an error occurs. func (c *StreetClient) GetX(ctx context.Context, id int) *Street { - s, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return s + return obj } // QueryCity queries the city edge of a Street. diff --git a/examples/entcpkg/ent/client.go b/examples/entcpkg/ent/client.go index 948f3f8c7..83cb48cb0 100644 --- a/examples/entcpkg/ent/client.go +++ b/examples/entcpkg/ent/client.go @@ -196,11 +196,11 @@ func (c *UserClient) Get(ctx context.Context, id int) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id int) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // Hooks returns the client hooks. diff --git a/examples/m2m2types/ent/client.go b/examples/m2m2types/ent/client.go index 110451f26..bc2859376 100644 --- a/examples/m2m2types/ent/client.go +++ b/examples/m2m2types/ent/client.go @@ -204,11 +204,11 @@ func (c *GroupClient) Get(ctx context.Context, id int) (*Group, error) { // GetX is like Get, but panics if an error occurs. func (c *GroupClient) GetX(ctx context.Context, id int) *Group { - gr, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return gr + return obj } // QueryUsers queries the users edge of a Group. @@ -308,11 +308,11 @@ func (c *UserClient) Get(ctx context.Context, id int) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id int) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // QueryGroups queries the groups edge of a User. diff --git a/examples/m2mbidi/ent/client.go b/examples/m2mbidi/ent/client.go index abcb50666..13f8a75ba 100644 --- a/examples/m2mbidi/ent/client.go +++ b/examples/m2mbidi/ent/client.go @@ -197,11 +197,11 @@ func (c *UserClient) Get(ctx context.Context, id int) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id int) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // QueryFriends queries the friends edge of a User. diff --git a/examples/m2mrecur/ent/client.go b/examples/m2mrecur/ent/client.go index fed785835..74c35b0d7 100644 --- a/examples/m2mrecur/ent/client.go +++ b/examples/m2mrecur/ent/client.go @@ -197,11 +197,11 @@ func (c *UserClient) Get(ctx context.Context, id int) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id int) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // QueryFollowers queries the followers edge of a User. diff --git a/examples/o2m2types/ent/client.go b/examples/o2m2types/ent/client.go index 3f25f0a18..abb0ce80a 100644 --- a/examples/o2m2types/ent/client.go +++ b/examples/o2m2types/ent/client.go @@ -204,11 +204,11 @@ func (c *PetClient) Get(ctx context.Context, id int) (*Pet, error) { // GetX is like Get, but panics if an error occurs. func (c *PetClient) GetX(ctx context.Context, id int) *Pet { - pe, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return pe + return obj } // QueryOwner queries the owner edge of a Pet. @@ -308,11 +308,11 @@ func (c *UserClient) Get(ctx context.Context, id int) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id int) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // QueryPets queries the pets edge of a User. diff --git a/examples/o2mrecur/ent/client.go b/examples/o2mrecur/ent/client.go index a37a2ee8a..393835caa 100644 --- a/examples/o2mrecur/ent/client.go +++ b/examples/o2mrecur/ent/client.go @@ -197,11 +197,11 @@ func (c *NodeClient) Get(ctx context.Context, id int) (*Node, error) { // GetX is like Get, but panics if an error occurs. func (c *NodeClient) GetX(ctx context.Context, id int) *Node { - n, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return n + return obj } // QueryParent queries the parent edge of a Node. diff --git a/examples/o2o2types/ent/client.go b/examples/o2o2types/ent/client.go index 3ff6073a7..aad2f440d 100644 --- a/examples/o2o2types/ent/client.go +++ b/examples/o2o2types/ent/client.go @@ -204,11 +204,11 @@ func (c *CardClient) Get(ctx context.Context, id int) (*Card, error) { // GetX is like Get, but panics if an error occurs. func (c *CardClient) GetX(ctx context.Context, id int) *Card { - ca, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return ca + return obj } // QueryOwner queries the owner edge of a Card. @@ -308,11 +308,11 @@ func (c *UserClient) Get(ctx context.Context, id int) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id int) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // QueryCard queries the card edge of a User. diff --git a/examples/o2obidi/ent/client.go b/examples/o2obidi/ent/client.go index 3043bed1d..dcf950b00 100644 --- a/examples/o2obidi/ent/client.go +++ b/examples/o2obidi/ent/client.go @@ -197,11 +197,11 @@ func (c *UserClient) Get(ctx context.Context, id int) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id int) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // QuerySpouse queries the spouse edge of a User. diff --git a/examples/o2orecur/ent/client.go b/examples/o2orecur/ent/client.go index 12404cc47..aa86536c3 100644 --- a/examples/o2orecur/ent/client.go +++ b/examples/o2orecur/ent/client.go @@ -197,11 +197,11 @@ func (c *NodeClient) Get(ctx context.Context, id int) (*Node, error) { // GetX is like Get, but panics if an error occurs. func (c *NodeClient) GetX(ctx context.Context, id int) *Node { - n, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return n + return obj } // QueryPrev queries the prev edge of a Node. diff --git a/examples/start/ent/client.go b/examples/start/ent/client.go index c28411002..9aaf417a3 100644 --- a/examples/start/ent/client.go +++ b/examples/start/ent/client.go @@ -211,11 +211,11 @@ func (c *CarClient) Get(ctx context.Context, id int) (*Car, error) { // GetX is like Get, but panics if an error occurs. func (c *CarClient) GetX(ctx context.Context, id int) *Car { - ca, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return ca + return obj } // QueryOwner queries the owner edge of a Car. @@ -315,11 +315,11 @@ func (c *GroupClient) Get(ctx context.Context, id int) (*Group, error) { // GetX is like Get, but panics if an error occurs. func (c *GroupClient) GetX(ctx context.Context, id int) *Group { - gr, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return gr + return obj } // QueryUsers queries the users edge of a Group. @@ -419,11 +419,11 @@ func (c *UserClient) Get(ctx context.Context, id int) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id int) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // QueryCars queries the cars edge of a User. diff --git a/examples/traversal/ent/client.go b/examples/traversal/ent/client.go index 4f5db9521..32982a179 100644 --- a/examples/traversal/ent/client.go +++ b/examples/traversal/ent/client.go @@ -211,11 +211,11 @@ func (c *GroupClient) Get(ctx context.Context, id int) (*Group, error) { // GetX is like Get, but panics if an error occurs. func (c *GroupClient) GetX(ctx context.Context, id int) *Group { - gr, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return gr + return obj } // QueryUsers queries the users edge of a Group. @@ -331,11 +331,11 @@ func (c *PetClient) Get(ctx context.Context, id int) (*Pet, error) { // GetX is like Get, but panics if an error occurs. func (c *PetClient) GetX(ctx context.Context, id int) *Pet { - pe, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return pe + return obj } // QueryFriends queries the friends edge of a Pet. @@ -451,11 +451,11 @@ func (c *UserClient) Get(ctx context.Context, id int) (*User, error) { // GetX is like Get, but panics if an error occurs. func (c *UserClient) GetX(ctx context.Context, id int) *User { - u, err := c.Get(ctx, id) + obj, err := c.Get(ctx, id) if err != nil { panic(err) } - return u + return obj } // QueryPets queries the pets edge of a User.