mirror of
https://github.com/golang/go.git
synced 2026-06-27 03:11:23 +00:00
go/importer: un-deprecate importer.ForCompiler
The Deprecate comment seems intended to apply only to the lookup parameter, not the function itself. This CL clarifies the intent. Fixes #79139 Change-Id: I436207cd0e4fd0f5214a1767486e39a54635fd21 Reviewed-on: https://go-review.googlesource.com/c/go/+/773040 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Auto-Submit: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
3f3387fab8
commit
816c1a79fb
1 changed files with 4 additions and 3 deletions
|
|
@ -41,9 +41,10 @@ type Lookup func(path string) (io.ReadCloser, error)
|
|||
// it is assumed that the translation to canonical import paths is being
|
||||
// done by the client of the importer.
|
||||
//
|
||||
// A lookup function must be provided for correct module-aware operation.
|
||||
// Deprecated: If lookup is nil, for backwards-compatibility, the importer
|
||||
// will attempt to resolve imports in the $GOPATH workspace.
|
||||
// A lookup function must be provided for correct module-aware
|
||||
// operation. Providing a nil value for lookup is deprecated but, for
|
||||
// backwards-compatibility, the importer will in this case attempt to
|
||||
// resolve imports in the $GOPATH workspace.
|
||||
func ForCompiler(fset *token.FileSet, compiler string, lookup Lookup) types.Importer {
|
||||
switch compiler {
|
||||
case "gc":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue