MCPcopy
hub / github.com/crowdsecurity/crowdsec / GetX

Method GetX

pkg/database/ent/client.go:1449–1455  ·  view source on GitHub ↗

GetX is like Get, but panics if an error occurs.

(ctx context.Context, id int)

Source from the content-addressed store, hash-verified

1447
1448// GetX is like Get, but panics if an error occurs.
1449func (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.
1458func (c *LockClient) Hooks() []Hook {

Callers

nothing calls this directly

Calls 1

GetMethod · 0.95

Tested by

no test coverage detected