From: Daniel Martí Date: Sat, 12 Mar 2022 22:59:44 +0000 (+0000) Subject: cmd/go: reference BuildID field from list's -export docs X-Git-Tag: go1.19beta1~164 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=87039c7d340eaf5731f3c12c1d1dd9875c7693fa;p=gostls13.git cmd/go: reference BuildID field from list's -export docs In https://golang.org/cl/263542 we added BuildID to the Package struct in the docs for "go list", correctly pointing out that it's only set when -export is used. Further down, the doc details the -export flag on its own. It already mentioned the Export field, and we forgot to add a mention to BuildID as well. Do that. Change-Id: I5838a8900edae8012fe333937d86baea3066c5f1 Reviewed-on: https://go-review.googlesource.com/c/go/+/392114 TryBot-Result: Gopher Robot Reviewed-by: Bryan Mills Reviewed-by: Michael Knyszek Run-TryBot: Daniel Martí --- diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index 15a6ff623d..d770ad82e5 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -895,7 +895,8 @@ // (zeroed). // // The -export flag causes list to set the Export field to the name of a -// file containing up-to-date export information for the given package. +// file containing up-to-date export information for the given package, +// and the BuildID field to the build ID of the compiled package. // // The -find flag causes list to identify the named packages but not // resolve their dependencies: the Imports and Deps lists will be empty. diff --git a/src/cmd/go/internal/list/list.go b/src/cmd/go/internal/list/list.go index 4d7c727048..770127c1cd 100644 --- a/src/cmd/go/internal/list/list.go +++ b/src/cmd/go/internal/list/list.go @@ -187,7 +187,8 @@ a non-nil Error field; other information may or may not be missing (zeroed). The -export flag causes list to set the Export field to the name of a -file containing up-to-date export information for the given package. +file containing up-to-date export information for the given package, +and the BuildID field to the build ID of the compiled package. The -find flag causes list to identify the named packages but not resolve their dependencies: the Imports and Deps lists will be empty.