diff options
author | Jay Conrod <jayconrod@google.com> | 2021-09-30 14:37:30 -0700 |
---|---|---|
committer | Jay Conrod <jayconrod@google.com> | 2021-10-14 18:43:59 +0000 |
commit | 765c9116be44641854f580c19e3589d7b86a3d28 (patch) | |
tree | a7966442083ff5e4681a0470cc9bd38cc62fdcd5 /api | |
parent | 011fd002457da0823da5f06b099fcf6e21444b00 (diff) | |
download | go-765c9116be44641854f580c19e3589d7b86a3d28.tar.gz go-765c9116be44641854f580c19e3589d7b86a3d28.zip |
cmd/go: move module build info formatting into runtime/debug
Previously, modload.PackageBuildInfo returned a string containing
information about modules used to build an executable. This string is
embedded in the binary and can be read with debug.ReadBuildInfo or
'go version -m'.
With this change, debug.BuildInfo now has a MarshalText method that
returns a string in the same format as modload.PackageBuildInfo.
Package.load now calls Package.setBuildInfo, which constructs a
debug.BuildInfo, formats it with MarshalText, then sets
Package.Internal.BuildInfo. This is equivalent to what
modload.PackageBuildInfo did.
modload.PackageBuildInfo is deleted, since it's no longer used.
For #37475
Change-Id: I5875a98cb64737637fec2a450ab2ffa7f1805707
Reviewed-on: https://go-review.googlesource.com/c/go/+/353886
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'api')
-rw-r--r-- | api/next.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/api/next.txt b/api/next.txt index 1192fc9069..cb729ea72f 100644 --- a/api/next.txt +++ b/api/next.txt @@ -1,3 +1,4 @@ +pkg runtime/debug, method (*BuildInfo) MarshalText() ([]byte, error) pkg syscall (darwin-amd64), func RecvfromInet4(int, []uint8, int, *SockaddrInet4) (int, error) pkg syscall (darwin-amd64), func RecvfromInet6(int, []uint8, int, *SockaddrInet6) (int, error) pkg syscall (darwin-amd64), func SendtoInet4(int, []uint8, int, SockaddrInet4) error |