MustNew wraps index.New and fails with a Fatal error on t if New returns an error.
(t *testing.T, s sorted.KeyValue)
| 1456 | // MustNew wraps index.New and fails with a Fatal error on t if New |
| 1457 | // returns an error. |
| 1458 | func MustNew(t *testing.T, s sorted.KeyValue) *index.Index { |
| 1459 | t.Helper() |
| 1460 | ix, err := index.New(s) |
| 1461 | if err != nil { |
| 1462 | t.Fatalf("Error creating index: %v", err) |
| 1463 | } |
| 1464 | return ix |
| 1465 | } |