Update prebuilts to go 1.13
From https://ci.android.com/builds/submitted/5859978/linux/latest/go.zip
Test: m blueprint_tools
Change-Id: Ief07b24cffce02195326d627f28ba879e8f14f6b
diff --git a/doc/articles/race_detector.html b/doc/articles/race_detector.html
index 6defd98..2f18acf 100644
--- a/doc/articles/race_detector.html
+++ b/doc/articles/race_detector.html
@@ -377,8 +377,11 @@
<h2 id="Supported_Systems">Supported Systems</h2>
<p>
-The race detector runs on <code>darwin/amd64</code>, <code>freebsd/amd64</code>,
-<code>linux/amd64</code>, and <code>windows/amd64</code>.
+ The race detector runs on
+ <code>linux/amd64</code>, <code>linux/ppc64le</code>,
+ <code>linux/arm64</code>, <code>freebsd/amd64</code>,
+ <code>netbsd/amd64</code>, <code>darwin/amd64</code>,
+ and <code>windows/amd64</code>.
</p>
<h2 id="Runtime_Overheads">Runtime Overhead</h2>
diff --git a/doc/asm.html b/doc/asm.html
index debb1e2..11033fe 100644
--- a/doc/asm.html
+++ b/doc/asm.html
@@ -57,59 +57,66 @@
println(3)
}
$ GOOS=linux GOARCH=amd64 go tool compile -S x.go # or: go build -gcflags -S x.go
-
---- prog list "main" ---
-0000 (x.go:3) TEXT main+0(SB),$8-0
-0001 (x.go:3) FUNCDATA $0,gcargs·0+0(SB)
-0002 (x.go:3) FUNCDATA $1,gclocals·0+0(SB)
-0003 (x.go:4) MOVQ $3,(SP)
-0004 (x.go:4) PCDATA $0,$8
-0005 (x.go:4) CALL ,runtime.printint+0(SB)
-0006 (x.go:4) PCDATA $0,$-1
-0007 (x.go:4) PCDATA $0,$0
-0008 (x.go:4) CALL ,runtime.printnl+0(SB)
-0009 (x.go:4) PCDATA $0,$-1
-0010 (x.go:5) RET ,
+"".main STEXT size=74 args=0x0 locals=0x10
+ 0x0000 00000 (x.go:3) TEXT "".main(SB), $16-0
+ 0x0000 00000 (x.go:3) MOVQ (TLS), CX
+ 0x0009 00009 (x.go:3) CMPQ SP, 16(CX)
+ 0x000d 00013 (x.go:3) JLS 67
+ 0x000f 00015 (x.go:3) SUBQ $16, SP
+ 0x0013 00019 (x.go:3) MOVQ BP, 8(SP)
+ 0x0018 00024 (x.go:3) LEAQ 8(SP), BP
+ 0x001d 00029 (x.go:3) FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x001d 00029 (x.go:3) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x001d 00029 (x.go:3) FUNCDATA $2, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x001d 00029 (x.go:4) PCDATA $0, $0
+ 0x001d 00029 (x.go:4) PCDATA $1, $0
+ 0x001d 00029 (x.go:4) CALL runtime.printlock(SB)
+ 0x0022 00034 (x.go:4) MOVQ $3, (SP)
+ 0x002a 00042 (x.go:4) CALL runtime.printint(SB)
+ 0x002f 00047 (x.go:4) CALL runtime.printnl(SB)
+ 0x0034 00052 (x.go:4) CALL runtime.printunlock(SB)
+ 0x0039 00057 (x.go:5) MOVQ 8(SP), BP
+ 0x003e 00062 (x.go:5) ADDQ $16, SP
+ 0x0042 00066 (x.go:5) RET
+ 0x0043 00067 (x.go:5) NOP
+ 0x0043 00067 (x.go:3) PCDATA $1, $-1
+ 0x0043 00067 (x.go:3) PCDATA $0, $-1
+ 0x0043 00067 (x.go:3) CALL runtime.morestack_noctxt(SB)
+ 0x0048 00072 (x.go:3) JMP 0
...
</pre>
<p>
The <code>FUNCDATA</code> and <code>PCDATA</code> directives contain information
for use by the garbage collector; they are introduced by the compiler.
-</p>
-
-<!-- Commenting out because the feature is gone but it's popular and may come back.
+</p>
<p>
-To see what gets put in the binary after linking, add the <code>-a</code> flag to the linker:
+To see what gets put in the binary after linking, use <code>go tool objdump</code>:
</p>
<pre>
-$ go tool 6l -a x.6 # or: go build -ldflags -a x.go
-codeblk [0x2000,0x1d059) at offset 0x1000
-002000 main.main | (3) TEXT main.main+0(SB),$8
-002000 65488b0c25a0080000 | (3) MOVQ 2208(GS),CX
-002009 483b21 | (3) CMPQ SP,(CX)
-00200c 7707 | (3) JHI ,2015
-00200e e83da20100 | (3) CALL ,1c250+runtime.morestack00
-002013 ebeb | (3) JMP ,2000
-002015 4883ec08 | (3) SUBQ $8,SP
-002019 | (3) FUNCDATA $0,main.gcargs·0+0(SB)
-002019 | (3) FUNCDATA $1,main.gclocals·0+0(SB)
-002019 48c7042403000000 | (4) MOVQ $3,(SP)
-002021 | (4) PCDATA $0,$8
-002021 e8aad20000 | (4) CALL ,f2d0+runtime.printint
-002026 | (4) PCDATA $0,$-1
-002026 | (4) PCDATA $0,$0
-002026 e865d40000 | (4) CALL ,f490+runtime.printnl
-00202b | (4) PCDATA $0,$-1
-00202b 4883c408 | (5) ADDQ $8,SP
-00202f c3 | (5) RET ,
-...
+$ go build -o x.exe x.go
+$ go tool objdump -s main.main x.exe
+TEXT main.main(SB) /tmp/x.go
+ x.go:3 0x10501c0 65488b0c2530000000 MOVQ GS:0x30, CX
+ x.go:3 0x10501c9 483b6110 CMPQ 0x10(CX), SP
+ x.go:3 0x10501cd 7634 JBE 0x1050203
+ x.go:3 0x10501cf 4883ec10 SUBQ $0x10, SP
+ x.go:3 0x10501d3 48896c2408 MOVQ BP, 0x8(SP)
+ x.go:3 0x10501d8 488d6c2408 LEAQ 0x8(SP), BP
+ x.go:4 0x10501dd e86e45fdff CALL runtime.printlock(SB)
+ x.go:4 0x10501e2 48c7042403000000 MOVQ $0x3, 0(SP)
+ x.go:4 0x10501ea e8e14cfdff CALL runtime.printint(SB)
+ x.go:4 0x10501ef e8ec47fdff CALL runtime.printnl(SB)
+ x.go:4 0x10501f4 e8d745fdff CALL runtime.printunlock(SB)
+ x.go:5 0x10501f9 488b6c2408 MOVQ 0x8(SP), BP
+ x.go:5 0x10501fe 4883c410 ADDQ $0x10, SP
+ x.go:5 0x1050202 c3 RET
+ x.go:3 0x1050203 e83882ffff CALL runtime.morestack_noctxt(SB)
+ x.go:3 0x1050208 ebb6 JMP main.main(SB)
</pre>
--->
-
<h3 id="constants">Constants</h3>
<p>
@@ -266,7 +273,7 @@
</p>
<p>
-In Go object files and binaries, the full name of a symbol is the
+In Go object files and binaries, the full name of a symbol is the
package path followed by a period and the symbol name:
<code>fmt.Printf</code> or <code>math/rand.Int</code>.
Because the assembler's parser treats period and slash as punctuation,
@@ -485,7 +492,7 @@
At the start of the function, the arguments are assumed
to be initialized but the results are assumed uninitialized.
If the results will hold live pointers during a call instruction,
-the function should start by zeroing the results and then
+the function should start by zeroing the results and then
executing the pseudo-instruction <code>GO_RESULTS_INITIALIZED</code>.
This instruction records that the results are now initialized
and should be scanned during stack movement and garbage collection.
@@ -503,7 +510,7 @@
The pointer information can also be omitted if the
function contains no call instructions.
Otherwise, the local stack frame must not contain pointers,
-and the assembly must confirm this fact by executing the
+and the assembly must confirm this fact by executing the
pseudo-instruction <code>NO_LOCAL_POINTERS</code>.
Because stack resizing is implemented by moving the stack,
the stack pointer may change during any function call:
@@ -583,28 +590,38 @@
<p>
The runtime pointer to the <code>g</code> structure is maintained
through the value of an otherwise unused (as far as Go is concerned) register in the MMU.
-A OS-dependent macro <code>get_tls</code> is defined for the assembler if the source includes
-a special header, <code>go_asm.h</code>:
+An OS-dependent macro <code>get_tls</code> is defined for the assembler if the source is
+in the <code>runtime</code> package and includes a special header, <code>go_tls.h</code>:
</p>
<pre>
-#include "go_asm.h"
+#include "go_tls.h"
</pre>
<p>
Within the runtime, the <code>get_tls</code> macro loads its argument register
with a pointer to the <code>g</code> pointer, and the <code>g</code> struct
contains the <code>m</code> pointer.
+There's another special header containing the offsets for each
+element of <code>g</code>, called <code>go_asm.h</code>.
The sequence to load <code>g</code> and <code>m</code> using <code>CX</code> looks like this:
</p>
<pre>
+#include "go_tls.h"
+#include "go_asm.h"
+...
get_tls(CX)
MOVL g(CX), AX // Move g into AX.
MOVL g_m(AX), BX // Move g.m into BX.
</pre>
<p>
+Note: The code above works only in the <code>runtime</code> package, while <code>go_tls.h</code> also
+applies to <a href="#arm">arm</a>, <a href="#amd64">amd64</a> and amd64p32, and <code>go_asm.h</code> applies to all architectures.
+</p>
+
+<p>
Addressing modes:
</p>
diff --git a/doc/code.html b/doc/code.html
index b6d41ef..1e38000 100644
--- a/doc/code.html
+++ b/doc/code.html
@@ -304,12 +304,12 @@
<pre>
$ <b>cd $GOPATH/src/github.com/user/hello</b>
$ <b>git init</b>
-Initialized empty Git repository in /home/user/work/src/github.com/user/hello/.git/
+Initialized empty Git repository in /home/user/go/src/github.com/user/hello/.git/
$ <b>git add hello.go</b>
$ <b>git commit -m "initial commit"</b>
[master (root-commit) 0b4507d] initial commit
- 1 file changed, 1 insertion(+)
- create mode 100644 hello.go
+ 1 file changed, 7 insertion(+)
+ create mode 100644 hello.go
</pre>
<p>
diff --git a/doc/contribute.html b/doc/contribute.html
index 68b2387..abb2b9b 100644
--- a/doc/contribute.html
+++ b/doc/contribute.html
@@ -26,7 +26,7 @@
<h2 id="contributor">Becoming a contributor</h2>
-<h3>Overview</h3>
+<h3 id="contrib_overview">Overview</h3>
<p>
The first step is registering as a Go contributor and configuring your environment.
@@ -46,7 +46,8 @@
<li>
<b>Step 2</b>: Configure authentication credentials for the Go Git repository.
Visit <a href="https://go.googlesource.com/">go.googlesource.com</a>, click
-on "Generate Password" (top right), and follow the instructions.
+on the gear icon (top right), then on "Obtain password", and follow the
+instructions.
</li>
<li>
<b>Step 3</b>: Register for Gerrit, the code review tool used by the Go team,
@@ -237,14 +238,16 @@
</pre>
<p>
-prints help text, not an error.
+prints help text, not an error. If it prints an error, make sure that
+<code>$GOPATH/bin</code> is in your <code>$PATH</code>.
</p>
<p>
On Windows, when using git-bash you must make sure that
<code>git-codereview.exe</code> is in your <code>git</code> exec-path.
Run <code>git --exec-path</code> to discover the right location then create a
-symbolic link or just copy the executable from $GOPATH/bin to this directory.
+symbolic link or just copy the executable from <code>$GOPATH/bin</code> to this
+directory.
</p>
@@ -260,7 +263,7 @@
an <a href="https://golang.org/issues">existing one</a>.
</p>
-<h3>Check the issue tracker</h3>
+<h3 id="check_tracker">Check the issue tracker</h3>
<p>
Whether you already know what contribution to make, or you are searching for
@@ -397,7 +400,7 @@
the flow.
</p>
-<h3>Overview</h3>
+<h3 id="gerrit_overview">Overview</h3>
<p>
This is an overview of the overall process:
@@ -665,7 +668,7 @@
Fixes #159
</pre>
-<h3>First line</h3>
+<h3 id="first_line">First line</h3>
<p>
The first line of the change description is conventionally a short one-line
@@ -683,7 +686,7 @@
Follow the first line by a blank line.
</p>
-<h3>Main content</h3>
+<h3 id="main_content">Main content</h3>
<p>
The rest of the description elaborates and should provide context for the
@@ -701,7 +704,7 @@
benchmark data for change descriptions.
</p>
-<h3>Referencing issues</h3>
+<h3 id="ref_issues">Referencing issues</h3>
<p>
The special notation "Fixes #12345" associates the change with issue 12345 in the
diff --git a/doc/debugging_with_gdb.html b/doc/debugging_with_gdb.html
index 3899ac9..36ec0bd 100644
--- a/doc/debugging_with_gdb.html
+++ b/doc/debugging_with_gdb.html
@@ -149,6 +149,9 @@
(gdb) <b>help goroutine</b></pre>
For example:
<pre>(gdb) <b>goroutine 12 bt</b></pre>
+You can inspect all goroutines by passing <code>all</code> instead of a specific goroutine's ID.
+For example:
+<pre>(gdb) <b>goroutine all bt</b></pre>
</li>
</ul>
diff --git a/doc/devel/release.html b/doc/devel/release.html
index 7a036db..019c4e1 100644
--- a/doc/devel/release.html
+++ b/doc/devel/release.html
@@ -23,6 +23,13 @@
(for example, Go 1.6.1, Go 1.6.2, and so on).
</p>
+<h2 id="go1.13">go1.13 (released 2019/09/03)</h2>
+
+<p>
+Go 1.13 is a major release of Go.
+Read the <a href="/doc/go1.13">Go 1.13 Release Notes</a> for more information.
+</p>
+
<h2 id="go1.12">go1.12 (released 2019/02/25)</h2>
<p>
@@ -30,6 +37,8 @@
Read the <a href="/doc/go1.12">Go 1.12 Release Notes</a> for more information.
</p>
+<h3 id="go1.12.minor">Minor revisions</h3>
+
<p>
go1.12.1 (released 2019/03/14) includes fixes to cgo, the compiler, the go
command, and the <code>fmt</code>, <code>net/smtp</code>, <code>os</code>,
@@ -38,6 +47,64 @@
1.12.1 milestone</a> on our issue tracker for details.
</p>
+<p>
+go1.12.2 (released 2019/04/05) includes fixes to the compiler, the go
+command, the runtime, and the <code>doc</code>, <code>net</code>,
+<code>net/http/httputil</code>, and <code>os</code> packages. See the
+<a href="https://github.com/golang/go/issues?q=milestone%3AGo1.12.2">Go
+1.12.2 milestone</a> on our issue tracker for details.
+</p>
+
+<p>
+go1.12.3 (released 2019/04/08) was accidentally released without its
+intended fix. It is identical to go1.12.2, except for its version
+number. The intended fix is in go1.12.4.
+</p>
+
+<p>
+go1.12.4 (released 2019/04/11) fixes an issue where using the prebuilt binary
+releases on older versions of GNU/Linux
+<a href="https://golang.org/issues/31293">led to failures</a>
+when linking programs that used cgo.
+Only Linux users who hit this issue need to update.
+</p>
+
+<p>
+go1.12.5 (released 2019/05/06) includes fixes to the compiler, the linker,
+the go command, the runtime, and the <code>os</code> package. See the
+<a href="https://github.com/golang/go/issues?q=milestone%3AGo1.12.5">Go
+1.12.5 milestone</a> on our issue tracker for details.
+</p>
+
+<p>
+go1.12.6 (released 2019/06/11) includes fixes to the compiler, the linker,
+the go command, and the <code>crypto/x509</code>, <code>net/http</code>, and
+<code>os</code> packages. See the
+<a href="https://github.com/golang/go/issues?q=milestone%3AGo1.12.6">Go
+1.12.6 milestone</a> on our issue tracker for details.
+</p>
+
+<p>
+go1.12.7 (released 2019/07/08) includes fixes to cgo, the compiler,
+and the linker.
+See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.12.7">Go
+1.12.7 milestone</a> on our issue tracker for details.
+</p>
+
+<p>
+go1.12.8 (released 2019/08/13) includes security fixes to the
+<code>net/http</code> and <code>net/url</code> packages.
+See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.12.8">Go
+1.12.8 milestone</a> on our issue tracker for details.
+</p>
+
+<p>
+go1.12.9 (released 2019/08/15) includes fixes to the linker,
+and the <code>os</code> and <code>math/big</code> packages.
+See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.12.9+label%3ACherryPickApproved">Go
+1.12.9 milestone</a> on our issue tracker for details.
+</p>
+
<h2 id="go1.11">go1.11 (released 2018/08/24)</h2>
<p>
@@ -96,6 +163,52 @@
1.11.6 milestone</a> on our issue tracker for details.
</p>
+<p>
+go1.11.7 (released 2019/04/05) includes fixes to the runtime and the
+<code>net</code> packages. See the
+<a href="https://github.com/golang/go/issues?q=milestone%3AGo1.11.7">Go
+1.11.7 milestone</a> on our issue tracker for details.
+</p>
+
+<p>
+go1.11.8 (released 2019/04/08) was accidentally released without its
+intended fix. It is identical to go1.11.7, except for its version
+number. The intended fix is in go1.11.9.
+</p>
+
+<p>
+go1.11.9 (released 2019/04/11) fixes an issue where using the prebuilt binary
+releases on older versions of GNU/Linux
+<a href="https://golang.org/issues/31293">led to failures</a>
+when linking programs that used cgo.
+Only Linux users who hit this issue need to update.
+</p>
+
+<p>
+go1.11.10 (released 2019/05/06) includes fixes to the runtime and the linker.
+See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.11.10">Go
+1.11.10 milestone</a> on our issue tracker for details.
+</p>
+
+<p>
+go1.11.11 (released 2019/06/11) includes a fix to the <code>crypto/x509</code> package.
+See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.11.11">Go
+1.11.11 milestone</a> on our issue tracker for details.
+</p>
+
+<p>
+go1.11.12 (released 2019/07/08) includes fixes to the compiler and the linker.
+See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.11.12">Go
+1.11.12 milestone</a> on our issue tracker for details.
+</p>
+
+<p>
+go1.11.13 (released 2019/08/13) includes security fixes to the
+<code>net/http</code> and <code>net/url</code> packages.
+See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.11.13">Go
+1.11.13 milestone</a> on our issue tracker for details.
+</p>
+
<h2 id="go1.10">go1.10 (released 2018/02/16)</h2>
<p>
diff --git a/doc/effective_go.html b/doc/effective_go.html
index 3413186..158f39e 100644
--- a/doc/effective_go.html
+++ b/doc/effective_go.html
@@ -1680,13 +1680,15 @@
fmt.Printf("%v\n", timeZone) // or just fmt.Println(timeZone)
</pre>
<p>
-which gives output
+which gives output:
</p>
<pre>
-map[CST:-21600 PST:-28800 EST:-18000 UTC:0 MST:-25200]
+map[CST:-21600 EST:-18000 MST:-25200 PST:-28800 UTC:0]
</pre>
<p>
-For maps the keys may be output in any order, of course.
+For maps, <code>Printf</code> and friends sort the output lexicographically by key.
+</p>
+<p>
When printing a struct, the modified format <code>%+v</code> annotates the
fields of the structure with their names, and for any value the alternate
format <code>%#v</code> prints the value in full Go syntax.
@@ -1710,7 +1712,7 @@
&{7 -2.35 abc def}
&{a:7 b:-2.35 c:abc def}
&main.T{a:7, b:-2.35, c:"abc\tdef"}
-map[string]int{"CST":-21600, "PST":-28800, "EST":-18000, "UTC":0, "MST":-25200}
+map[string]int{"CST":-21600, "EST":-18000, "MST":-25200, "PST":-28800, "UTC":0}
</pre>
<p>
(Note the ampersands.)
@@ -2280,8 +2282,8 @@
<pre>
type Block interface {
BlockSize() int
- Encrypt(src, dst []byte)
- Decrypt(src, dst []byte)
+ Encrypt(dst, src []byte)
+ Decrypt(dst, src []byte)
}
type Stream interface {
diff --git a/doc/go1.10.html b/doc/go1.10.html
index 2974fef..41db36a 100644
--- a/doc/go1.10.html
+++ b/doc/go1.10.html
@@ -12,7 +12,7 @@
-->
<style>
-ul li { margin: 0.5em 0; }
+ main ul li { margin: 0.5em 0; }
</style>
<h2 id="introduction">Introduction to Go 1.10</h2>
diff --git a/doc/go1.11.html b/doc/go1.11.html
index 1d85be9..841ead2 100644
--- a/doc/go1.11.html
+++ b/doc/go1.11.html
@@ -12,7 +12,7 @@
-->
<style>
- ul li { margin: 0.5em 0; }
+ main ul li { margin: 0.5em 0; }
</style>
<h2 id="introduction">Introduction to Go 1.11</h2>
diff --git a/doc/go1.12.html b/doc/go1.12.html
index 2945eb1..a8b0c87 100644
--- a/doc/go1.12.html
+++ b/doc/go1.12.html
@@ -12,7 +12,7 @@
-->
<style>
- ul li { margin: 0.5em 0; }
+ main ul li { margin: 0.5em 0; }
</style>
<h2 id="introduction">Introduction to Go 1.12</h2>
@@ -80,6 +80,10 @@
checks for private API usage. Since it is considered private,
<code>syscall.Getdirentries</code> now always fails with
<code>ENOSYS</code> on iOS.
+ Additionally, <a href="/pkg/syscall/#Setrlimit"><code>syscall.Setrlimit</code></a>
+ reports <code>invalid</code> <code>argument</code> in places where it historically
+ succeeded. These consequences are not specific to Go and users should expect
+ behavioral parity with <code>libSystem</code>'s implementation going forward.
</p>
<h2 id="tools">Tools</h2>
@@ -791,7 +795,7 @@
A new <a href="/pkg/runtime/debug/#BuildInfo"><code>BuildInfo</code></a> type
exposes the build information read from the running binary, available only in
binaries built with module support. This includes the main package path, main
- module information, and the module dependencies. This type is given though the
+ module information, and the module dependencies. This type is given through the
<a href="/pkg/runtime/debug/#ReadBuildInfo"><code>ReadBuildInfo</code></a> function
on <a href="/pkg/runtime/debug/#BuildInfo"><code>BuildInfo</code></a>.
</p>
diff --git a/doc/go1.13.html b/doc/go1.13.html
new file mode 100644
index 0000000..d5809d6
--- /dev/null
+++ b/doc/go1.13.html
@@ -0,0 +1,1059 @@
+<!--{
+ "Title": "Go 1.13 Release Notes",
+ "Path": "/doc/go1.13",
+ "Template": true
+}-->
+
+<!--
+NOTE: In this document and others in this directory, the convention is to
+set fixed-width phrases with non-fixed-width spaces, as in
+<code>hello</code> <code>world</code>.
+Do not send CLs removing the interior tags from such phrases.
+-->
+
+<style>
+ main ul li { margin: 0.5em 0; }
+</style>
+
+<h2 id="introduction">Introduction to Go 1.13</h2>
+
+<p>
+ The latest Go release, version 1.13, arrives six months after <a href="go1.12">Go 1.12</a>.
+ Most of its changes are in the implementation of the toolchain, runtime, and libraries.
+ As always, the release maintains the Go 1 <a href="/doc/go1compat.html">promise of compatibility</a>.
+ We expect almost all Go programs to continue to compile and run as before.
+</p>
+
+<p>
+ As of Go 1.13, the go command by default downloads and authenticates
+ modules using the Go module mirror and Go checksum database run by Google. See
+ <a href="https://proxy.golang.org/privacy">https://proxy.golang.org/privacy</a>
+ for privacy information about these services and the
+ <a href="/cmd/go/#hdr-Module_downloading_and_verification">go command documentation</a>
+ for configuration details including how to disable the use of these servers or use
+ different ones. If you depend on non-public modules, see the
+ <a href="/cmd/go/#hdr-Module_configuration_for_non_public_modules">documentation for configuring your environment</a>.
+</p>
+
+<h2 id="language">Changes to the language</h2>
+
+<p>
+ Per the <a href="https://github.com/golang/proposal/blob/master/design/19308-number-literals.md">number literal proposal</a>,
+ Go 1.13 supports a more uniform and modernized set of number literal prefixes.
+ <ul>
+ <li>
+ <a href="/ref/spec#Integer_literals">Binary integer literals</a>:
+ The prefix <code>0b</code> or <code>0B</code> indicates a binary integer literal
+ such as <code>0b1011</code>.
+ </li>
+
+ <li>
+ <a href="/ref/spec#Integer_literals">Octal integer literals</a>:
+ The prefix <code>0o</code> or <code>0O</code> indicates an octal integer literal
+ such as <code>0o660</code>.
+ The existing octal notation indicated by a leading <code>0</code> followed by
+ octal digits remains valid.
+ </li>
+
+ <li>
+ <a href="/ref/spec#Floating-point_literals">Hexadecimal floating point literals</a>:
+ The prefix <code>0x</code> or <code>0X</code> may now be used to express the mantissa of a
+ floating-point number in hexadecimal format such as <code>0x1.0p-1021</code>.
+ A hexadecimal floating-point number must always have an exponent, written as the letter
+ <code>p</code> or <code>P</code> followed by an exponent in decimal. The exponent scales
+ the mantissa by 2 to the power of the exponent.
+ </li>
+
+ <li>
+ <a href="/ref/spec#Imaginary_literals">Imaginary literals</a>:
+ The imaginary suffix <code>i</code> may now be used with any (binary, decimal, hexadecimal)
+ integer or floating-point literal.
+ </li>
+
+ <li>
+ Digit separators:
+ The digits of any number literal may now be separated (grouped) using underscores, such as
+ in <code>1_000_000</code>, <code>0b_1010_0110</code>, or <code>3.1415_9265</code>.
+ An underscore may appear between any two digits or the literal prefix and the first digit.
+ </li>
+ </ul>
+</p>
+
+<p>
+ Per the <a href="https://github.com/golang/proposal/blob/master/design/19113-signed-shift-counts.md">signed shift counts proposal</a>
+ Go 1.13 removes the restriction that a <a href="/ref/spec#Operators">shift count</a>
+ must be unsigned. This change eliminates the need for many artificial <code>uint</code> conversions,
+ solely introduced to satisfy this (now removed) restriction of the <code><<</code> and <code>>></code> operators.
+</p>
+
+<p>
+ These language changes were implemented by changes to the compiler, and corresponding internal changes to the library
+ packages <code><a href="#go/scanner">go/scanner</a></code> and
+ <code><a href="#text/scanner">text/scanner</a></code> (number literals),
+ and <code><a href="#go/types">go/types</a></code> (signed shift counts).
+</p>
+
+<p>
+ If your code uses modules and your <code>go.mod</code> files specifies a language version, be sure
+ it is set to at least <code>1.13</code> to get access to these language changes.
+ You can do this by editing the <code>go.mod</code> file directly, or you can run
+ <code>go mod edit -go=1.13</code>.
+</p>
+
+<h2 id="ports">Ports</h2>
+
+<p>
+ Go 1.13 is the last release that will run on Native Client (NaCl).
+</p>
+
+<p><!-- CL 170119, CL 168882 -->
+ For <code>GOARCH=wasm</code>, the new environment variable <code>GOWASM</code> takes a comma-separated list of experimental features that the binary gets compiled with.
+ The valid values are documented <a href="/cmd/go/#hdr-Environment_variables">here</a>.
+</p>
+
+<h3 id="aix">AIX</h3>
+
+<p><!-- CL 164003, CL 169120 -->
+ AIX on PPC64 (<code>aix/ppc64</code>) now supports cgo, external
+ linking, and the <code>c-archive</code> and <code>pie</code> build
+ modes.
+</p>
+
+<h3 id="android">Android</h3>
+
+<p><!-- CL 170127 -->
+ Go programs are now compatible with Android 10.
+</p>
+
+<h3 id="darwin">Darwin</h3>
+
+<p>
+ As <a href="go1.12#darwin">announced</a> in the Go 1.12 release notes,
+ Go 1.13 now requires macOS 10.11 El Capitan or later;
+ support for previous versions has been discontinued.
+</p>
+
+<h3 id="freebsd">FreeBSD</h3>
+
+<p>
+ As <a href="go1.12#freebsd">announced</a> in the Go 1.12 release notes,
+ Go 1.13 now requires FreeBSD 11.2 or later;
+ support for previous versions has been discontinued.
+ FreeBSD 12.0 or later requires a kernel with the <code>COMPAT_FREEBSD11</code>
+ option set (this is the default).
+</p>
+
+<h3 id="illumos">Illumos</h3>
+
+<p><!-- CL 174457 -->
+ Go now supports Illumos with <code>GOOS=illumos</code>.
+ The <code>illumos</code> build tag implies the <code>solaris</code>
+ build tag.
+</p>
+
+<h3 id="windows">Windows</h3>
+
+<p><!-- CL 178977 -->
+ The Windows version specified by internally-linked Windows binaries
+ is now Windows 7 rather than NT 4.0. This was already the minimum
+ required version for Go, but can affect the behavior of system calls
+ that have a backwards-compatibility mode. These will now behave as
+ documented. Externally-linked binaries (any program using cgo) have
+ always specified a more recent Windows version.
+</p>
+
+<h2 id="tools">Tools</h2>
+
+<h3 id="modules">Modules</h3>
+
+<h4 id="proxy-vars">Environment variables</h4>
+
+<p><!-- CL 176580 -->
+ The <a href="/cmd/go/#hdr-Module_support"><code>GO111MODULE</code></a>
+ environment variable continues to default to <code>auto</code>, but
+ the <code>auto</code> setting now activates the module-aware mode of
+ the <code>go</code> command whenever the current working directory contains,
+ or is below a directory containing, a <code>go.mod</code> file — even if the
+ current directory is within <code>GOPATH/src</code>. This change simplifies
+ the migration of existing code within <code>GOPATH/src</code> and the ongoing
+ maintenance of module-aware packages alongside non-module-aware importers.
+</p>
+
+<p><!-- CL 181719 -->
+ The new
+ <a href="/cmd/go/#hdr-Module_configuration_for_non_public_modules"><code>GOPRIVATE</code></a>
+ environment variable indicates module paths that are not publicly available.
+ It serves as the default value for the lower-level <code>GONOPROXY</code>
+ and <code>GONOSUMDB</code> variables, which provide finer-grained control over
+ which modules are fetched via proxy and verified using the checksum database.
+</p>
+
+<p><!-- CL 173441, CL 177958 -->
+ The <a href="/cmd/go/#hdr-Module_downloading_and_verification"><code>GOPROXY</code>
+ environment variable</a> may now be set to a comma-separated list of proxy
+ URLs or the special token <code>direct</code>, and
+ its <a href="#introduction">default value</a> is
+ now <code>https://proxy.golang.org,direct</code>. When resolving a package
+ path to its containing module, the <code>go</code> command will try all
+ candidate module paths on each proxy in the list in succession. An unreachable
+ proxy or HTTP status code other than 404 or 410 terminates the search without
+ consulting the remaining proxies.
+</p>
+
+<p>
+ The new
+ <a href="/cmd/go/#hdr-Module_authentication_failures"><code>GOSUMDB</code></a>
+ environment variable identifies the name, and optionally the public key and
+ server URL, of the database to consult for checksums of modules that are not
+ yet listed in the main module's <code>go.sum</code> file.
+ If <code>GOSUMDB</code> does not include an explicit URL, the URL is chosen by
+ probing the <code>GOPROXY</code> URLs for an endpoint indicating support for
+ the checksum database, falling back to a direct connection to the named
+ database if it is not supported by any proxy. If <code>GOSUMDB</code> is set
+ to <code>off</code>, the checksum database is not consulted and only the
+ existing checksums in the <code>go.sum</code> file are verified.
+</p>
+
+<p>
+ Users who cannot reach the default proxy and checksum database (for example,
+ due to a firewalled or sandboxed configuration) may disable their use by
+ setting <code>GOPROXY</code> to <code>direct</code>, and/or
+ <code>GOSUMDB</code> to <code>off</code>.
+ <a href="#go-env-w"><code>go</code> <code>env</code> <code>-w</code></a>
+ can be used to set the default values for these variables independent of
+ platform:
+</p>
+<pre>
+go env -w GOPROXY=direct
+go env -w GOSUMDB=off
+</pre>
+
+<h4 id="go-get"><code>go</code> <code>get</code></h4>
+
+<p><!-- CL 174099 -->
+ In module-aware mode,
+ <a href="/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them"><code>go</code> <code>get</code></a>
+ with the <code>-u</code> flag now updates a smaller set of modules that is
+ more consistent with the set of packages updated by
+ <code>go</code> <code>get</code> <code>-u</code> in GOPATH mode.
+ <code>go</code> <code>get</code> <code>-u</code> continues to update the
+ modules and packages named on the command line, but additionally updates only
+ the modules containing the packages <em>imported by</em> the named packages,
+ rather than the transitive module requirements of the modules containing the
+ named packages.
+</p>
+
+<p>
+ Note in particular that <code>go</code> <code>get</code> <code>-u</code>
+ (without additional arguments) now updates only the transitive imports of the
+ package in the current directory. To instead update all of the packages
+ transitively imported by the main module (including test dependencies), use
+ <code>go</code> <code>get</code> <code>-u</code> <code>all</code>.
+</p>
+
+<p><!-- CL 177879 -->
+ As a result of the above changes to
+ <code>go</code> <code>get</code> <code>-u</code>, the
+ <code>go</code> <code>get</code> subcommand no longer supports
+ the <code>-m</code> flag, which caused <code>go</code> <code>get</code> to
+ stop before loading packages. The <code>-d</code> flag remains supported, and
+ continues to cause <code>go</code> <code>get</code> to stop after downloading
+ the source code needed to build dependencies of the named packages.
+</p>
+
+<p><!-- CL 177677 -->
+ By default, <code>go</code> <code>get</code> <code>-u</code> in module mode
+ upgrades only non-test dependencies, as in GOPATH mode. It now also accepts
+ the <code>-t</code> flag, which (as in GOPATH mode)
+ causes <code>go</code> <code>get</code> to include the packages imported
+ by <em>tests of</em> the packages named on the command line.
+</p>
+
+<p><!-- CL 167747 -->
+ In module-aware mode, the <code>go</code> <code>get</code> subcommand now
+ supports the version suffix <code>@patch</code>. The <code>@patch</code>
+ suffix indicates that the named module, or module containing the named
+ package, should be updated to the highest patch release with the same
+ major and minor versions as the version found in the build list.
+</p>
+
+<p><!-- CL 184440 -->
+ If a module passed as an argument to <code>go</code> <code>get</code>
+ without a version suffix is already required at a newer version than the
+ latest released version, it will remain at the newer version. This is
+ consistent with the behavior of the <code>-u</code> flag for module
+ dependencies. This prevents unexpected downgrades from pre-release versions.
+ The new version suffix <code>@upgrade</code> explicitly requests this
+ behavior. <code>@latest</code> explicitly requests the latest version
+ regardless of the current version.
+</p>
+
+<h4 id="version-validation">Version validation</h4><!-- CL 181881 -->
+
+<p>
+ When extracting a module from a version control system, the <code>go</code>
+ command now performs additional validation on the requested version string.
+</p>
+
+<p>
+ The <code>+incompatible</code> version annotation bypasses the requirement
+ of <a href="/cmd/go/#hdr-Module_compatibility_and_semantic_versioning">semantic
+ import versioning</a> for repositories that predate the introduction of
+ modules. The <code>go</code> command now verifies that such a version does not
+ include an explicit <code>go.mod</code> file.
+</p>
+
+<p>
+ The <code>go</code> command now verifies the mapping
+ between <a href="/cmd/go/#hdr-Pseudo_versions">pseudo-versions</a> and
+ version-control metadata. Specifically:
+ <ul>
+ <li>The version prefix must be of the form <code>vX.0.0</code>, or derived
+ from a tag on an ancestor of the named revision, or derived from a tag that
+ includes <a href="https://semver.org/#spec-item-10">build metadata</a> on
+ the named revision itself.</li>
+
+ <li>The date string must match the UTC timestamp of the revision.</li>
+
+ <li>The short name of the revision must use the same number of characters as
+ what the <code>go</code> command would generate. (For SHA-1 hashes as used
+ by <code>git</code>, a 12-digit prefix.)</li>
+ </ul>
+</p>
+
+<p>
+ If a <code>require</code> directive in the
+ <a href="/cmd/go/#hdr-The_main_module_and_the_build_list">main module</a> uses
+ an invalid pseudo-version, it can usually be corrected by redacting the
+ version to just the commit hash and re-running a <code>go</code> command, such
+ as <code>go</code> <code>list</code> <code>-m</code> <code>all</code>
+ or <code>go</code> <code>mod</code> <code>tidy</code>. For example,
+</p>
+<pre>require github.com/docker/docker v1.14.0-0.20190319215453-e7b5f7dbe98c</pre>
+<p>can be redacted to</p>
+<pre>require github.com/docker/docker e7b5f7dbe98c</pre>
+<p>which currently resolves to</p>
+<pre>require github.com/docker/docker v0.7.3-0.20190319215453-e7b5f7dbe98c</pre>
+
+<p>
+ If one of the transitive dependencies of the main module requires an invalid
+ version or pseudo-version, the invalid version can be replaced with a valid
+ one using a
+ <a href="/cmd/go/#hdr-The_go_mod_file"><code>replace</code> directive</a> in
+ the <code>go.mod</code> file of the main module. If the replacement is a
+ commit hash, it will be resolved to the appropriate pseudo-version as above.
+ For example,
+</p>
+<pre>replace github.com/docker/docker v1.14.0-0.20190319215453-e7b5f7dbe98c => github.com/docker/docker e7b5f7dbe98c</pre>
+<p>currently resolves to</p>
+<pre>replace github.com/docker/docker v1.14.0-0.20190319215453-e7b5f7dbe98c => github.com/docker/docker v0.7.3-0.20190319215453-e7b5f7dbe98c</pre>
+
+<h3 id="go-command">Go command</h3>
+
+<p id="go-env-w"><!-- CL 171137 -->
+ The <a href="/cmd/go/#hdr-Environment_variables"><code>go</code> <code>env</code></a>
+ command now accepts a <code>-w</code> flag to set the per-user default value
+ of an environment variable recognized by the
+ <code>go</code> command, and a corresponding <code>-u</code> flag to unset a
+ previously-set default. Defaults set via
+ <code>go</code> <code>env</code> <code>-w</code> are stored in the
+ <code>go/env</code> file within
+ <a href="/pkg/os/#UserConfigDir"><code>os.UserConfigDir()</code></a>.
+</p>
+
+<p id="go-version-exe"><!-- CL 173343 -->
+ The <a href="/cmd/go/#hdr-Print_Go_version">
+ <code>go</code> <code>version</code></a> command now accepts arguments naming
+ executables and directories. When invoked on an executable,
+ <code>go</code> <code>version</code> prints the version of Go used to build
+ the executable. If the <code>-m</code> flag is used,
+ <code>go</code> <code>version</code> prints the executable's embedded module
+ version information, if available. When invoked on a directory,
+ <code>go</code> <code>version</code> prints information about executables
+ contained in the directory and its subdirectories.
+</p>
+
+<p id="trimpath"><!-- CL 173345 -->
+ The new <a href="/cmd/go/#hdr-Compile_packages_and_dependencies"><code>go</code>
+ <code>build</code> flag</a> <code>-trimpath</code> removes all file system paths
+ from the compiled executable, to improve build reproducibility.
+</p>
+
+<p id="o-dir"><!-- CL 167679 -->
+ If the <code>-o</code> flag passed to <code>go</code> <code>build</code>
+ refers to an existing directory, <code>go</code> <code>build</code> will now
+ write executable files within that directory for <code>main</code> packages
+ matching its package arguments.
+</p>
+
+<p id="comma-separated-tags"><!-- CL 173438 -->
+ The <code>go</code> <code>build</code> flag <code>-tags</code> now takes a
+ comma-separated list of build tags, to allow for multiple tags in
+ <a href="/cmd/go/#hdr-Environment_variables"><code>GOFLAGS</code></a>. The
+ space-separated form is deprecated but still recognized and will be maintained.
+</p>
+
+<p id="go-generate-tag"><!-- CL 175983 -->
+ <a href="/cmd/go/#hdr-Generate_Go_files_by_processing_source"><code>go</code>
+ <code>generate</code></a> now sets the <code>generate</code> build tag so that
+ files may be searched for directives but ignored during build.
+</p>
+
+<p id="binary-only"><!-- CL 165746 -->
+ As <a href="/doc/go1.12#binary-only">announced</a> in the Go 1.12 release
+ notes, binary-only packages are no longer supported. Building a binary-only
+ package (marked with a <code>//go:binary-only-package</code> comment) now
+ results in an error.
+</p>
+
+<h3 id="compiler">Compiler toolchain</h3>
+
+<p><!-- CL 170448 -->
+ The compiler has a new implementation of escape analysis that is
+ more precise. For most Go code should be an improvement (in other
+ words, more Go variables and expressions allocated on the stack
+ instead of heap). However, this increased precision may also break
+ invalid code that happened to work before (for example, code that
+ violates
+ the <a href="/pkg/unsafe/#Pointer"><code>unsafe.Pointer</code>
+ safety rules</a>). If you notice any regressions that appear
+ related, the old escape analysis pass can be re-enabled
+ with <code>go</code> <code>build</code> <code>-gcflags=all=-newescape=false</code>.
+ The option to use the old escape analysis will be removed in a
+ future release.
+</p>
+
+<p><!-- CL 161904 -->
+ The compiler no longer emits floating point or complex constants
+ to <code>go_asm.h</code> files. These have always been emitted in a
+ form that could not be used as numeric constant in assembly code.
+</p>
+
+<h3 id="assembler">Assembler</h3>
+
+<p><!-- CL 157001 -->
+ The assembler now supports many of the atomic instructions
+ introduced in ARM v8.1.
+</p>
+
+<h3 id="gofmt">gofmt</h3>
+
+<p>
+ <code>gofmt</code> (and with that <code>go fmt</code>) now canonicalizes
+ number literal prefixes and exponents to use lower-case letters, but
+ leaves hexadecimal digits alone. This improves readability when using the new octal prefix
+ (<code>0O</code> becomes <code>0o</code>), and the rewrite is applied consistently.
+ <code>gofmt</code> now also removes unnecessary leading zeroes from a decimal integer
+ imaginary literal. (For backwards-compatibility, an integer imaginary literal
+ starting with <code>0</code> is considered a decimal, not an octal number.
+ Removing superfluous leading zeroes avoids potential confusion.)
+ For instance, <code>0B1010</code>, <code>0XabcDEF</code>, <code>0O660</code>,
+ <code>1.2E3</code>, and <code>01i</code> become <code>0b1010</code>, <code>0xabcDEF</code>,
+ <code>0o660</code>, <code>1.2e3</code>, and <code>1i</code> after applying <code>gofmt</code>.
+</p>
+
+<h3 id="godoc"><code>godoc</code> and <code>go</code> <code>doc</code></h3>
+
+<p><!-- CL 174322 -->
+ The <code>godoc</code> webserver is no longer included in the main binary distribution.
+ To run the <code>godoc</code> webserver locally, manually install it first:
+<pre>
+go get golang.org/x/tools/cmd/godoc
+godoc
+</pre>
+</p>
+
+<p><!-- CL 177797 -->
+ The
+ <a href="/cmd/go/#hdr-Show_documentation_for_package_or_symbol"><code>go</code> <code>doc</code></a>
+ command now always includes the package clause in its output, except for
+ commands. This replaces the previous behavior where a heuristic was used,
+ causing the package clause to be omitted under certain conditions.
+</p>
+
+<h2 id="runtime">Runtime</h2>
+
+<p><!-- CL 161477 -->
+ Out of range panic messages now include the index that was out of
+ bounds and the length (or capacity) of the slice. For
+ example, <code>s[3]</code> on a slice of length 1 will panic with
+ "runtime error: index out of range [3] with length 1".
+</p>
+
+<p><!-- CL 171758 -->
+ This release improves performance of most uses of <code>defer</code>
+ by 30%.
+</p>
+
+<p><!-- CL 142960 -->
+ The runtime is now more aggressive at returning memory to the
+ operating system to make it available to co-tenant applications.
+ Previously, the runtime could retain memory for five or more minutes
+ following a spike in the heap size. It will now begin returning it
+ promptly after the heap shrinks. However, on many OSes, including
+ Linux, the OS itself reclaims memory lazily, so process RSS will not
+ decrease until the system is under memory pressure.
+</p>
+
+<h2 id="library">Core library</h2>
+
+<h3 id="tls_1_3">TLS 1.3</h3>
+
+<p>
+ As announced in Go 1.12, Go 1.13 enables support for TLS 1.3 in the
+ <code>crypto/tls</code> package by default. It can be disabled by adding the
+ value <code>tls13=0</code> to the <code>GODEBUG</code>
+ environment variable. The opt-out will be removed in Go 1.14.
+</p>
+
+<p>
+ See <a href="/doc/go1.12#tls_1_3">the Go 1.12 release notes</a> for important
+ compatibility information.
+</p>
+
+<h3 id="crypto/ed25519"><a href="/pkg/crypto/ed25519/">crypto/ed25519</a></h3>
+
+<p><!-- CL 174945, 182698 -->
+ The new <a href="/pkg/crypto/ed25519/"><code>crypto/ed25519</code></a>
+ package implements the Ed25519 signature
+ scheme. This functionality was previously provided by the
+ <a href="https://godoc.org/golang.org/x/crypto/ed25519"><code>golang.org/x/crypto/ed25519</code></a>
+ package, which becomes a wrapper for
+ <code>crypto/ed25519</code> when used with Go 1.13+.
+</p>
+
+<h3 id="error_wrapping">Error wrapping</h3>
+
+<p><!-- CL 163558, 176998 -->
+ Go 1.13 contains support for error wrapping, as first proposed in
+ the <a href="https://go.googlesource.com/proposal/+/master/design/29934-error-values.md">
+ Error Values proposal</a> and discussed on <a href="https://golang.org/issue/29934">the
+ associated issue</a>.
+</p>
+<p>
+ An error <code>e</code> can <em>wrap</em> another error <code>w</code> by providing
+ an <code>Unwrap</code> method that returns <code>w</code>. Both <code>e</code>
+ and <code>w</code> are available to programs, allowing <code>e</code> to provide
+ additional context to <code>w</code> or to reinterpret it while still allowing
+ programs to make decisions based on <code>w</code>.
+</p>
+<p>
+ To support wrapping, <a href="#fmt"><code>fmt.Errorf</code></a> now has a <code>%w</code>
+ verb for creating wrapped errors, and three new functions in
+ the <a href="#errors"><code>errors</code></a> package (
+ <a href="/pkg/errors/#Unwrap"><code>errors.Unwrap</code></a>,
+ <a href="/pkg/errors/#Is"><code>errors.Is</code></a> and
+ <a href="/pkg/errors/#As"><code>errors.As</code></a>) simplify unwrapping
+ and inspecting wrapped errors.
+</p>
+<p>
+ For more information, read the <a href="/pkg/errors/"><code>errors</code> package
+ documentation</a>, or see
+ the <a href="https://golang.org/wiki/ErrorValueFAQ">Error Value FAQ</a>.
+ There will soon be a blog post as well.
+</p>
+
+<h3 id="minor_library_changes">Minor changes to the library</h3>
+
+<p>
+ As always, there are various minor changes and updates to the library,
+ made with the Go 1 <a href="/doc/go1compat">promise of compatibility</a>
+ in mind.
+</p>
+
+<dl id="bytes"><dt><a href="/pkg/bytes/">bytes</a></dt>
+ <dd>
+ <p>
+ The new <a href="/pkg/bytes/#ToValidUTF8"><code>ToValidUTF8</code></a> function returns a
+ copy of a given byte slice with each run of invalid UTF-8 byte sequences replaced by a given slice.
+ </p>
+
+</dl><!-- bytes -->
+
+<dl id="context"><dt><a href="/pkg/context/">context</a></dt>
+ <dd>
+ <p><!-- CL 169080 -->
+ The formatting of contexts returned by <a href="/pkg/context/#WithValue"><code>WithValue</code></a> no longer depends on <code>fmt</code> and will not stringify in the same way. Code that depends on the exact previous stringification might be affected.
+ </p>
+
+</dl><!-- context -->
+
+<dl id="crypto/tls"><dt><a href="/pkg/crypto/tls/">crypto/tls</a></dt>
+ <dd>
+ <p>
+ Support for SSL version 3.0 (SSLv3) <a href="https://golang.org/issue/32716">
+ is now deprecated and will be removed in Go 1.14</a>. Note that SSLv3 is the
+ <a href="https://tools.ietf.org/html/rfc7568">cryptographically broken</a>
+ protocol predating TLS.
+ </p>
+
+ <p>
+ SSLv3 was always disabled by default, other than in Go 1.12, when it was
+ mistakenly enabled by default server-side. It is now again disabled by
+ default. (SSLv3 was never supported client-side.)
+ </p>
+
+ <p><!-- CL 177698 -->
+ Ed25519 certificates are now supported in TLS versions 1.2 and 1.3.
+ </p>
+
+</dl><!-- crypto/tls -->
+
+<dl id="crypto/x509"><dt><a href="/pkg/crypto/x509/">crypto/x509</a></dt>
+ <dd>
+ <p><!-- CL 175478 -->
+ Ed25519 keys are now supported in certificates and certificate requests
+ according to <a href="https://www.rfc-editor.org/info/rfc8410">RFC 8410</a>, as well as by the
+ <a href="/pkg/crypto/x509/#ParsePKCS8PrivateKey"><code>ParsePKCS8PrivateKey</code></a>,
+ <a href="/pkg/crypto/x509/#MarshalPKCS8PrivateKey"><code>MarshalPKCS8PrivateKey</code></a>,
+ and <a href="/pkg/crypto/x509/#ParsePKIXPublicKey"><code>ParsePKIXPublicKey</code></a> functions.
+ </p>
+
+ <p><!-- CL 169238 -->
+ The paths searched for system roots now include <code>/etc/ssl/cert.pem</code>
+ to support the default location in Alpine Linux 3.7+.
+ </p>
+
+</dl><!-- crypto/x509 -->
+
+<dl id="database/sql"><dt><a href="/pkg/database/sql/">database/sql</a></dt>
+ <dd>
+ <p><!-- CL 170699 -->
+ The new <a href="/pkg/database/sql/#NullTime"><code>NullTime</code></a> type represents a <code>time.Time</code> that may be null.
+ </p>
+
+ <p><!-- CL 174178 -->
+ The new <a href="/pkg/database/sql/#NullInt32"><code>NullInt32</code></a> type represents an <code>int32</code> that may be null.
+ </p>
+
+</dl><!-- database/sql -->
+
+<dl id="debug/dwarf"><dt><a href="/pkg/debug/dwarf/">debug/dwarf</a></dt>
+ <dd>
+ <p><!-- CL 158797 -->
+ The <a href="/pkg/debug/dwarf/#Data.Type"><code>Data.Type</code></a>
+ method no longer panics if it encounters an unknown DWARF tag in
+ the type graph. Instead, it represents that component of the
+ type with
+ an <a href="/pkg/debug/dwarf/#UnsupportedType"><code>UnsupportedType</code></a>
+ object.
+ </p>
+
+</dl><!-- debug/dwarf -->
+
+<dl id="errors"><dt><a href="/pkg/errors/">errors</a></dt>
+ <dd>
+ <!-- CL 163558 -->
+ <p>
+ The new function <a href="/pkg/errors/#As"><code>As</code></a> finds the first
+ error in a given error’s chain (sequence of wrapped errors)
+ that matches a given target’s type, and if so, sets the target to that error value.
+ </p>
+ <p>
+ The new function <a href="/pkg/errors/#Is"><code>Is</code></a> reports whether a given error value matches an
+ error in another’s chain.
+ </p>
+ <p>
+ The new function <a href="/pkg/errors/#Unwrap"><code>Unwrap</code></a> returns the result of calling
+ <code>Unwrap</code> on a given error, if one exists.
+ </p>
+
+</dl><!-- errors -->
+
+<dl id="fmt"><dt><a href="/pkg/fmt/">fmt</a></dt>
+ <dd>
+ <!-- CL 160245 -->
+ <p>
+ The printing verbs <code>%x</code> and <code>%X</code> now format floating-point and
+ complex numbers in hexadecimal notation, in lower-case and upper-case respectively.
+ </p>
+
+ <!-- CL 160246 -->
+ <p>
+ The new printing verb <code>%O</code> formats integers in base 8, emitting the <code>0o</code> prefix.
+ </p>
+
+ <!-- CL 160247 -->
+ <p>
+ The scanner now accepts hexadecimal floating-point values, digit-separating underscores
+ and leading <code>0b</code> and <code>0o</code> prefixes.
+ See the <a href="#language">Changes to the language</a> for details.
+ </p>
+
+ <!-- CL 176998 -->
+ <p>The <a href="/pkg/fmt/#Errorf"><code>Errorf</code></a> function
+ has a new verb, <code>%w</code>, whose operand must be an error.
+ The error returned from <code>Errorf</code> will have an
+ <code>Unwrap</code> method which returns the operand of <code>%w</code>.
+ </p>
+
+</dl><!-- fmt -->
+
+
+<dl id="go/scanner"><dt><a href="/pkg/go/scanner/">go/scanner</a></dt>
+ <dd>
+ <p><!-- CL 175218 -->
+ The scanner has been updated to recognize the new Go number literals, specifically
+ binary literals with <code>0b</code>/<code>0B</code> prefix, octal literals with <code>0o</code>/<code>0O</code> prefix,
+ and floating-point numbers with hexadecimal mantissa. The imaginary suffix <code>i</code> may now be used with any number
+ literal, and underscores may used as digit separators for grouping.
+ See the <a href="#language">Changes to the language</a> for details.
+ </p>
+
+ </dl><!-- go/scanner -->
+
+<dl id="go/types"><dt><a href="/pkg/go/types/">go/types</a></dt>
+ <dd>
+ <p>
+ The type-checker has been updated to follow the new rules for integer shifts.
+ See the <a href="#language">Changes to the language</a> for details.
+ </p>
+
+</dl><!-- go/types -->
+
+
+
+<dl id="html/template"><dt><a href="/pkg/html/template/">html/template</a></dt>
+ <dd>
+ <p><!-- CL 175218 -->
+ When using a <code><script></code> tag with "module" set as the
+ type attribute, code will now be interpreted as <a href="https://html.spec.whatwg.org/multipage/scripting.html#the-script-element:module-script-2">JavaScript module script</a>.
+ </p>
+
+</dl><!-- html/template -->
+
+<dl id="log"><dt><a href="/pkg/log/">log</a></dt>
+ <dd>
+ <p><!-- CL 168920 -->
+ The new <a href="/pkg/log/#Writer"><code>Writer</code></a> function returns the output destination for the standard logger.
+ </p>
+
+</dl><!-- log -->
+
+<dl id="math/big"><dt><a href="/pkg/math/big/">math/big</a></dt>
+ <dd>
+ <p><!-- CL 160682 -->
+ The new <a href="/pkg/math/big/#Rat.SetUint64"><code>Rat.SetUint64</code></a> method sets the <code>Rat</code> to a <code>uint64</code> value.
+ </p>
+
+ <p><!-- CL 166157 -->
+ For <a href="/pkg/math/big/#Float.Parse"><code>Float.Parse</code></a>, if base is 0, underscores
+ may be used between digits for readability.
+ See the <a href="#language">Changes to the language</a> for details.
+ </p>
+
+ <p><!-- CL 166157 -->
+ For <a href="/pkg/math/big/#Int.SetString"><code>Int.SetString</code></a>, if base is 0, underscores
+ may be used between digits for readability.
+ See the <a href="#language">Changes to the language</a> for details.
+ </p>
+
+ <p><!-- CL 168237 -->
+ <a href="/pkg/math/big/#Rat.SetString"><code>Rat.SetString</code></a> now accepts non-decimal floating point representations.
+ </p>
+
+</dl><!-- math/big -->
+
+<dl id="math/bits"><dt><a href="/pkg/math/bits/">math/bits</a></dt>
+ <dd>
+ <p><!-- CL 178177 -->
+ The execution time of <a href="/pkg/math/bits/#Add"><code>Add</code></a>,
+ <a href="/pkg/math/bits/#Sub"><code>Sub</code></a>,
+ <a href="/pkg/math/bits/#Mul"><code>Mul</code></a>,
+ <a href="/pkg/math/bits/#RotateLeft"><code>RotateLeft</code></a>, and
+ <a href="/pkg/math/bits/#ReverseBytes"><code>ReverseBytes</code></a> is now
+ guaranteed to be independent of the inputs.
+ </p>
+
+</dl><!-- math/bits -->
+
+<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
+ <dd>
+ <p><!-- CL 156366 -->
+ On Unix systems where <code>use-vc</code> is set in <code>resolv.conf</code>, TCP is used for DNS resolution.
+ </p>
+
+ <p><!-- CL 170678 -->
+ The new field <a href="/pkg/net/#ListenConfig.KeepAlive"><code>ListenConfig.KeepAlive</code></a>
+ specifies the keep-alive period for network connections accepted by the listener.
+ If this field is 0 (the default) TCP keep-alives will be enabled.
+ To disable them, set it to a negative value.
+ </p>
+ <p>
+ Note that the error returned from I/O on a connection that was
+ closed by a keep-alive timeout will have a
+ <code>Timeout</code> method that returns <code>true</code> if called.
+ This can make a keep-alive error difficult to distinguish from
+ an error returned due to a missed deadline as set by the
+ <a href="/pkg/net/#Conn"><code>SetDeadline</code></a>
+ method and similar methods.
+ Code that uses deadlines and checks for them with
+ the <code>Timeout</code> method or
+ with <a href="/pkg/os/#IsTimeout"><code>os.IsTimeout</code></a>
+ may want to disable keep-alives, or
+ use <code>errors.Is(syscall.ETIMEDOUT)</code> (on Unix systems)
+ which will return true for a keep-alive timeout and false for a
+ deadline timeout.
+ </p>
+
+</dl><!-- net -->
+
+<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
+ <dd>
+ <p><!-- CL 76410 -->
+ The new fields <a href="/pkg/net/http/#Transport.WriteBufferSize"><code>Transport.WriteBufferSize</code></a>
+ and <a href="/pkg/net/http/#Transport.ReadBufferSize"><code>Transport.ReadBufferSize</code></a>
+ allow one to specify the sizes of the write and read buffers for a <a href="/pkg/net/http/#Transport"><code>Transport</code></a>.
+ If either field is zero, a default size of 4KB is used.
+ </p>
+
+ <p><!-- CL 130256 -->
+ The new field <a href="/pkg/net/http/#Transport.ForceAttemptHTTP2"><code>Transport.ForceAttemptHTTP2</code></a>
+ controls whether HTTP/2 is enabled when a non-zero <code>Dial</code>, <code>DialTLS</code>, or <code>DialContext</code>
+ func or <code>TLSClientConfig</code> is provided.
+ </p>
+
+ <p><!-- CL 140357 -->
+ <a href="/pkg/net/http/#Transport.MaxConnsPerHost"><code>Transport.MaxConnsPerHost</code></a> now works
+ properly with HTTP/2.
+ </p>
+
+ <p><!-- CL 154383 -->
+ <a href="/pkg/net/http/#TimeoutHandler"><code>TimeoutHandler</code></a>'s
+ <a href="/pkg/net/http/#ResponseWriter"><code>ResponseWriter</code></a> now implements the
+ <a href="/pkg/net/http/#Pusher"><code>Pusher</code></a> and <a href="/pkg/net/http/#Flusher"><code>Flusher</code></a> interfaces.
+ </p>
+
+ <p><!-- CL 157339 -->
+ The <code>StatusCode</code> <code>103</code> <code>"Early Hints"</code> has been added.
+ </p>
+
+ <p><!-- CL 163599 -->
+ <a href="/pkg/net/http/#Transport"><code>Transport</code></a> now uses the <a href="/pkg/net/http/#Request.Body"><code>Request.Body</code></a>'s
+ <a href="/pkg/io/#ReaderFrom"><code>io.ReaderFrom</code></a> implementation if available, to optimize writing the body.
+ </p>
+
+ <p><!-- CL 167017 -->
+ On encountering unsupported transfer-encodings, <a href="/pkg/net/http/#Server"><code>http.Server</code></a> now
+ returns a "501 Unimplemented" status as mandated by the HTTP specification <a href="https://tools.ietf.org/html/rfc7230#section-3.3.1">RFC 7230 Section 3.3.1</a>.
+ </p>
+
+ <p><!-- CL 167681 -->
+ The new <a href="/pkg/net/http/#Server"><code>Server</code></a> fields
+ <a href="/pkg/net/http/#Server.BaseContext"><code>BaseContext</code></a> and
+ <a href="/pkg/net/http/#Server.ConnContext"><code>ConnContext</code></a>
+ allow finer control over the <a href="/pkg/context/#Context"><code>Context</code></a> values provided to requests and connections.
+ </p>
+
+ <p><!-- CL 167781 -->
+ <a href="/pkg/net/http/#DetectContentType"><code>http.DetectContentType</code></a> now correctly detects RAR signatures, and can now also detect RAR v5 signatures.
+ </p>
+
+ <p><!-- CL 173658 -->
+ The new <a href="/pkg/net/http/#Header"><code>Header</code></a> method
+ <a href="/pkg/net/http/#Header.Clone"><code>Clone</code></a> returns a copy of the receiver.
+ </p>
+
+ <p><!-- CL 174324 -->
+ A new function <a href="/pkg/net/http/#NewRequestWithContext"><code>NewRequestWithContext</code></a> has been added and it
+ accepts a <a href="/pkg/context/#Context"><code>Context</code></a> that controls the entire lifetime of
+ the created outgoing <a href="/pkg/net/http/#Request"><code>Request</code></a>, suitable for use with
+ <a href="/pkg/net/http/#Client.Do"><code>Client.Do</code></a> and <a href="/pkg/net/http/#Transport.RoundTrip"><code>Transport.RoundTrip</code></a>.
+ </p>
+
+ <p><!-- CL 179457 -->
+ The <a href="/pkg/net/http/#Transport"><code>Transport</code></a> no longer logs errors when servers
+ gracefully shut down idle connections using a <code>"408 Request Timeout"</code> response.
+ </p>
+
+</dl><!-- net/http -->
+
+<dl id="os"><dt><a href="/pkg/os/">os</a></dt>
+ <dd>
+ <p><!-- CL 160877 -->
+ The new <a href="/pkg/os/#UserConfigDir"><code>UserConfigDir</code></a> function
+ returns the default directory to use for user-specific configuration data.
+ </p>
+
+ <p><!-- CL 166578 -->
+ If a <a href="/pkg/os/#File"><code>File</code></a> is opened using the O_APPEND flag, its
+ <a href="/pkg/os/#File.WriteAt"><code>WriteAt</code></a> method will always return an error.
+ </p>
+
+</dl><!-- os -->
+
+<dl id="os/exec"><dt><a href="/pkg/os/exec/">os/exec</a></dt>
+ <dd>
+ <p><!-- CL 174318 -->
+ On Windows, the environment for a <a href="/pkg/os/exec/#Cmd"><code>Cmd</code></a> always inherits the
+ <code>%SYSTEMROOT%</code> value of the parent process unless the
+ <a href="/pkg/os/exec/#Cmd.Env"><code>Cmd.Env</code></a> field includes an explicit value for it.
+ </p>
+
+</dl><!-- os/exec -->
+
+<dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
+ <dd>
+ <p><!-- CL 171337 -->
+ The new <a href="/pkg/reflect/#Value.IsZero"><code>Value.IsZero</code></a> method reports whether a <code>Value</code> is the zero value for its type.
+ </p>
+
+ <p><!-- CL 174531 -->
+ The <a href="/pkg/reflect/#MakeFunc"><code>MakeFunc</code></a> function now allows assignment conversions on returned values, instead of requiring exact type match. This is particularly useful when the type being returned is an interface type, but the value actually returned is a concrete value implementing that type.
+ </p>
+
+</dl><!-- reflect -->
+
+<dl id="runtime"><dt><a href="/pkg/runtime/">runtime</a></dt>
+ <dd>
+ <p> <!-- CL 167780 -->
+ Tracebacks, <a href="/pkg/runtime/#Caller"><code>runtime.Caller</code></a>,
+ and <a href="/pkg/runtime/#Callers"><code>runtime.Callers</code></a> now refer to the function that
+ initializes the global variables of <code>PKG</code>
+ as <code>PKG.init</code> instead of <code>PKG.init.ializers</code>.
+ </p>
+
+</dl><!-- runtime -->
+
+<dl id="strconv"><dt><a href="/pkg/strconv/">strconv</a></dt>
+ <dd>
+ <p><!-- CL 160243 -->
+ For <a href="/pkg/strconv/#ParseFloat"><code>strconv.ParseFloat</code></a>,
+ <a href="/pkg/strconv/#ParseInt"><code>strconv.ParseInt</code></a>
+ and <a href="/pkg/strconv/#ParseUint"><code>strconv.ParseUint</code></a>,
+ if base is 0, underscores may be used between digits for readability.
+ See the <a href="#language">Changes to the language</a> for details.
+ </p>
+
+</dl><!-- strconv -->
+
+<dl id="strings"><dt><a href="/pkg/strings/">strings</a></dt>
+ <dd>
+ <p><!-- CL 142003 -->
+ The new <a href="/pkg/strings/#ToValidUTF8"><code>ToValidUTF8</code></a> function returns a
+ copy of a given string with each run of invalid UTF-8 byte sequences replaced by a given string.
+ </p>
+
+</dl><!-- strings -->
+
+<dl id="sync"><dt><a href="/pkg/sync/">sync</a></dt>
+ <dd>
+ <p><!-- CL 148958, CL 148959, CL 152697, CL 152698 -->
+ The fast paths of <a href="/pkg/sync/#Mutex.Lock"><code>Mutex.Lock</code></a>, <a href="/pkg/sync/#Mutex.Unlock"><code>Mutex.Unlock</code></a>,
+ <a href="/pkg/sync/#RWMutex.Lock"><code>RWMutex.Lock</code></a>, <a href="/pkg/sync/#Mutex.RUnlock"><code>RWMutex.RUnlock</code></a>, and
+ <a href="/pkg/sync/#Once.Do"><code>Once.Do</code></a> are now inlined in their callers.
+ For the uncontended cases on amd64, these changes make <a href="/pkg/sync/#Once.Do"><code>Once.Do</code></a> twice as fast, and the
+ <a href="/pkg/sync/#Mutex"><code>Mutex</code></a>/<a href="/pkg/sync/#RWMutex"><code>RWMutex</code></a> methods up to 10% faster.
+ </p>
+
+ <p><!-- CL 166960 -->
+ Large <a href="/pkg/sync/#Pool"><code>Pool</code></a> no longer increase stop-the-world pause times.
+ </p>
+
+ <p><!-- CL 166961 -->
+ <code>Pool</code> no longer needs to be completely repopulated after every GC. It now retains some objects across GCs,
+ as opposed to releasing all objects, reducing load spikes for heavy users of <code>Pool</code>.
+ </p>
+
+</dl><!-- sync -->
+
+<dl id="syscall"><dt><a href="/pkg/syscall/">syscall</a></dt>
+ <dd>
+ <p><!-- CL 168479 -->
+ Uses of <code>_getdirentries64</code> have been removed from
+ Darwin builds, to allow Go binaries to be uploaded to the macOS
+ App Store.
+ </p>
+
+ <p><!-- CL 174197 -->
+ The new <code>ProcessAttributes</code> and <code>ThreadAttributes</code> fields in
+ <a href="/pkg/syscall/?GOOS=windows#SysProcAttr"><code>SysProcAttr</code></a> have been introduced for Windows,
+ exposing security settings when creating new processes.
+ </p>
+
+ <p><!-- CL 174320 -->
+ <code>EINVAL</code> is no longer returned in zero
+ <a href="/pkg/syscall/?GOOS=windows#Chmod"><code>Chmod</code></a> mode on Windows.
+ </p>
+
+</dl><!-- syscall -->
+
+<dl id="syscall/js"><dt><a href="/pkg/syscall/js/">syscall/js</a></dt>
+ <dd>
+ <p><!-- CL 177537 -->
+ <code>TypedArrayOf</code> has been replaced by
+ <a href="/pkg/syscall/js/#CopyBytesToGo"><code>CopyBytesToGo</code></a> and
+ <a href="/pkg/syscall/js/#CopyBytesToJS"><code>CopyBytesToJS</code></a> for copying bytes
+ between a byte slice and a <code>Uint8Array</code>.
+ </p>
+
+</dl><!-- syscall/js -->
+
+<dl id="testing"><dt><a href="/pkg/testing/">testing</a></dt>
+ <dd>
+ <p><!-- CL 112155 -->
+ When running benchmarks, <a href="/pkg/testing/#B.N"><code>B.N</code></a> is no longer rounded.
+ </p>
+
+ <p><!-- CL 166717 -->
+ The new method <a href="/pkg/testing/#B.ReportMetric"><code>B.ReportMetric</code></a> lets users report
+ custom benchmark metrics and override built-in metrics.
+ </p>
+
+ <p><!-- CL 173722 -->
+ Testing flags are now registered in the new <a href="/pkg/testing/#Init"><code>Init</code></a> function,
+ which is invoked by the generated <code>main</code> function for the test.
+ As a result, testing flags are now only registered when running a test binary,
+ and packages that call <code>flag.Parse</code> during package initialization may cause tests to fail.
+ </p>
+
+</dl><!-- testing -->
+
+<dl id="text/scanner"><dt><a href="/pkg/text/scanner/">text/scanner</a></dt>
+ <dd>
+ <p><!-- CL 183077 -->
+ The scanner has been updated to recognize the new Go number literals, specifically
+ binary literals with <code>0b</code>/<code>0B</code> prefix, octal literals with <code>0o</code>/<code>0O</code> prefix,
+ and floating-point numbers with hexadecimal mantissa.
+ Also, the new <a href="/pkg/text/scanner/#AllowDigitSeparators"><code>AllowDigitSeparators</code></a>
+ mode allows number literals to contain underscores as digit separators (off by default for backwards-compatibility).
+ See the <a href="#language">Changes to the language</a> for details.
+ </p>
+
+</dl><!-- text/scanner -->
+
+<dl id="text/template"><dt><a href="/pkg/text/template/">text/template</a></dt>
+ <dd>
+ <p><!-- CL 161762 -->
+ The new <a href="/pkg/text/template/#hdr-Functions">slice function</a>
+ returns the result of slicing its first argument by the following arguments.
+ </p>
+
+</dl><!-- text/template -->
+
+<dl id="time"><dt><a href="/pkg/time/">time</a></dt>
+ <dd>
+ <p><!-- CL 122876 -->
+ Day-of-year is now supported by <a href="/pkg/time/#Time.Format"><code>Format</code></a>
+ and <a href="/pkg/time/#Parse"><code>Parse</code></a>.
+ </p>
+
+ <p><!-- CL 167387 -->
+ The new <a href="/pkg/time/#Duration"><code>Duration</code></a> methods
+ <a href="/pkg/time/#Duration.Microseconds"><code>Microseconds</code></a> and
+ <a href="/pkg/time/#Duration.Milliseconds"><code>Milliseconds</code></a> return
+ the duration as an integer count of their respectively named units.
+ </p>
+
+</dl><!-- time -->
+
+<dl id="unicode"><dt><a href="/pkg/unicode/">unicode</a></dt>
+ <dd>
+ <p>
+ The <a href="/pkg/unicode/"><code>unicode</code></a> package and associated
+ support throughout the system has been upgraded from Unicode 10.0 to
+ <a href="http://www.unicode.org/versions/Unicode11.0.0/">Unicode 11.0</a>,
+ which adds 684 new characters, including seven new scripts, and 66 new emoji.
+ </p>
+
+</dl><!-- unicode -->
diff --git a/doc/go1.3.html b/doc/go1.3.html
index feed648..18b3ec6 100644
--- a/doc/go1.3.html
+++ b/doc/go1.3.html
@@ -373,7 +373,7 @@
<p>
A new package <a href="/pkg/debug/plan9obj/"><code>debug/plan9obj</code></a> was added to the standard library.
-It implements access to Plan 9 <a href="http://plan9.bell-labs.com/magic/man2html/6/a.out">a.out</a> object files.
+It implements access to Plan 9 <a href="https://9p.io/magic/man2html/6/a.out">a.out</a> object files.
</p>
<h3 id="major_library_changes">Major changes to the library</h3>
diff --git a/doc/go1.6.html b/doc/go1.6.html
index 902a82d..c8ec7e7 100644
--- a/doc/go1.6.html
+++ b/doc/go1.6.html
@@ -10,7 +10,7 @@
-->
<style>
-ul li { margin: 0.5em 0; }
+ main ul li { margin: 0.5em 0; }
</style>
<h2 id="introduction">Introduction to Go 1.6</h2>
diff --git a/doc/go1.7.html b/doc/go1.7.html
index db60702..61076fd 100644
--- a/doc/go1.7.html
+++ b/doc/go1.7.html
@@ -22,7 +22,7 @@
-->
<style>
-ul li { margin: 0.5em 0; }
+ main ul li { margin: 0.5em 0; }
</style>
<h2 id="introduction">Introduction to Go 1.7</h2>
diff --git a/doc/go1.8.html b/doc/go1.8.html
index 611f5ee..2a47fac 100644
--- a/doc/go1.8.html
+++ b/doc/go1.8.html
@@ -12,7 +12,7 @@
-->
<style>
-ul li { margin: 0.5em 0; }
+ main ul li { margin: 0.5em 0; }
</style>
<h2 id="introduction">Introduction to Go 1.8</h2>
diff --git a/doc/go1.9.html b/doc/go1.9.html
index fa50ae7..3dfdf53 100644
--- a/doc/go1.9.html
+++ b/doc/go1.9.html
@@ -12,7 +12,7 @@
-->
<style>
-ul li { margin: 0.5em 0; }
+ main ul li { margin: 0.5em 0; }
</style>
<h2 id="introduction">Introduction to Go 1.9</h2>
diff --git a/doc/go_faq.html b/doc/go_faq.html
index 305878f..dd3ba84 100644
--- a/doc/go_faq.html
+++ b/doc/go_faq.html
@@ -2082,8 +2082,8 @@
our performance goals.
More important in retrospect, starting with LLVM would have made it
harder to introduce some of the ABI and related changes, such as
-stack management, that Go requires but not are not part of the
-standard C setup.
+stack management, that Go requires but are not part of the standard
+C setup.
A new <a href="https://go.googlesource.com/gollvm/">LLVM implementation</a>
is starting to come together now, however.
</p>
diff --git a/doc/go_spec.html b/doc/go_spec.html
index dcc81ed..89732fb 100644
--- a/doc/go_spec.html
+++ b/doc/go_spec.html
@@ -1,6 +1,6 @@
<!--{
"Title": "The Go Programming Language Specification",
- "Subtitle": "Version of November 16, 2018",
+ "Subtitle": "Version of July 31, 2019",
"Path": "/ref/spec"
}-->
@@ -118,6 +118,7 @@
<pre class="ebnf">
letter = unicode_letter | "_" .
decimal_digit = "0" … "9" .
+binary_digit = "0" | "1" .
octal_digit = "0" … "7" .
hex_digit = "0" … "9" | "A" … "F" | "a" … "f" .
</pre>
@@ -273,71 +274,156 @@
<p>
An integer literal is a sequence of digits representing an
<a href="#Constants">integer constant</a>.
-An optional prefix sets a non-decimal base: <code>0</code> for octal, <code>0x</code> or
-<code>0X</code> for hexadecimal. In hexadecimal literals, letters
-<code>a-f</code> and <code>A-F</code> represent values 10 through 15.
+An optional prefix sets a non-decimal base: <code>0b</code> or <code>0B</code>
+for binary, <code>0</code>, <code>0o</code>, or <code>0O</code> for octal,
+and <code>0x</code> or <code>0X</code> for hexadecimal.
+A single <code>0</code> is considered a decimal zero.
+In hexadecimal literals, letters <code>a</code> through <code>f</code>
+and <code>A</code> through <code>F</code> represent values 10 through 15.
+</p>
+
+<p>
+For readability, an underscore character <code>_</code> may appear after
+a base prefix or between successive digits; such underscores do not change
+the literal's value.
</p>
<pre class="ebnf">
-int_lit = decimal_lit | octal_lit | hex_lit .
-decimal_lit = ( "1" … "9" ) { decimal_digit } .
-octal_lit = "0" { octal_digit } .
-hex_lit = "0" ( "x" | "X" ) hex_digit { hex_digit } .
+int_lit = decimal_lit | binary_lit | octal_lit | hex_lit .
+decimal_lit = "0" | ( "1" … "9" ) [ [ "_" ] decimal_digits ] .
+binary_lit = "0" ( "b" | "B" ) [ "_" ] binary_digits .
+octal_lit = "0" [ "o" | "O" ] [ "_" ] octal_digits .
+hex_lit = "0" ( "x" | "X" ) [ "_" ] hex_digits .
+
+decimal_digits = decimal_digit { [ "_" ] decimal_digit } .
+binary_digits = binary_digit { [ "_" ] binary_digit } .
+octal_digits = octal_digit { [ "_" ] octal_digit } .
+hex_digits = hex_digit { [ "_" ] hex_digit } .
</pre>
<pre>
42
+4_2
0600
+0_600
+0o600
+0O600 // second character is capital letter 'O'
0xBadFace
+0xBad_Face
+0x_67_7a_2f_cc_40_c6
170141183460469231731687303715884105727
+170_141183_460469_231731_687303_715884_105727
+
+_42 // an identifier, not an integer literal
+42_ // invalid: _ must separate successive digits
+4__2 // invalid: only one _ at a time
+0_xBadFace // invalid: _ must separate successive digits
</pre>
+
<h3 id="Floating-point_literals">Floating-point literals</h3>
+
<p>
-A floating-point literal is a decimal representation of a
+A floating-point literal is a decimal or hexadecimal representation of a
<a href="#Constants">floating-point constant</a>.
-It has an integer part, a decimal point, a fractional part,
-and an exponent part. The integer and fractional part comprise
-decimal digits; the exponent part is an <code>e</code> or <code>E</code>
-followed by an optionally signed decimal exponent. One of the
-integer part or the fractional part may be elided; one of the decimal
-point or the exponent may be elided.
</p>
+
+<p>
+A decimal floating-point literal consists of an integer part (decimal digits),
+a decimal point, a fractional part (decimal digits), and an exponent part
+(<code>e</code> or <code>E</code> followed by an optional sign and decimal digits).
+One of the integer part or the fractional part may be elided; one of the decimal point
+or the exponent part may be elided.
+An exponent value exp scales the mantissa (integer and fractional part) by 10<sup>exp</sup>.
+</p>
+
+<p>
+A hexadecimal floating-point literal consists of a <code>0x</code> or <code>0X</code>
+prefix, an integer part (hexadecimal digits), a radix point, a fractional part (hexadecimal digits),
+and an exponent part (<code>p</code> or <code>P</code> followed by an optional sign and decimal digits).
+One of the integer part or the fractional part may be elided; the radix point may be elided as well,
+but the exponent part is required. (This syntax matches the one given in IEEE 754-2008 §5.12.3.)
+An exponent value exp scales the mantissa (integer and fractional part) by 2<sup>exp</sup>.
+</p>
+
+<p>
+For readability, an underscore character <code>_</code> may appear after
+a base prefix or between successive digits; such underscores do not change
+the literal value.
+</p>
+
<pre class="ebnf">
-float_lit = decimals "." [ decimals ] [ exponent ] |
- decimals exponent |
- "." decimals [ exponent ] .
-decimals = decimal_digit { decimal_digit } .
-exponent = ( "e" | "E" ) [ "+" | "-" ] decimals .
+float_lit = decimal_float_lit | hex_float_lit .
+
+decimal_float_lit = decimal_digits "." [ decimal_digits ] [ decimal_exponent ] |
+ decimal_digits decimal_exponent |
+ "." decimal_digits [ decimal_exponent ] .
+decimal_exponent = ( "e" | "E" ) [ "+" | "-" ] decimal_digits .
+
+hex_float_lit = "0" ( "x" | "X" ) hex_mantissa hex_exponent .
+hex_mantissa = [ "_" ] hex_digits "." [ hex_digits ] |
+ [ "_" ] hex_digits |
+ "." hex_digits .
+hex_exponent = ( "p" | "P" ) [ "+" | "-" ] decimal_digits .
</pre>
<pre>
0.
72.40
-072.40 // == 72.40
+072.40 // == 72.40
2.71828
1.e+0
6.67428e-11
1E6
.25
.12345E+5
+1_5. // == 15.0
+0.15e+0_2 // == 15.0
+
+0x1p-2 // == 0.25
+0x2.p10 // == 2048.0
+0x1.Fp+0 // == 1.9375
+0X.8p-0 // == 0.5
+0X_1FFFP-16 // == 0.1249847412109375
+0x15e-2 // == 0x15e - 2 (integer subtraction)
+
+0x.p1 // invalid: mantissa has no digits
+1p-2 // invalid: p exponent requires hexadecimal mantissa
+0x1.5e-2 // invalid: hexadecimal mantissa requires p exponent
+1_.5 // invalid: _ must separate successive digits
+1._5 // invalid: _ must separate successive digits
+1.5_e1 // invalid: _ must separate successive digits
+1.5e_1 // invalid: _ must separate successive digits
+1.5e1_ // invalid: _ must separate successive digits
</pre>
+
<h3 id="Imaginary_literals">Imaginary literals</h3>
+
<p>
-An imaginary literal is a decimal representation of the imaginary part of a
+An imaginary literal represents the imaginary part of a
<a href="#Constants">complex constant</a>.
-It consists of a
-<a href="#Floating-point_literals">floating-point literal</a>
-or decimal integer followed
-by the lower-case letter <code>i</code>.
+It consists of an <a href="#Integer_literals">integer</a> or
+<a href="#Floating-point_literals">floating-point</a> literal
+followed by the lower-case letter <code>i</code>.
+The value of an imaginary literal is the value of the respective
+integer or floating-point literal multiplied by the imaginary unit <i>i</i>.
</p>
+
<pre class="ebnf">
-imaginary_lit = (decimals | float_lit) "i" .
+imaginary_lit = (decimal_digits | int_lit | float_lit) "i" .
</pre>
+<p>
+For backward compatibility, an imaginary literal's integer part consisting
+entirely of decimal digits (and possibly underscores) is considered a decimal
+integer, even if it starts with a leading <code>0</code>.
+</p>
+
<pre>
0i
-011i // == 11i
+0123i // == 123i for backward-compatibility
+0o123i // == 0o123 * 1i == 83i
+0xabci // == 0xabc * 1i == 2748i
0.i
2.71828i
1.e+0i
@@ -345,6 +431,7 @@
1E6i
.25i
.12345E+5i
+0x1p-2i // == 0x1p-2 * 1i == 0.25i
</pre>
@@ -361,6 +448,7 @@
while multi-character sequences beginning with a backslash encode
values in various formats.
</p>
+
<p>
The simplest form represents the single character within the quotes;
since Go source text is Unicode characters encoded in UTF-8, multiple
@@ -370,6 +458,7 @@
<code>'ä'</code> holds two bytes (<code>0xc3</code> <code>0xa4</code>) representing
a literal <code>a</code>-dieresis, U+00E4, value <code>0xe4</code>.
</p>
+
<p>
Several backslash escapes allow arbitrary values to be encoded as
ASCII text. There are four ways to represent the integer value
@@ -380,6 +469,7 @@
In each case the value of the literal is the value represented by
the digits in the corresponding base.
</p>
+
<p>
Although these representations all result in an integer, they have
different valid ranges. Octal escapes must represent a value between
@@ -388,9 +478,11 @@
represent Unicode code points so within them some values are illegal,
in particular those above <code>0x10FFFF</code> and surrogate halves.
</p>
+
<p>
After a backslash, certain single-character escapes represent special values:
</p>
+
<pre class="grammar">
\a U+0007 alert or bell
\b U+0008 backspace
@@ -403,6 +495,7 @@
\' U+0027 single quote (valid escape only within rune literals)
\" U+0022 double quote (valid escape only within string literals)
</pre>
+
<p>
All other sequences starting with a backslash are illegal inside rune literals.
</p>
@@ -446,6 +539,7 @@
obtained from concatenating a sequence of characters. There are two forms:
raw string literals and interpreted string literals.
</p>
+
<p>
Raw string literals are character sequences between back quotes, as in
<code>`foo`</code>. Within the quotes, any character may appear except
@@ -457,6 +551,7 @@
Carriage return characters ('\r') inside raw string literals
are discarded from the raw string value.
</p>
+
<p>
Interpreted string literals are character sequences between double
quotes, as in <code>"bar"</code>.
@@ -596,6 +691,7 @@
internal representation with limited precision. That said, every
implementation must:
</p>
+
<ul>
<li>Represent integer constants with at least 256 bits.</li>
@@ -613,12 +709,14 @@
represent a floating-point or complex constant due to limits
on precision.</li>
</ul>
+
<p>
These requirements apply both to literal constants and to the result
of evaluating <a href="#Constant_expressions">constant
expressions</a>.
</p>
+
<h2 id="Variables">Variables</h2>
<p>
@@ -1159,11 +1257,19 @@
</p>
<pre>
-// A simple File interface
+// A simple File interface.
interface {
- Read(b Buffer) bool
- Write(b Buffer) bool
- Close()
+ Read([]byte) (int, error)
+ Write([]byte) (int, error)
+ Close() error
+}
+</pre>
+
+<pre>
+interface {
+ String() string
+ String() string // illegal: String not unique
+ _(x int) // illegal: method must have non-blank name
}
</pre>
@@ -1174,9 +1280,9 @@
</p>
<pre>
-func (p T) Read(b Buffer) bool { return … }
-func (p T) Write(b Buffer) bool { return … }
-func (p T) Close() { … }
+func (p T) Read(p []byte) (n int, err error) { return … }
+func (p T) Write(p []byte) (n int, err error) { return … }
+func (p T) Close() error { return … }
</pre>
<p>
@@ -2415,11 +2521,25 @@
generates a pointer to a unique <a href="#Variables">variable</a> initialized
with the literal's value.
</p>
+
<pre>
var pointer *Point3D = &Point3D{y: 1000}
</pre>
<p>
+Note that the <a href="#The_zero_value">zero value</a> for a slice or map
+type is not the same as an initialized but empty value of the same type.
+Consequently, taking the address of an empty slice or map composite literal
+does not have the same effect as allocating a new slice or map value with
+<a href="#Allocation">new</a>.
+</p>
+
+<pre>
+p1 := &[]int{} // p1 points to an initialized, empty slice with value []int{} and length 0
+p2 := new([]int) // p2 points to an uninitialized slice with value nil and length 0
+</pre>
+
+<p>
The length of an array literal is the length specified in the literal type.
If fewer elements than the length are provided in the literal, the missing
elements are set to the zero value for the array element type.
@@ -3150,6 +3270,14 @@
array with the operand.
</p>
+<pre>
+var a [10]int
+s1 := a[3:7] // underlying array of s1 is array a; &s1[2] == &a[5]
+s2 := s1[1:4] // underlying array of s2 is underlying array of s1 which is array a; &s2[1] == &a[5]
+s2[1] = 42 // s2[1] == s1[2] == a[5] == 42; they all refer to the same underlying array element
+</pre>
+
+
<h4>Full slice expressions</h4>
<p>
@@ -3386,7 +3514,7 @@
</p>
<p>
-If the final argument is assignable to a slice type <code>[]T</code>, it may be
+If the final argument is assignable to a slice type <code>[]T</code>, it is
passed unchanged as the value for a <code>...T</code> parameter if the argument
is followed by <code>...</code>. In this case no new slice is created.
</p>
@@ -3439,7 +3567,7 @@
</p>
<p>
-The right operand in a shift expression must have unsigned integer type
+The right operand in a shift expression must have integer type
or be an untyped constant <a href="#Representability">representable</a> by a
value of type <code>uint</code>.
If the left operand of a non-constant shift expression is an untyped constant,
@@ -3586,7 +3714,9 @@
<p>
The shift operators shift the left operand by the shift count specified by the
-right operand. They implement arithmetic shifts if the left operand is a signed
+right operand, which must be positive. If the shift count is negative at run time,
+a <a href="#Run_time_panics">run-time panic</a> occurs.
+The shift operators implement arithmetic shifts if the left operand is a signed
integer and logical shifts if it is an unsigned integer.
There is no upper limit on the shift count. Shifts behave
as if the left operand is shifted <code>n</code> times by 1 for a shift
@@ -5921,7 +6051,7 @@
const b = complex(1.0, -1.4) // untyped complex constant 1 - 1.4i
x := float32(math.Cos(math.Pi/2)) // float32
var c64 = complex(5, -x) // complex64
-var s uint = complex(1, 0) // untyped complex constant 1 + 0i can be converted to uint
+var s int = complex(1, 0) // untyped complex constant 1 + 0i can be converted to int
_ = complex(1, 2<<s) // illegal: 2 assumes floating-point type, cannot shift
var rl = real(c64) // float32
var im = imag(a) // float64
@@ -6262,16 +6392,16 @@
<h3 id="Package_initialization">Package initialization</h3>
<p>
-Within a package, package-level variables are initialized in
-<i>declaration order</i> but after any of the variables
-they <i>depend</i> on.
+Within a package, package-level variable initialization proceeds stepwise,
+with each step selecting the variable earliest in <i>declaration order</i>
+which has no dependencies on uninitialized variables.
</p>
<p>
More precisely, a package-level variable is considered <i>ready for
initialization</i> if it is not yet initialized and either has
no <a href="#Variable_declarations">initialization expression</a> or
-its initialization expression has no dependencies on uninitialized variables.
+its initialization expression has no <i>dependencies</i> on uninitialized variables.
Initialization proceeds by repeatedly initializing the next package-level
variable that is earliest in declaration order and ready for initialization,
until there are no variables ready for initialization.
@@ -6284,6 +6414,23 @@
</p>
<p>
+Multiple variables on the left-hand side of a variable declaration initialized
+by single (multi-valued) expression on the right-hand side are initialized
+together: If any of the variables on the left-hand side is initialized, all
+those variables are initialized in the same step.
+</p>
+
+<pre>
+var x = a
+var a, b = f() // a and b are initialized together, before x is initialized
+</pre>
+
+<p>
+For the purpose of package initialization, <a href="#Blank_identifier">blank</a>
+variables are treated like any other variables in declarations.
+</p>
+
+<p>
The declaration order of variables declared in multiple files is determined
by the order in which the files are presented to the compiler: Variables
declared in the first file are declared before any of the variables declared
@@ -6325,21 +6472,15 @@
</ul>
<p>
-Dependency analysis is performed per package; only references referring
-to variables, functions, and methods declared in the current package
-are considered.
-</p>
-
-<p>
For example, given the declarations
</p>
<pre>
var (
- a = c + b
- b = f()
- c = f()
- d = 3
+ a = c + b // == 9
+ b = f() // == 4
+ c = f() // == 5
+ d = 3 // == 5 after initialization has finished
)
func f() int {
@@ -6350,6 +6491,39 @@
<p>
the initialization order is <code>d</code>, <code>b</code>, <code>c</code>, <code>a</code>.
+Note that the order of subexpressions in initialization expressions is irrelevant:
+<code>a = c + b</code> and <code>a = b + c</code> result in the same initialization
+order in this example.
+</p>
+
+<p>
+Dependency analysis is performed per package; only references referring
+to variables, functions, and (non-interface) methods declared in the current
+package are considered. If other, hidden, data dependencies exists between
+variables, the initialization order between those variables is unspecified.
+</p>
+
+<p>
+For instance, given the declarations
+</p>
+
+<pre>
+var x = I(T{}).ab() // x has an undetected, hidden dependency on a and b
+var _ = sideEffect() // unrelated to x, a, or b
+var a = b
+var b = 42
+
+type I interface { ab() []int }
+type T struct{}
+func (T) ab() []int { return []int{a, b} }
+</pre>
+
+<p>
+the variable <code>a</code> will be initialized after <code>b</code> but
+whether <code>x</code> is initialized before <code>b</code>, between
+<code>b</code> and <code>a</code>, or after <code>a</code>, and
+thus also the moment at which <code>sideEffect()</code> is called (before
+or after <code>x</code> is initialized) is not specified.
</p>
<p>
diff --git a/doc/help.html b/doc/help.html
index f11e286..b305a57 100644
--- a/doc/help.html
+++ b/doc/help.html
@@ -59,9 +59,6 @@
<h3 id="twitter"><a href="https://twitter.com/golang">@golang at Twitter</a></h3>
<p>The Go project's official Twitter account.</p>
-<h3 id="pluscom"><a href="https://plus.google.com/communities/114112804251407510571">Go+ community</a></h3>
-<p>A Google+ community for Go enthusiasts.</p>
-
<h3 id="reddit"><a href="https://reddit.com/r/golang">golang sub-Reddit</a></h3>
<p>
The <a href="https://reddit.com/r/golang">golang sub-Reddit</a> is a place
diff --git a/doc/install-source.html b/doc/install-source.html
index bbe7cdf..12b10d5 100644
--- a/doc/install-source.html
+++ b/doc/install-source.html
@@ -33,7 +33,7 @@
</p>
<p>
-The Go compilers support eight instruction sets.
+The Go compilers support nine instruction sets.
There are important differences in the quality of the compilers for the different
architectures.
</p>
@@ -87,6 +87,12 @@
<dd>
Supports Linux binaries. New in 1.7 and not as well exercised as other ports.
</dd>
+<dt>
+ <code>wasm</code> (WebAssembly)
+</dt>
+<dd>
+ Targets the WebAssembly platform. New in 1.11 and not as well exercised as other ports.
+</dd>
</dl>
<p>
@@ -134,12 +140,16 @@
the <code>go</code> command binary for the bootstrap toolchain.
</p>
+<h3 id="bootstrapFromBinaryRelease">Bootstrap toolchain from binary release</h3>
+
<p>
To use a binary release as a bootstrap toolchain, see
<a href="/dl/">the downloads page</a> or use any other
packaged Go distribution.
</p>
+<h3 id="bootstrapFromSource">Bootstrap toolchain from source</h3>
+
<p>
To build a bootstrap toolchain from source, use
either the git branch <code>release-branch.go1.4</code> or
@@ -154,6 +164,17 @@
</p>
<p>
+Once the Go 1.4 source has been unpacked into your GOROOT_BOOTSTRAP directory,
+you must keep this git clone instance checked out to branch
+<code>release-branch.go1.4</code>. Specifically, do not attempt to reuse
+this git clone in the later step named "Fetch the repository." The go1.4
+bootstrap toolchain <b>must be able</b> to properly traverse the go1.4 sources
+that it assumes are present under this repository root.
+</p>
+
+<h3 id="bootstrapFromCrosscompiledSource">Bootstrap toolchain from cross-compiled source</h3>
+
+<p>
To cross-compile a bootstrap toolchain from source, which is
necessary on systems Go 1.4 did not target (for
example, <code>linux/ppc64le</code>), install Go on a different system
@@ -175,6 +196,8 @@
and used as <code>GOROOT_BOOTSTRAP</code> to bootstrap a local build.
</p>
+<h3 id="bootstrapFromGccgo">Bootstrap toolchain using gccgo</h3>
+
<p>
To use gccgo as the bootstrap toolchain, you need to arrange
for <code>$GOROOT_BOOTSTRAP/bin/go</code> to be the go tool that comes
@@ -218,15 +241,14 @@
<h2 id="fetch">Fetch the repository</h2>
-<p>Go will install to a directory named <code>go</code>.
-Change to the directory that will be its parent
-and make sure the <code>go</code> directory does not exist.
-Then clone the repository and check out the latest release tag
-(<code class="versionTag">go1.9</code>, for example):</p>
+<p>Change to the directory where you intend to install Go, and make sure
+the <code>goroot</code> directory does not exist. Then clone the repository
+and check out the latest release tag (<code class="versionTag">go1.12</code>,
+for example):</p>
<pre>
-$ git clone https://go.googlesource.com/go
-$ cd go
+$ git clone https://go.googlesource.com/go goroot
+$ cd goroot
$ git checkout <span class="versionTag"><i><tag></i></span>
</pre>
@@ -234,6 +256,18 @@
Where <code><tag></code> is the version string of the release.
</p>
+<p>Go will be installed in the directory where it is checked out. For example,
+if Go is checked out in <code>$HOME/goroot</code>, executables will be installed
+in <code>$HOME/goroot/bin</code>. The directory may have any name, but note
+that if Go is checked out in <code>$HOME/go</code>, it will conflict with
+the default location of <code>$GOPATH</code>.
+See <a href="#gopath"><code>GOPATH</code></a> below.</p>
+
+Reminder: If you opted to also compile the bootstrap binaries from source (in an
+earlier section), you still need to <code>git clone</code> again at this point
+(to checkout the latest <code><tag></code>), because you must keep your
+go1.4 repository distinct.
+
<h2 id="head">(Optional) Switch to the master branch</h2>
<p>If you intend to modify the go source code, and
@@ -441,6 +475,43 @@
</p>
</li>
+<li id="gopath"><code>$GOPATH</code>
+<p>
+The directory where Go projects outside the Go distribution are typically
+checked out. For example, <code>golang.org/x/tools</code> might be checked out
+to <code>$GOPATH/src/golang.org/x/tools</code>. Executables outside the
+Go distribution are installed in <code>$GOPATH/bin</code> (or
+<code>$GOBIN</code>, if set). Modules are downloaded and cached in
+<code>$GOPATH/pkg/mod</code>.
+</p>
+
+<p>The default location of <code>$GOPATH</code> is <code>$HOME/go</code>,
+and it's not usually necessary to set <code>GOPATH</code> explicitly. However,
+if you have checked out the Go distribution to <code>$HOME/go</code>,
+you must set <code>GOPATH</code> to another location to avoid conflicts.
+</p>
+</li>
+
+<li><code>$GOBIN</code>
+<p>
+The directory where executables outside the Go distribution are installed
+using the <a href="/cmd/go">go command</a>. For example,
+<code>go get golang.org/x/tools/cmd/godoc</code> downloads, builds, and
+installs <code>$GOBIN/godoc</code>. By default, <code>$GOBIN</code> is
+<code>$GOPATH/bin</code> (or <code>$HOME/go/bin</code> if <code>GOPATH</code>
+is not set). After installing, you will want to add this directory to
+your <code>$PATH</code> so you can use installed tools.
+</p>
+
+<p>
+Note that the Go distribution's executables are installed in
+<code>$GOROOT/bin</code> (for executables invoked by people) or
+<code>$GOTOOLDIR</code> (for executables invoked by the go command;
+defaults to <code>$GOROOT/pkg/$GOOS_GOARCH</code>) instead of
+<code>$GOBIN</code>.
+</p>
+</li>
+
<li><code>$GOOS</code> and <code>$GOARCH</code>
<p>
The name of the target operating system and compilation architecture.
@@ -450,25 +521,45 @@
<p>
Choices for <code>$GOOS</code> are
-<code>darwin</code> (macOS 10.10 and above and iOS), <code>dragonfly</code>, <code>freebsd</code>,
+<code>android</code>, <code>darwin</code> (macOS 10.11 and above and iOS),
+<code>dragonfly</code>, <code>freebsd</code>, <code>illumos</code>, <code>js</code>,
<code>linux</code>, <code>netbsd</code>, <code>openbsd</code>,
<code>plan9</code>, <code>solaris</code> and <code>windows</code>.
+</p>
+
+<p>
Choices for <code>$GOARCH</code> are
<code>amd64</code> (64-bit x86, the most mature port),
<code>386</code> (32-bit x86), <code>arm</code> (32-bit ARM), <code>arm64</code> (64-bit ARM),
<code>ppc64le</code> (PowerPC 64-bit, little-endian), <code>ppc64</code> (PowerPC 64-bit, big-endian),
<code>mips64le</code> (MIPS 64-bit, little-endian), <code>mips64</code> (MIPS 64-bit, big-endian),
-<code>mipsle</code> (MIPS 32-bit, little-endian), <code>mips</code> (MIPS 32-bit, big-endian), and
-<code>s390x</code> (IBM System z 64-bit, big-endian).
+<code>mipsle</code> (MIPS 32-bit, little-endian), <code>mips</code> (MIPS 32-bit, big-endian),
+<code>s390x</code> (IBM System z 64-bit, big-endian), and
+<code>wasm</code> (WebAssembly 32-bit).
+</p>
+
+<p>
The valid combinations of <code>$GOOS</code> and <code>$GOARCH</code> are:
<table cellpadding="0">
<tr>
<th width="50"></th><th align="left" width="100"><code>$GOOS</code></th> <th align="left" width="100"><code>$GOARCH</code></th>
</tr>
<tr>
+<td></td><td><code>aix</code></td> <td><code>ppc64</code></td>
+</tr>
+<tr>
+<td></td><td><code>android</code></td> <td><code>386</code></td>
+</tr>
+<tr>
+<td></td><td><code>android</code></td> <td><code>amd64</code></td>
+</tr>
+<tr>
<td></td><td><code>android</code></td> <td><code>arm</code></td>
</tr>
<tr>
+<td></td><td><code>android</code></td> <td><code>arm64</code></td>
+</tr>
+<tr>
<td></td><td><code>darwin</code></td> <td><code>386</code></td>
</tr>
<tr>
@@ -493,6 +584,12 @@
<td></td><td><code>freebsd</code></td> <td><code>arm</code></td>
</tr>
<tr>
+<td></td><td><code>illumos</code></td> <td><code>amd64</code></td>
+</tr>
+<tr>
+<td></td><td><code>js</code></td> <td><code>wasm</code></td>
+</tr>
+<tr>
<td></td><td><code>linux</code></td> <td><code>386</code></td>
</tr>
<tr>
@@ -544,12 +641,18 @@
<td></td><td><code>openbsd</code></td> <td><code>arm</code></td>
</tr>
<tr>
+<td></td><td><code>openbsd</code></td> <td><code>arm64</code></td>
+</tr>
+<tr>
<td></td><td><code>plan9</code></td> <td><code>386</code></td>
</tr>
<tr>
<td></td><td><code>plan9</code></td> <td><code>amd64</code></td>
</tr>
<tr>
+<td></td><td><code>plan9</code></td> <td><code>arm</code></td>
+</tr>
+<tr>
<td></td><td><code>solaris</code></td> <td><code>amd64</code></td>
</tr>
<tr>
@@ -577,17 +680,6 @@
<code>arm</code> on an x86 system.
</p>
-<li><code>$GOBIN</code>
-<p>
-The location where Go binaries will be installed.
-The default is <code>$GOROOT/bin</code>.
-After installing, you will want to arrange to add this
-directory to your <code>$PATH</code>, so you can use the tools.
-If <code>$GOBIN</code> is set, the <a href="/cmd/go">go command</a>
-installs all commands there.
-</p>
-</li>
-
<li><code>$GO386</code> (for <code>386</code> only, default is auto-detected
if built on either <code>386</code> or <code>amd64</code>, <code>387</code> otherwise)
<p>
@@ -627,6 +719,29 @@
</p>
</li>
+<li><code>$GOPPC64</code> (for <code>ppc64</code> and <code>ppc64le</code> only)
+<p>
+This variable sets the processor level (i.e. Instruction Set Architecture version)
+for which the compiler will target. The default is <code>power8</code>.
+</p>
+<ul>
+ <li><code>GOPPC64=power8</code>: generate ISA v2.07 instructions</li>
+ <li><code>GOPPC64=power9</code>: generate ISA v3.00 instructions</li>
+</ul>
+</li>
+
+
+<li><code>$GOWASM</code> (for <code>wasm</code> only)
+ <p>
+ This variable is a comma separated list of <a href="https://github.com/WebAssembly/proposals">experimental WebAssembly features</a> that the compiled WebAssembly binary is allowed to use.
+ The default is to use no experimental features.
+ </p>
+ <ul>
+ <li><code>GOWASM=satconv</code>: generate <a href="https://github.com/WebAssembly/nontrapping-float-to-int-conversions/blob/master/proposals/nontrapping-float-to-int-conversion/Overview.md">saturating (non-trapping) float-to-int conversions</a></li>
+ <li><code>GOWASM=signext</code>: generate <a href="https://github.com/WebAssembly/sign-extension-ops/blob/master/proposals/sign-extension-ops/Overview.md">sign-extension operators</a></li>
+ </ul>
+</li>
+
</ul>
<p>
diff --git a/doc/install.html b/doc/install.html
index a41c60b..05b6d05 100644
--- a/doc/install.html
+++ b/doc/install.html
@@ -50,7 +50,7 @@
<tr><td>FreeBSD 10.3 or later</td> <td>amd64, 386</td> <td>Debian GNU/kFreeBSD not supported</td></tr>
<tr valign='top'><td>Linux 2.6.23 or later with glibc</td> <td>amd64, 386, arm, arm64,<br>s390x, ppc64le</td> <td>CentOS/RHEL 5.x not supported.<br>Install from source for other libc.</td></tr>
<tr><td>macOS 10.10 or later</td> <td>amd64</td> <td>use the clang or gcc<sup>†</sup> that comes with Xcode<sup>‡</sup> for <code>cgo</code> support</td></tr>
-<tr><td>Windows 7, Server 2008R2 or later</td> <td>amd64, 386</td> <td>use MinGW gcc<sup>†</sup>. No need for cygwin or msys.</td></tr>
+<tr valign='top'><td>Windows 7, Server 2008R2 or later</td> <td>amd64, 386</td> <td>use MinGW (<code>386</code>) or MinGW-W64 (<code>amd64</code>) gcc<sup>†</sup>.<br>No need for cygwin or msys.</td></tr>
</table>
<p>
@@ -204,7 +204,7 @@
</p>
<p>
-Next, make the directory <code>src/hello</code> inside your workspace,
+Next, make the directory <code class="testUnix">src/hello</code><code class="testWindows">src\hello</code> inside your workspace,
and in that directory create a file named <code>hello.go</code> that looks like:
</p>