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

Method FirstX

app/controlplane/pkg/data/ent/group_query.go:127–133  ·  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

125
126// FirstX is like First, but panics if an error occurs.
127func (_q *GroupQuery) FirstX(ctx context.Context) *Group {
128 node, err := _q.First(ctx)
129 if err != nil && !IsNotFound(err) {
130 panic(err)
131 }
132 return node
133}
134
135// FirstID returns the first Group ID from the query.
136// Returns a *NotFoundError when no Group ID was found.

Callers

nothing calls this directly

Calls 2

FirstMethod · 0.95
IsNotFoundFunction · 0.70

Tested by

no test coverage detected