FirstX is like First, but panics if an error occurs.
(ctx context.Context)
| 96 | |
| 97 | // FirstX is like First, but panics if an error occurs. |
| 98 | func (tq *TaskQuery) FirstX(ctx context.Context) *Task { |
| 99 | node, err := tq.First(ctx) |
| 100 | if err != nil && !IsNotFound(err) { |
| 101 | panic(err) |
| 102 | } |
| 103 | return node |
| 104 | } |
| 105 | |
| 106 | // FirstID returns the first Task ID from the query. |
| 107 | // Returns a *NotFoundError when no Task ID was found. |
nothing calls this directly
no test coverage detected