FirstX is like First, but panics if an error occurs.
(ctx context.Context)
| 121 | |
| 122 | // FirstX is like First, but panics if an error occurs. |
| 123 | func (sq *ShareQuery) FirstX(ctx context.Context) *Share { |
| 124 | node, err := sq.First(ctx) |
| 125 | if err != nil && !IsNotFound(err) { |
| 126 | panic(err) |
| 127 | } |
| 128 | return node |
| 129 | } |
| 130 | |
| 131 | // FirstID returns the first Share ID from the query. |
| 132 | // Returns a *NotFoundError when no Share ID was found. |
nothing calls this directly
no test coverage detected