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