MCPcopy Create free account
hub / github.com/Comfy-Org/registry-backend / FirstX

Method FirstX

ent/gitcommit_query.go:103–109  ·  view source on GitHub ↗

FirstX is like First, but panics if an error occurs.

(ctx context.Context)

Source from the content-addressed store, hash-verified

101
102// FirstX is like First, but panics if an error occurs.
103func (gcq *GitCommitQuery) FirstX(ctx context.Context) *GitCommit {
104 node, err := gcq.First(ctx)
105 if err != nil && !IsNotFound(err) {
106 panic(err)
107 }
108 return node
109}
110
111// FirstID returns the first GitCommit ID from the query.
112// Returns a *NotFoundError when no GitCommit ID was found.

Callers

nothing calls this directly

Calls 2

FirstMethod · 0.95
IsNotFoundFunction · 0.85

Tested by

no test coverage detected