FirstX is like First, but panics if an error occurs.
(ctx context.Context)
| 125 | |
| 126 | // FirstX is like First, but panics if an error occurs. |
| 127 | func (_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. |
nothing calls this directly
no test coverage detected