1
0
mirror of https://github.com/golang/go synced 2024-11-18 16:04:44 -07:00

go/packages: create Imports map when creating package

Fixes golang/go#35035

Change-Id: I44a0a24592005aa2aa60401cde8a1eab372f3492
Reviewed-on: https://go-review.googlesource.com/c/tools/+/202537
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
This commit is contained in:
Rebecca Stambler 2019-10-21 13:10:04 -04:00
parent a0af95a55c
commit 44c9a601ac

View File

@ -361,6 +361,7 @@ func adHocPackage(cfg *Config, driver driver, pattern, query string) (*driverRes
PkgPath: query, PkgPath: query,
GoFiles: []string{query}, GoFiles: []string{query},
CompiledGoFiles: []string{query}, CompiledGoFiles: []string{query},
Imports: make(map[string]*Package),
}) })
dirResponse.Roots = append(dirResponse.Roots, "command-line-arguments") dirResponse.Roots = append(dirResponse.Roots, "command-line-arguments")
} }