GetX is like Get, but panics if an error occurs.
(ctx context.Context, id int)
| 1447 | |
| 1448 | // GetX is like Get, but panics if an error occurs. |
| 1449 | func (c *LockClient) GetX(ctx context.Context, id int) *Lock { |
| 1450 | obj, err := c.Get(ctx, id) |
| 1451 | if err != nil { |
| 1452 | panic(err) |
| 1453 | } |
| 1454 | return obj |
| 1455 | } |
| 1456 | |
| 1457 | // Hooks returns the client hooks. |
| 1458 | func (c *LockClient) Hooks() []Hook { |