1
0
mirror of https://github.com/golang/go synced 2024-09-24 07:10:12 -06:00
go/api
Jay Conrod 434cdd0337 debug/buildinfo: new package with Read and ReadFile
These functions provide access to module information stamped into Go
binaries. In the future, they'll provide access to other information
(like VCS info).

These functions are added in a new package instead of runtime/debug
since they use binary parsing packages like debug/elf, which would
make runtime/debug an unacceptably heavy dependency. The types in
runtime/debug are still used; debug/buildinfo uses them via type
aliases.

This information is already available for the running binary through
debug.ReadBuildInfo and for other binaries with 'go version -m', but
until now, there hasn't been a way to get it for other binaries
without installing cmd/go.

This change copies most of the code in cmd/go/internal/version. A
later CL will migrate 'go version -m' to use this package.

For #37475
Fixes #39301

Change-Id: I0fbe0896e04f12ef81c6d79fb61b20daede86159
Reviewed-on: https://go-review.googlesource.com/c/go/+/353887
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-10-14 18:44:08 +00:00
..
except.txt [dev.fuzz] all: merge master (d137b74) into dev.fuzz 2021-05-17 11:03:09 -04:00
go1.1.txt cmd/api: set architecture sizes when type checking 2021-10-04 20:20:20 +00:00
go1.2.txt api: add go1.2.txt, use in tests 2013-10-18 13:36:59 +09:00
go1.3.txt api: add go1.3.txt 2014-06-02 11:45:00 +09:00
go1.4.txt [release-branch.go1.4] api: create go1.4.txt 2014-12-12 14:01:01 +11:00
go1.5.txt api: update go1.5.txt 2015-07-30 21:14:09 +00:00
go1.6.txt go/types: rename Importer2 to ImporterFrom 2016-01-13 23:40:13 +00:00
go1.7.txt unicode: upgrade to version 9.0.0 2016-06-28 15:08:11 +00:00
go1.8.txt Revert "cmd/go: note when some Go files were ignored on no-Go-files errors" 2016-12-21 05:25:57 +00:00
go1.9.txt cmd/api: set architecture sizes when type checking 2021-10-04 20:20:20 +00:00
go1.10.txt text/template: revert CL 66410 "add break, continue actions in ranges" 2018-02-06 05:00:01 +00:00
go1.11.txt crypto/tls: make ConnectionState.ExportKeyingMaterial a method 2018-08-22 03:48:56 +00:00
go1.12.txt api: add os.(*File).SyscallConn to go1.12.txt 2019-01-02 21:21:53 +00:00
go1.13.txt api/go1.13: add debug/elf.Symbol fields added in CL 184099 2019-08-08 18:44:16 +00:00
go1.14.txt go/types: unexport Checker.LookupFieldOrMethod 2020-01-31 14:46:05 +00:00
go1.15.txt go/printer: remove exported StdFormat flag 2020-07-17 02:15:01 +00:00
go1.16.txt api/go1.16: add go/build/constraint APIs 2021-01-27 21:11:22 +00:00
go1.17.txt cmd/api: set architecture sizes when type checking 2021-10-04 20:20:20 +00:00
go1.txt encoding/xml: add, support Marshaler interface 2013-08-14 14:58:28 -04:00
next.txt debug/buildinfo: new package with Read and ReadFile 2021-10-14 18:44:08 +00:00
README text/template: add variable assignments 2018-04-04 15:51:56 +00:00

Files in this directory are data for Go's API checker ("go tool api", in src/cmd/api).

Each file is a list of API features, one per line.

go1.txt (and similarly named files) are frozen once a version has been
shipped. Each file adds new lines but does not remove any.

except.txt lists features that may disappear without breaking true
compatibility.

next.txt is the only file intended to be mutated. It's a list of
features that may be added to the next version. It only affects
warning output from the go api tool.