MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / GetX

Method GetX

ent/client.go:2405–2411  ·  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

2403
2404// GetX is like Get, but panics if an error occurs.
2405func (c *ShareClient) GetX(ctx context.Context, id int) *Share {
2406 obj, err := c.Get(ctx, id)
2407 if err != nil {
2408 panic(err)
2409 }
2410 return obj
2411}
2412
2413// QueryUser queries the user edge of a Share.
2414func (c *ShareClient) QueryUser(s *Share) *UserQuery {

Callers

nothing calls this directly

Calls 1

GetMethod · 0.95

Tested by

no test coverage detected