From 45e69182d161328ca4f95533036ddbaf17de0eaf Mon Sep 17 00:00:00 2001 From: Michael Matloob Date: Thu, 23 Jan 2020 11:21:57 -0500 Subject: [PATCH] go/packages: fix doc for NeedExportsFile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It actually adds the ExportFile field on Package, not the ExportsFile field. (The ExportsFile field, with an "s" doesn't exist). Fixes golang/go#36302 Change-Id: I7f4d82f4d536078d2fa383e9a893a463c1926488 Reviewed-on: https://go-review.googlesource.com/c/tools/+/215980 Run-TryBot: Michael Matloob Reviewed-by: Daniel Martí --- go/packages/packages.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/go/packages/packages.go b/go/packages/packages.go index b0e8ba231f..586c714f60 100644 --- a/go/packages/packages.go +++ b/go/packages/packages.go @@ -35,6 +35,9 @@ import ( // Load may return more information than requested. type LoadMode int +// TODO(matloob): When a V2 of go/packages is released, rename NeedExportsFile to +// NeedExportFile to make it consistent with the Package field it's adding. + const ( // NeedName adds Name and PkgPath. NeedName LoadMode = 1 << iota @@ -52,7 +55,7 @@ const ( // NeedDeps adds the fields requested by the LoadMode in the packages in Imports. NeedDeps - // NeedExportsFile adds ExportsFile. + // NeedExportsFile adds ExportFile. NeedExportsFile // NeedTypes adds Types, Fset, and IllTyped.