From: Russ Cox
-The latest Go release, version 1.10, arrives six months after go1.9.
+The latest Go release, version 1.10, arrives six months after Go 1.9.
Most of its changes are in the implementation of the toolchain, runtime, and libraries.
As always, the release maintains the Go 1 promise of compatibility.
We expect almost all Go programs to continue to compile and run as before.
@@ -40,7 +40,7 @@ permits passing string values directly between Go and C using cgo
-There are no significant changes to the language.
+There are no significant changes to the language specification.
@@ -202,7 +202,7 @@ only to command lines using a subset of the
The idiomatic way to bypass test caching is to use
+
The
-Cgo now implements a C typedef like â
These types must be
@@ -429,7 +430,7 @@ a repository is not âproperly formattedâ is inherently fragile and not recom
If multiple programs must agree about which version of gofmt is used to format a source file,
we recommend that they do this by arranging to invoke the same gofmt binary.
For example, in the Go open source repository, our Git pre-commit hook is written in Go
-and could import
The various build modes
-has been ported to more systems.
+have been ported to more systems.
Specifically,
@@ -742,9 +743,9 @@ The
The Changes to the language
-count=1
.
go
test
command now automatically runs
go
vet
on the package being tested,
to identify significant problems before running the test.
@@ -267,7 +267,7 @@ and the test2json documentation.
Cgo
typedef
X
Y
;â using a Go type alias,
+Cgo now implements a C typedef like âtypedef
X
Y
â using a Go type alias,
so that Go code may use the types C.X
and C.Y
interchangeably.
It also now supports the use of niladic function-like macros.
Also, the documentation has been updated to clarify that
@@ -293,7 +293,7 @@ The new set of environment variables CC_FOR_goos_goarchgo
build
commands refer to the CC
environment
+Later go
build
commands use the CC
environment
variable or else the built-in default.
uintptr
on the Go side because they
would otherwise confuse the Go garbage collector; they are sometimes
-not really pointers but data structures encoded in a pointer type.
+not really pointers but data structures encoded in a pointer-sized integer.
+Pointers to Go memory must not be stored in these uintptr
values.
go/format
directly but instead invokes the gofmt
+and could import go/format
directly, but instead it invokes the gofmt
binary found in the current path, so that the pre-commit hook need not be recompiled
each time gofmt
changes.
c-shared
now works on linux/ppc64le
, windows/386
, and windows/amd64
;
pie
now works on darwin/amd64
and also forces the use of external linking on all systems;
and plugin
now works on linux/ppc64le
and darwin/amd64
.
@@ -579,7 +580,7 @@ Now, the calls nest: if LockOSThread
is called multiple times,
in order to unlock the thread.
Existing code that was careful not to nest these calls will remain correct.
Existing code that incorrectly assumed the calls nested will become correct.
-Most uses of these functions in public Go source falls into the second category.
+Most uses of these functions in public Go source code falls into the second category.
Split
,
and
SplitAfter
-each already returned slices pointing into the same underlying array as its input.
-Go 1.10 changes each of the returned subslices to have capacity equal to its length,
-so that appending to a subslice will not overwrite adjacent data in the original input.
+functions have always returned subslices of their inputs.
+Go 1.10 changes each returned subslice to have capacity equal to its length,
+so that appending to one cannot overwrite adjacent data in the original input.
net.Conn
,
Close
method
now guarantee that when Close
returns,
the underlying file descriptor has been closed.
-(In earlier releases, like for net.Conn
's,
+(In earlier releases,
if the Close
stopped pending I/O
in other goroutines, the closing of the file descriptor could happen in one of those
goroutines shortly after Close
returned.)
@@ -1430,7 +1431,7 @@ allows conversion of IANA time zone file data to a
unicode
package and associated
-support throughout the system has been upgraded from version 9.0 to
+support throughout the system has been upgraded from Unicode 9.0 to
Unicode 10.0,
which adds 8,518 new characters, including four new scripts, one new property,
a Bitcoin currency symbol, and 56 new emoji.
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index 0dc72abbc8..91657eb74c 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -797,9 +797,12 @@
// or non-test flags outside this set, the result is not cached. To
// disable test caching, use any test flag or argument other than the
// cacheable flags. The idiomatic way to disable test caching explicitly
-// is to use -count=1. A cached result is treated as executing in no
-// time at all, so a successful package test result will be cached and
-// reused regardless of -timeout setting.
+// is to use -count=1. Tests that open files within the package's source
+// root (usually $GOPATH) or that consult environment variables only
+// match future runs in which the files and environment variables are unchanged.
+// A cached test result is treated as executing in no time at all,
+// so a successful package test result will be cached and reused
+// regardless of -timeout setting.
//
// In addition to the build flags, the flags handled by 'go test' itself are:
//
diff --git a/src/cmd/go/internal/test/test.go b/src/cmd/go/internal/test/test.go
index db874ff834..5147c5b778 100644
--- a/src/cmd/go/internal/test/test.go
+++ b/src/cmd/go/internal/test/test.go
@@ -119,9 +119,12 @@ restricted set of 'cacheable' test flags, defined as -cpu, -list,
or non-test flags outside this set, the result is not cached. To
disable test caching, use any test flag or argument other than the
cacheable flags. The idiomatic way to disable test caching explicitly
-is to use -count=1. A cached result is treated as executing in no
-time at all, so a successful package test result will be cached and
-reused regardless of -timeout setting.
+is to use -count=1. Tests that open files within the package's source
+root (usually $GOPATH) or that consult environment variables only
+match future runs in which the files and environment variables are unchanged.
+A cached test result is treated as executing in no time at all,
+so a successful package test result will be cached and reused
+regardless of -timeout setting.
` + strings.TrimSpace(testFlag1) + ` See 'go help testflag' for details.