1
0
mirror of https://github.com/golang/go synced 2024-11-19 00:44:40 -07:00

go.tools/go/loader: add file missing from rev ebef51b726fc

(CL https://golang.org/cl/62540043)

TBR=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/65530046
This commit is contained in:
Alan Donovan 2014-02-19 13:28:12 -05:00
parent 0c9517ddba
commit 42022f89d4

13
go/loader/backdoor.go Normal file
View File

@ -0,0 +1,13 @@
package loader
import (
"go/ast"
"go/build"
"go/token"
)
// PackageLocatorFunc exposes the address of parsePackageFiles to tests.
// This is a temporary hack until we expose a proper PackageLocator interface.
func PackageLocatorFunc() *func(ctxt *build.Context, fset *token.FileSet, path string, which string) ([]*ast.File, error) {
return &parsePackageFiles
}