MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / FirstIDX

Method FirstIDX

app/controlplane/pkg/data/ent/user_query.go:150–156  ·  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

148
149// FirstIDX is like FirstID, but panics if an error occurs.
150func (_q *UserQuery) FirstIDX(ctx context.Context) uuid.UUID {
151 id, err := _q.FirstID(ctx)
152 if err != nil && !IsNotFound(err) {
153 panic(err)
154 }
155 return id
156}
157
158// Only returns a single User entity found by the query, ensuring it only returns one.
159// Returns a *NotSingularError when more than one User entity is found.

Callers

nothing calls this directly

Calls 2

FirstIDMethod · 0.95
IsNotFoundFunction · 0.70

Tested by

no test coverage detected