From 61b5c866a9507524d0a3d7a7e0c892c975ca081b Mon Sep 17 00:00:00 2001
From: Russ Cox
Fuzzing
Go command
+
+
go
get
go
get
no longer builds or installs packages in
module-aware mode. go
get
is now dedicated to
@@ -269,6 +271,8 @@ Go command
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 @@
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 @@
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 @@
go
build
-asan
The go
build
command and related commands
now support an -asan
flag that enables interoperation
@@ -332,6 +342,8 @@
-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 @@
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 @@
go
test
The go
command now supports additional command line
options for the new fuzzing support described
@@ -376,11 +392,28 @@ Go command
//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.
+
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
gofmt
now reads and formats input files concurrently, with a
@@ -388,7 +421,7 @@
gofmt
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.