FirstX is like First, but panics if an error occurs.
(ctx context.Context)
| 169 | |
| 170 | // FirstX is like First, but panics if an error occurs. |
| 171 | func (spq *StoragePolicyQuery) FirstX(ctx context.Context) *StoragePolicy { |
| 172 | node, err := spq.First(ctx) |
| 173 | if err != nil && !IsNotFound(err) { |
| 174 | panic(err) |
| 175 | } |
| 176 | return node |
| 177 | } |
| 178 | |
| 179 | // FirstID returns the first StoragePolicy ID from the query. |
| 180 | // Returns a *NotFoundError when no StoragePolicy ID was found. |
nothing calls this directly
no test coverage detected