type IndexSource … // create a new Source. Called from NewView in cache/session.go. func NewIndexSource(cachedir string) *IndexSource { … } func (s *IndexSource) LoadPackageNames(ctx context.Context, srcDir string, paths []ImportPath) (map[ImportPath]PackageName, error) { … } func (s *IndexSource) ResolveReferences(ctx context.Context, filename string, missing References) ([]*Result, error) { … } func (s *IndexSource) maybeReadIndex() error { … }