FirstX is like First, but panics if an error occurs.
(ctx context.Context)
| 263 | |
| 264 | // FirstX is like First, but panics if an error occurs. |
| 265 | func (fq *FileQuery) FirstX(ctx context.Context) *File { |
| 266 | node, err := fq.First(ctx) |
| 267 | if err != nil && !IsNotFound(err) { |
| 268 | panic(err) |
| 269 | } |
| 270 | return node |
| 271 | } |
| 272 | |
| 273 | // FirstID returns the first File ID from the query. |
| 274 | // Returns a *NotFoundError when no File ID was found. |
nothing calls this directly
no test coverage detected