diff --git a/doc/go1.18.html b/doc/go1.18.html index c75bfe9e5d..ce4030799a 100644 --- a/doc/go1.18.html +++ b/doc/go1.18.html @@ -250,6 +250,8 @@ Do not send CLs removing the interior tags from such phrases.
go
get
go
get
no longer builds or installs packages in
module-aware mode. go
get
is now dedicated to
@@ -269,6 +271,8 @@ Do not send CLs removing the interior tags from such phrases.
and installs packages, as before.
go
version
The go
command now embeds version control information in
binaries including the currently checked-out revision, commit time, and a
@@ -303,6 +307,8 @@ Do not send CLs removing the interior tags from such phrases.
debug/buildinfo
package from go
1.18+.
go
mod
download
If the main module's go.mod
file
specifies go
1.17
@@ -316,6 +322,8 @@ Do not send CLs removing the interior tags from such phrases.
go
mod
download
all
.
go
mod
vendor
The go
mod
vendor
subcommand now
supports a -o
flag to set the output directory.
@@ -325,6 +333,8 @@ Do not send CLs removing the interior tags from such phrases.
third-party tools that need to collect package source code.)
go
build
-asan
The go
build
command and related commands
now support an -asan
flag that enables interoperation
@@ -332,6 +342,8 @@ Do not send CLs removing the interior tags from such phrases.
option -fsanitize=address
).
go
mod
tidy
The go
mod
tidy
command now retains
additional checksums in the go.sum
file for modules whose source
@@ -342,6 +354,8 @@ Do not send CLs removing the interior tags from such phrases.
module's go.mod
file.
go
work
The go
command now supports a "Workspace" mode. If a
go.work
file is found in the working directory or a
@@ -355,6 +369,8 @@ Do not send CLs removing the interior tags from such phrases.
documentation.
go
test
The go
command now supports additional command line
options for the new fuzzing support described
@@ -376,11 +392,28 @@ Do not send CLs removing the interior tags from such phrases.
//go:build
lines
- TODO: https://golang.org/cl/240611: 240611: cmd/fix: add buildtag fix
+Go 1.17 introduced //go:build
lines as a more readable way to write build constraints,
+instead of //
+build
lines.
+As of Go 1.17, gofmt
adds //go:build
lines
+to match existing +build
lines and keeps them in sync,
+while go
vet
diagnoses when they are out of sync.
gofmt
Since the release of Go 1.18 marks the end of support for Go 1.16,
+all supported versions of Go now understand //go:build
lines.
+In Go 1.18, go
fix
now removes the now-obsolete
+//
+build
lines in modules declaring
+go
1.17
or later in their go.mod
files.
+
+For more information, see https://go.dev/design/draft-gobuild. +
+ +
gofmt
now reads and formats input files concurrently, with a
@@ -388,7 +421,7 @@ Do not send CLs removing the interior tags from such phrases.
multiple CPUs, gofmt
should now be significantly faster.
vet
go
command -asan
option.
-
- TODO: https://golang.org/cl/369914: for default bootstrap, use Go 1.17 if present, falling back to Go 1.4
+When building a Go release from source and GOROOT_BOOTSTRAP
+is not set, previous versions of Go looked for a Go 1.4 or later bootstrap toolchain
+in the directory $HOME/go1.4
(%HOMEDRIVE%%HOMEPATH%\go1.4
on Windows).
+Go now looks first for $HOME/go1.17
or $HOME/sdk/go1.17
+before falling back to $HOME/go1.4
.
+We intend for Go 1.19 to require Go 1.17 or later for bootstrap,
+and this change should make the transition smoother.
+For more details, see go.dev/issue/44505.