mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
go/loader: Fix thinko in FindPackage hook signature
(*build.Context).Import has signature of (ctx, importPath, fromDir, mode) not (ctx, fromDir, importPath, mode) and the loader actually uses the first version. The thinko was introduced in d6e83e53 (go/loader: changes for vendor support; CL 18053) and was possible because importPath and fromDir both have the same type string. Fix it. Change-Id: I52deaec6d141846b8a495835b121c1bdc2864215 Reviewed-on: https://go-review.googlesource.com/47343 Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
1b3bb8de7d
commit
c2d03f470b
@ -105,7 +105,7 @@ type Config struct {
|
||||
// conventions, for example.
|
||||
//
|
||||
// It must be safe to call concurrently from multiple goroutines.
|
||||
FindPackage func(ctxt *build.Context, fromDir, importPath string, mode build.ImportMode) (*build.Package, error)
|
||||
FindPackage func(ctxt *build.Context, importPath, fromDir string, mode build.ImportMode) (*build.Package, error)
|
||||
|
||||
// AfterTypeCheck is called immediately after a list of files
|
||||
// has been type-checked and appended to info.Files.
|
||||
|
Loading…
x
Reference in New Issue
Block a user