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 /src/debug | |
| parent | 011fd002457da0823da5f06b099fcf6e21444b00 (diff) | |
| download | go-765c9116be44641854f580c19e3589d7b86a3d28.tar.xz | |
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 'src/debug')
0 files changed, 0 insertions, 0 deletions
