diff --git a/doc/go1.18.html b/doc/go1.18.html index f4d097d06b..d95e55e1ad 100644 --- a/doc/go1.18.html +++ b/doc/go1.18.html @@ -65,6 +65,30 @@ Do not send CLs removing the interior tags from such phrases. and installs packages, as before.
+
+ The go command now embeds version control information in
+ binaries including the currently checked-out revision and a flag indicating
+ whether edited or untracked files are present. Version control information
+ is embedded if the go command is invoked in a directory within a
+ Git or Mercurial repository, and the main package and its
+ containing main module are in the same repository. This information may be
+ omitted using the flag -buildvcs=false.
+
+ Additionally, the go command embeds information about the build
+ including build and tool tags (set with -tags), compiler,
+ assembler, and linker flags (like -gcflags), whether cgo was
+ enabled, and if it was, the values of the cgo environment variables
+ (like CGO_CFLAGS). This information may be omitted using the
+ flag -buildinfo=false. Both VCS and build information may be
+ read together with module information using go
+ version -m file or
+ runtime/debug.ReadBuildInfo (for the currently running binary)
+ or the new debug/buildinfo
+ package.
+
TODO: complete this section, or delete if not needed
@@ -114,6 +138,19 @@ Do not send CLs removing the interior tags from such phrases. TODO: complete this section +
+ This new package provides access to module versions, version control
+ information, and build flags embedded in executable files built by
+ the go command. The same information is also available via
+ runtime/debug.ReadBuildInfo
+ for the currently running binary and via go
+ version -m on the command line.
+