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

Method FirstIDX

ent/gitcommit_query.go:126–132  ·  view source on GitHub ↗

FirstIDX is like FirstID, but panics if an error occurs.

(ctx context.Context)

Source from the content-addressed store, hash-verified

124
125// FirstIDX is like FirstID, but panics if an error occurs.
126func (gcq *GitCommitQuery) FirstIDX(ctx context.Context) uuid.UUID {
127 id, err := gcq.FirstID(ctx)
128 if err != nil && !IsNotFound(err) {
129 panic(err)
130 }
131 return id
132}
133
134// Only returns a single GitCommit entity found by the query, ensuring it only returns one.
135// Returns a *NotSingularError when more than one GitCommit entity is found.

Callers

nothing calls this directly

Calls 2

FirstIDMethod · 0.95
IsNotFoundFunction · 0.85

Tested by

no test coverage detected