This removes requirement to open full cache. Signed-off-by: Ophestra <cat@gensokyo.uk>
15 lines
285 B
Go
15 lines
285 B
Go
package main
|
|
|
|
import "testing"
|
|
|
|
// newIndex returns the address of a newly populated packageIndex.
|
|
func newIndex(t *testing.T) *packageIndex {
|
|
t.Helper()
|
|
|
|
var index packageIndex
|
|
if err := index.populate(nil); err != nil {
|
|
t.Fatalf("populate: error = %v", err)
|
|
}
|
|
return &index
|
|
}
|