aboutsummaryrefslogtreecommitdiff
path: root/imports
diff options
context:
space:
mode:
authorMichael Matloob <matloob@golang.org>2019-01-25 16:12:01 -0500
committerMichael Matloob <matloob@golang.org>2019-01-29 21:16:23 +0000
commit9cefa6771f8f3c72b346adb1995b7432464d4038 (patch)
treecfd315f2ad524d6298d1865b13ab30757866cbb9 /imports
parent0a99049195aff55f007fc4dfd48e3ec2b4d5f602 (diff)
downloadgolang-x-tools-9cefa6771f8f3c72b346adb1995b7432464d4038.tar.gz
go/packages: rename name= query and "disable" it
It was originally added to support goimports, but goimports is going with another solution. We're going to disable it for now, but not delete it, so that the goimports code path that uses it can continue to be tested if and when we want to use it. We don't think there are any other users of name= but if there are, please let us know and we'll work with you to fix you, or we'll stop or revert this change. Thanks! Change-Id: I73b7b6c0a5788148af5f3380189055b450f7b45e Reviewed-on: https://go-review.googlesource.com/c/159702 Run-TryBot: Michael Matloob <matloob@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
Diffstat (limited to 'imports')
-rw-r--r--imports/fix.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/imports/fix.go b/imports/fix.go
index f18c41351..cb2d3eb01 100644
--- a/imports/fix.go
+++ b/imports/fix.go
@@ -657,7 +657,7 @@ func (r *goPackagesResolver) loadPackageNames(importPaths []string, srcDir strin
func (r *goPackagesResolver) scan(refs references) ([]*pkg, error) {
var loadQueries []string
for pkgName := range refs {
- loadQueries = append(loadQueries, "name="+pkgName)
+ loadQueries = append(loadQueries, "iamashamedtousethedisabledqueryname="+pkgName)
}
sort.Strings(loadQueries)
cfg := r.env.newPackagesConfig(packages.LoadFiles)