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

Method GetX

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

1497
1498// GetX is like Get, but panics if an error occurs.
1499func (c *MetadataClient) GetX(ctx context.Context, id int) *Metadata {
1500 obj, err := c.Get(ctx, id)
1501 if err != nil {
1502 panic(err)
1503 }
1504 return obj
1505}
1506
1507// QueryFile queries the file edge of a Metadata.
1508func (c *MetadataClient) QueryFile(m *Metadata) *FileQuery {

Callers

nothing calls this directly

Calls 1

GetMethod · 0.95

Tested by

no test coverage detected