FirstX is like First, but panics if an error occurs.
(ctx context.Context)
| 171 | |
| 172 | // FirstX is like First, but panics if an error occurs. |
| 173 | func (_q *AlertQuery) FirstX(ctx context.Context) *Alert { |
| 174 | node, err := _q.First(ctx) |
| 175 | if err != nil && !IsNotFound(err) { |
| 176 | panic(err) |
| 177 | } |
| 178 | return node |
| 179 | } |
| 180 | |
| 181 | // FirstID returns the first Alert ID from the query. |
| 182 | // Returns a *NotFoundError when no Alert ID was found. |
nothing calls this directly
no test coverage detected