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