_content/doc: copy docs from main Go repo

These are all the docs that aren't tied to active work in the main repo
(basically all docs, except the spec, memory model, assembler manual,
and in-progress release notes).

Copied from Go ff0e93ea3, deleted there in CL 291711.

Change-Id: Ia269abfc0fa207c036bb7b3c13e4167e80005d2c
Reviewed-on: https://go-review.googlesource.com/c/website/+/291693
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
diff --git a/_content/doc/articles/go_command.html b/_content/doc/articles/go_command.html
new file mode 100644
index 0000000..5b6fd4d
--- /dev/null
+++ b/_content/doc/articles/go_command.html
@@ -0,0 +1,254 @@
+<!--{
+	"title": "About the go command"
+}-->
+
+<p>The Go distribution includes a command, named
+"<code><a href="/cmd/go/">go</a></code>", that
+automates the downloading, building, installation, and testing of Go packages
+and commands.  This document talks about why we wrote a new command, what it
+is, what it's not, and how to use it.</p>
+
+<h2>Motivation</h2>
+
+<p>You might have seen early Go talks in which Rob Pike jokes that the idea
+for Go arose while waiting for a large Google server to compile.  That
+really was the motivation for Go: to build a language that worked well
+for building the large software that Google writes and runs. It was
+clear from the start that such a language must provide a way to
+express dependencies between code libraries clearly, hence the package
+grouping and the explicit import blocks.  It was also clear from the
+start that you might want arbitrary syntax for describing the code
+being imported; this is why import paths are string literals.</p>
+
+<p>An explicit goal for Go from the beginning was to be able to build Go
+code using only the information found in the source itself, not
+needing to write a makefile or one of the many modern replacements for
+makefiles.  If Go needed a configuration file to explain how to build
+your program, then Go would have failed.</p>
+
+<p>At first, there was no Go compiler, and the initial development
+focused on building one and then building libraries for it. For
+expedience, we postponed the automation of building Go code by using
+make and writing makefiles.  When compiling a single package involved
+multiple invocations of the Go compiler, we even used a program to
+write the makefiles for us.  You can find it if you dig through the
+repository history.</p>
+
+<p>The purpose of the new go command is our return to this ideal, that Go
+programs should compile without configuration or additional effort on
+the part of the developer beyond writing the necessary import
+statements.</p>
+
+<h2>Configuration versus convention</h2>
+
+<p>The way to achieve the simplicity of a configuration-free system is to
+establish conventions. The system works only to the extent that those conventions
+are followed. When we first launched Go, many people published packages that
+had to be installed in certain places, under certain names, using certain build
+tools, in order to be used. That's understandable: that's the way it works in
+most other languages. Over the last few years we consistently reminded people
+about the <code>goinstall</code> command
+(now replaced by <a href="/cmd/go/#hdr-Download_and_install_packages_and_dependencies"><code>go get</code></a>)
+and its conventions: first, that the import path is derived in a known way from
+the URL of the source code; second, that the place to store the sources in
+the local file system is derived in a known way from the import path; third,
+that each directory in a source tree corresponds to a single package; and
+fourth, that the package is built using only information in the source code.
+Today, the vast majority of packages follow these conventions.
+The Go ecosystem is simpler and more powerful as a result.</p>
+
+<p>We received many requests to allow a makefile in a package directory to
+provide just a little extra configuration beyond what's in the source code.
+But that would have introduced new rules. Because we did not accede to such
+requests, we were able to write the go command and eliminate our use of make
+or any other build system.</p>
+
+<p>It is important to understand that the go command is not a general
+build tool. It cannot be configured and it does not attempt to build
+anything but Go packages.  These are important simplifying
+assumptions: they simplify not only the implementation but also, more
+important, the use of the tool itself.</p>
+
+<h2>Go's conventions</h2>
+
+<p>The <code>go</code> command requires that code adheres to a few key,
+well-established conventions.</p>
+
+<p>First, the import path is derived in a known way from the URL of the
+source code.  For Bitbucket, GitHub, Google Code, and Launchpad, the
+root directory of the repository is identified by the repository's
+main URL, without the <code>http://</code> prefix.  Subdirectories are named by
+adding to that path.
+For example, the Go example programs are obtained by running</p>
+
+<pre>
+git clone https://github.com/golang/example
+</pre>
+
+<p>and thus the import path for the root directory of that repository is
+"<code>github.com/golang/example</code>".
+The <a href="https://godoc.org/github.com/golang/example/stringutil">stringutil</a>
+package is stored in a subdirectory, so its import path is
+"<code>github.com/golang/example/stringutil</code>".</p>
+
+<p>These paths are on the long side, but in exchange we get an
+automatically managed name space for import paths and the ability for
+a tool like the go command to look at an unfamiliar import path and
+deduce where to obtain the source code.</p>
+
+<p>Second, the place to store sources in the local file system is derived
+in a known way from the import path, specifically
+<code>$GOPATH/src/&lt;import-path&gt;</code>.
+If unset, <code>$GOPATH</code> defaults to a subdirectory
+named <code>go</code> in the user's home directory.
+If <code>$GOPATH</code> is set to a list of paths, the go command tries
+<code>&lt;dir&gt;/src/&lt;import-path&gt;</code> for each of the directories in
+that list.
+</p>
+
+<p>Each of those trees contains, by convention, a top-level directory named
+"<code>bin</code>", for holding compiled executables, and a top-level directory
+named "<code>pkg</code>", for holding compiled packages that can be imported,
+and the "<code>src</code>" directory, for holding package source files.
+Imposing this structure lets us keep each of these directory trees
+self-contained: the compiled form and the sources are always near each
+other.</p>
+
+<p>These naming conventions also let us work in the reverse direction,
+from a directory name to its import path. This mapping is important
+for many of the go command's subcommands, as we'll see below.</p>
+
+<p>Third, each directory in a source tree corresponds to a single
+package. By restricting a directory to a single package, we don't have
+to create hybrid import paths that specify first the directory and
+then the package within that directory.  Also, most file management
+tools and UIs work on  directories as fundamental units.  Tying the
+fundamental Go unit&mdash;the package&mdash;to file system structure means
+that file system tools become Go package tools.  Copying, moving, or
+deleting a package corresponds to copying, moving, or deleting a
+directory.</p>
+
+<p>Fourth, each package is built using only the information present in
+the source files.  This makes it much more likely that the tool will
+be able to adapt to changing build environments and conditions. For
+example, if we allowed extra configuration such as compiler flags or
+command line recipes, then that configuration would need to be updated
+each time the build tools changed; it would also be inherently tied
+to the use of a specific toolchain.</p>
+
+<h2>Getting started with the go command</h2>
+
+<p>Finally, a quick tour of how to use the go command.
+As mentioned above, the default <code>$GOPATH</code> on Unix is <code>$HOME/go</code>.
+We'll store our programs there.
+To use a different location, you can set <code>$GOPATH</code>;
+see <a href="/doc/code.html">How to Write Go Code</a> for details.
+
+<p>We first add some source code.  Suppose we want to use
+the indexing library from the codesearch project along with a left-leaning
+red-black tree.  We can install both with the "<code>go get</code>"
+subcommand:</p>
+
+<pre>
+$ go get github.com/google/codesearch/index
+$ go get github.com/petar/GoLLRB/llrb
+$
+</pre>
+
+<p>Both of these projects are now downloaded and installed into <code>$HOME/go</code>,
+which contains the two directories
+<code>src/github.com/google/codesearch/index/</code> and
+<code>src/github.com/petar/GoLLRB/llrb/</code>, along with the compiled
+packages (in <code>pkg/</code>) for those libraries and their dependencies.</p>
+
+<p>Because we used version control systems (Mercurial and Git) to check
+out the sources, the source tree also contains the other files in the
+corresponding repositories, such as related packages. The "<code>go list</code>"
+subcommand lists the import paths corresponding to its arguments, and
+the pattern "<code>./...</code>" means start in the current directory
+("<code>./</code>") and find all packages below that directory
+("<code>...</code>"):</p>
+
+<pre>
+$ cd $HOME/go/src
+$ go list ./...
+github.com/google/codesearch/cmd/cgrep
+github.com/google/codesearch/cmd/cindex
+github.com/google/codesearch/cmd/csearch
+github.com/google/codesearch/index
+github.com/google/codesearch/regexp
+github.com/google/codesearch/sparse
+github.com/petar/GoLLRB/example
+github.com/petar/GoLLRB/llrb
+$
+</pre>
+
+<p>We can also test those packages:</p>
+
+<pre>
+$ go test ./...
+?   	github.com/google/codesearch/cmd/cgrep	[no test files]
+?   	github.com/google/codesearch/cmd/cindex	[no test files]
+?   	github.com/google/codesearch/cmd/csearch	[no test files]
+ok  	github.com/google/codesearch/index	0.203s
+ok  	github.com/google/codesearch/regexp	0.017s
+?   	github.com/google/codesearch/sparse	[no test files]
+?       github.com/petar/GoLLRB/example          [no test files]
+ok      github.com/petar/GoLLRB/llrb             0.231s
+$
+</pre>
+
+<p>If a go subcommand is invoked with no paths listed, it operates on the
+current directory:</p>
+
+<pre>
+$ cd github.com/google/codesearch/regexp
+$ go list
+github.com/google/codesearch/regexp
+$ go test -v
+=== RUN   TestNstateEnc
+--- PASS: TestNstateEnc (0.00s)
+=== RUN   TestMatch
+--- PASS: TestMatch (0.00s)
+=== RUN   TestGrep
+--- PASS: TestGrep (0.00s)
+PASS
+ok  	github.com/google/codesearch/regexp	0.018s
+$ go install
+$
+</pre>
+
+<p>That "<code>go install</code>" subcommand installs the latest copy of the
+package into the pkg directory. Because the go command can analyze the
+dependency graph, "<code>go install</code>" also installs any packages that
+this package imports but that are out of date, recursively.</p>
+
+<p>Notice that "<code>go install</code>" was able to determine the name of the
+import path for the package in the current directory, because of the convention
+for directory naming.  It would be a little more convenient if we could pick
+the name of the directory where we kept source code, and we probably wouldn't
+pick such a long name, but that ability would require additional configuration
+and complexity in the tool. Typing an extra directory name or two is a small
+price to pay for the increased simplicity and power.</p>
+
+<h2>Limitations</h2>
+
+<p>As mentioned above, the go command is not a general-purpose build
+tool.
+In particular, it does not have any facility for generating Go
+source files <em>during</em> a build, although it does provide
+<a href="/cmd/go/#hdr-Generate_Go_files_by_processing_source"><code>go</code>
+<code>generate</code></a>,
+which can automate the creation of Go files <em>before</em> the build.
+For more advanced build setups, you may need to write a
+makefile (or a configuration file for the build tool of your choice)
+to run whatever tool creates the Go files and then check those generated source files
+into your repository. This is more work for you, the package author,
+but it is significantly less work for your users, who can use
+"<code>go get</code>" without needing to obtain and build
+any additional tools.</p>
+
+<h2>More information</h2>
+
+<p>For more information, read <a href="/doc/code.html">How to Write Go Code</a>
+and see the <a href="/cmd/go/">go command documentation</a>.</p>
diff --git a/_content/doc/articles/index.html b/_content/doc/articles/index.html
new file mode 100644
index 0000000..9ddd669
--- /dev/null
+++ b/_content/doc/articles/index.html
@@ -0,0 +1,8 @@
+<!--{
+	"Title": "/doc/articles/"
+}-->
+
+<p>
+See the <a href="/doc/#articles">Documents page</a> and the
+<a href="/blog/index">Blog index</a> for a complete list of Go articles.
+</p>
diff --git a/_content/doc/articles/race_detector.html b/_content/doc/articles/race_detector.html
new file mode 100644
index 0000000..09188c1
--- /dev/null
+++ b/_content/doc/articles/race_detector.html
@@ -0,0 +1,440 @@
+<!--{
+	"Title": "Data Race Detector",
+	"Template": true
+}-->
+
+<h2 id="Introduction">Introduction</h2>
+
+<p>
+Data races are among the most common and hardest to debug types of bugs in concurrent systems.
+A data race occurs when two goroutines access the same variable concurrently and at least one of the accesses is a write.
+See the <a href="/ref/mem/">The Go Memory Model</a> for details.
+</p>
+
+<p>
+Here is an example of a data race that can lead to crashes and memory corruption:
+</p>
+
+<pre>
+func main() {
+	c := make(chan bool)
+	m := make(map[string]string)
+	go func() {
+		m["1"] = "a" // First conflicting access.
+		c &lt;- true
+	}()
+	m["2"] = "b" // Second conflicting access.
+	&lt;-c
+	for k, v := range m {
+		fmt.Println(k, v)
+	}
+}
+</pre>
+
+<h2 id="Usage">Usage</h2>
+
+<p>
+To help diagnose such bugs, Go includes a built-in data race detector.
+To use it, add the <code>-race</code> flag to the go command:
+</p>
+
+<pre>
+$ go test -race mypkg    // to test the package
+$ go run -race mysrc.go  // to run the source file
+$ go build -race mycmd   // to build the command
+$ go install -race mypkg // to install the package
+</pre>
+
+<h2 id="Report_Format">Report Format</h2>
+
+<p>
+When the race detector finds a data race in the program, it prints a report.
+The report contains stack traces for conflicting accesses, as well as stacks where the involved goroutines were created.
+Here is an example:
+</p>
+
+<pre>
+WARNING: DATA RACE
+Read by goroutine 185:
+  net.(*pollServer).AddFD()
+      src/net/fd_unix.go:89 +0x398
+  net.(*pollServer).WaitWrite()
+      src/net/fd_unix.go:247 +0x45
+  net.(*netFD).Write()
+      src/net/fd_unix.go:540 +0x4d4
+  net.(*conn).Write()
+      src/net/net.go:129 +0x101
+  net.func·060()
+      src/net/timeout_test.go:603 +0xaf
+
+Previous write by goroutine 184:
+  net.setWriteDeadline()
+      src/net/sockopt_posix.go:135 +0xdf
+  net.setDeadline()
+      src/net/sockopt_posix.go:144 +0x9c
+  net.(*conn).SetDeadline()
+      src/net/net.go:161 +0xe3
+  net.func·061()
+      src/net/timeout_test.go:616 +0x3ed
+
+Goroutine 185 (running) created at:
+  net.func·061()
+      src/net/timeout_test.go:609 +0x288
+
+Goroutine 184 (running) created at:
+  net.TestProlongTimeout()
+      src/net/timeout_test.go:618 +0x298
+  testing.tRunner()
+      src/testing/testing.go:301 +0xe8
+</pre>
+
+<h2 id="Options">Options</h2>
+
+<p>
+The <code>GORACE</code> environment variable sets race detector options.
+The format is:
+</p>
+
+<pre>
+GORACE="option1=val1 option2=val2"
+</pre>
+
+<p>
+The options are:
+</p>
+
+<ul>
+<li>
+<code>log_path</code> (default <code>stderr</code>): The race detector writes
+its report to a file named <code>log_path.<em>pid</em></code>.
+The special names <code>stdout</code>
+and <code>stderr</code> cause reports to be written to standard output and
+standard error, respectively.
+</li>
+
+<li>
+<code>exitcode</code> (default <code>66</code>): The exit status to use when
+exiting after a detected race.
+</li>
+
+<li>
+<code>strip_path_prefix</code> (default <code>""</code>): Strip this prefix
+from all reported file paths, to make reports more concise.
+</li>
+
+<li>
+<code>history_size</code> (default <code>1</code>): The per-goroutine memory
+access history is <code>32K * 2**history_size elements</code>.
+Increasing this value can avoid a "failed to restore the stack" error in reports, at the
+cost of increased memory usage.
+</li>
+
+<li>
+<code>halt_on_error</code> (default <code>0</code>): Controls whether the program
+exits after reporting first data race.
+</li>
+
+<li>
+<code>atexit_sleep_ms</code> (default <code>1000</code>): Amount of milliseconds
+to sleep in the main goroutine before exiting.
+</li>
+</ul>
+
+<p>
+Example:
+</p>
+
+<pre>
+$ GORACE="log_path=/tmp/race/report strip_path_prefix=/my/go/sources/" go test -race
+</pre>
+
+<h2 id="Excluding_Tests">Excluding Tests</h2>
+
+<p>
+When you build with <code>-race</code> flag, the <code>go</code> command defines additional
+<a href="/pkg/go/build/#hdr-Build_Constraints">build tag</a> <code>race</code>.
+You can use the tag to exclude some code and tests when running the race detector.
+Some examples:
+</p>
+
+<pre>
+// +build !race
+
+package foo
+
+// The test contains a data race. See issue 123.
+func TestFoo(t *testing.T) {
+	// ...
+}
+
+// The test fails under the race detector due to timeouts.
+func TestBar(t *testing.T) {
+	// ...
+}
+
+// The test takes too long under the race detector.
+func TestBaz(t *testing.T) {
+	// ...
+}
+</pre>
+
+<h2 id="How_To_Use">How To Use</h2>
+
+<p>
+To start, run your tests using the race detector (<code>go test -race</code>).
+The race detector only finds races that happen at runtime, so it can't find
+races in code paths that are not executed.
+If your tests have incomplete coverage,
+you may find more races by running a binary built with <code>-race</code> under a realistic
+workload.
+</p>
+
+<h2 id="Typical_Data_Races">Typical Data Races</h2>
+
+<p>
+Here are some typical data races.  All of them can be detected with the race detector.
+</p>
+
+<h3 id="Race_on_loop_counter">Race on loop counter</h3>
+
+<pre>
+func main() {
+	var wg sync.WaitGroup
+	wg.Add(5)
+	for i := 0; i < 5; i++ {
+		go func() {
+			fmt.Println(i) // Not the 'i' you are looking for.
+			wg.Done()
+		}()
+	}
+	wg.Wait()
+}
+</pre>
+
+<p>
+The variable <code>i</code> in the function literal is the same variable used by the loop, so
+the read in the goroutine races with the loop increment.
+(This program typically prints 55555, not 01234.)
+The program can be fixed by making a copy of the variable:
+</p>
+
+<pre>
+func main() {
+	var wg sync.WaitGroup
+	wg.Add(5)
+	for i := 0; i < 5; i++ {
+		go func(j int) {
+			fmt.Println(j) // Good. Read local copy of the loop counter.
+			wg.Done()
+		}(i)
+	}
+	wg.Wait()
+}
+</pre>
+
+<h3 id="Accidentally_shared_variable">Accidentally shared variable</h3>
+
+<pre>
+// ParallelWrite writes data to file1 and file2, returns the errors.
+func ParallelWrite(data []byte) chan error {
+	res := make(chan error, 2)
+	f1, err := os.Create("file1")
+	if err != nil {
+		res &lt;- err
+	} else {
+		go func() {
+			// This err is shared with the main goroutine,
+			// so the write races with the write below.
+			_, err = f1.Write(data)
+			res &lt;- err
+			f1.Close()
+		}()
+	}
+	f2, err := os.Create("file2") // The second conflicting write to err.
+	if err != nil {
+		res &lt;- err
+	} else {
+		go func() {
+			_, err = f2.Write(data)
+			res &lt;- err
+			f2.Close()
+		}()
+	}
+	return res
+}
+</pre>
+
+<p>
+The fix is to introduce new variables in the goroutines (note the use of <code>:=</code>):
+</p>
+
+<pre>
+			...
+			_, err := f1.Write(data)
+			...
+			_, err := f2.Write(data)
+			...
+</pre>
+
+<h3 id="Unprotected_global_variable">Unprotected global variable</h3>
+
+<p>
+If the following code is called from several goroutines, it leads to races on the <code>service</code> map.
+Concurrent reads and writes of the same map are not safe:
+</p>
+
+<pre>
+var service map[string]net.Addr
+
+func RegisterService(name string, addr net.Addr) {
+	service[name] = addr
+}
+
+func LookupService(name string) net.Addr {
+	return service[name]
+}
+</pre>
+
+<p>
+To make the code safe, protect the accesses with a mutex:
+</p>
+
+<pre>
+var (
+	service   map[string]net.Addr
+	serviceMu sync.Mutex
+)
+
+func RegisterService(name string, addr net.Addr) {
+	serviceMu.Lock()
+	defer serviceMu.Unlock()
+	service[name] = addr
+}
+
+func LookupService(name string) net.Addr {
+	serviceMu.Lock()
+	defer serviceMu.Unlock()
+	return service[name]
+}
+</pre>
+
+<h3 id="Primitive_unprotected_variable">Primitive unprotected variable</h3>
+
+<p>
+Data races can happen on variables of primitive types as well (<code>bool</code>, <code>int</code>, <code>int64</code>, etc.),
+as in this example:
+</p>
+
+<pre>
+type Watchdog struct{ last int64 }
+
+func (w *Watchdog) KeepAlive() {
+	w.last = time.Now().UnixNano() // First conflicting access.
+}
+
+func (w *Watchdog) Start() {
+	go func() {
+		for {
+			time.Sleep(time.Second)
+			// Second conflicting access.
+			if w.last < time.Now().Add(-10*time.Second).UnixNano() {
+				fmt.Println("No keepalives for 10 seconds. Dying.")
+				os.Exit(1)
+			}
+		}
+	}()
+}
+</pre>
+
+<p>
+Even such "innocent" data races can lead to hard-to-debug problems caused by
+non-atomicity of the memory accesses,
+interference with compiler optimizations,
+or reordering issues accessing processor memory .
+</p>
+
+<p>
+A typical fix for this race is to use a channel or a mutex.
+To preserve the lock-free behavior, one can also use the
+<a href="/pkg/sync/atomic/"><code>sync/atomic</code></a> package.
+</p>
+
+<pre>
+type Watchdog struct{ last int64 }
+
+func (w *Watchdog) KeepAlive() {
+	atomic.StoreInt64(&amp;w.last, time.Now().UnixNano())
+}
+
+func (w *Watchdog) Start() {
+	go func() {
+		for {
+			time.Sleep(time.Second)
+			if atomic.LoadInt64(&amp;w.last) < time.Now().Add(-10*time.Second).UnixNano() {
+				fmt.Println("No keepalives for 10 seconds. Dying.")
+				os.Exit(1)
+			}
+		}
+	}()
+}
+</pre>
+
+<h3 id="Unsynchronized_send_and_close_operations">Unsynchronized send and close operations</h3>
+
+<p>
+As this example demonstrates, unsynchronized send and close operations
+on the same channel can also be a race condition:
+</p>
+
+<pre>
+c := make(chan struct{}) // or buffered channel
+
+// The race detector cannot derive the happens before relation
+// for the following send and close operations. These two operations
+// are unsynchronized and happen concurrently.
+go func() { c <- struct{}{} }()
+close(c)
+</pre>
+
+<p>
+According to the Go memory model, a send on a channel happens before
+the corresponding receive from that channel completes. To synchronize
+send and close operations, use a receive operation that guarantees
+the send is done before the close:
+</p>
+
+<pre>
+c := make(chan struct{}) // or buffered channel
+
+go func() { c <- struct{}{} }()
+<-c
+close(c)
+</pre>
+
+<h2 id="Supported_Systems">Supported Systems</h2>
+
+<p>
+  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>,
+  <code>darwin/arm64</code>, and <code>windows/amd64</code>.
+</p>
+
+<h2 id="Runtime_Overheads">Runtime Overhead</h2>
+
+<p>
+The cost of race detection varies by program, but for a typical program, memory
+usage may increase by 5-10x and execution time by 2-20x.
+</p>
+
+<p>
+The race detector currently allocates an extra 8 bytes per <code>defer</code>
+and <code>recover</code> statement. Those extra allocations <a
+href="https://golang.org/issue/26813">are not recovered until the goroutine
+exits</a>. This means that if you have a long-running goroutine that is
+periodically issuing <code>defer</code> and <code>recover</code> calls,
+the program memory usage may grow without bound. These memory allocations
+will not show up in the output of <code>runtime.ReadMemStats</code> or
+<code>runtime/pprof</code>.
+</p>
diff --git a/_content/doc/articles/wiki/edit.html b/_content/doc/articles/wiki/edit.html
new file mode 100644
index 0000000..044c3be
--- /dev/null
+++ b/_content/doc/articles/wiki/edit.html
@@ -0,0 +1,6 @@
+<h1>Editing {{.Title}}</h1>
+
+<form action="/save/{{.Title}}" method="POST">
+<div><textarea name="body" rows="20" cols="80">{{printf "%s" .Body}}</textarea></div>
+<div><input type="submit" value="Save"></div>
+</form>
diff --git a/_content/doc/articles/wiki/final-noclosure.go b/_content/doc/articles/wiki/final-noclosure.go
new file mode 100644
index 0000000..d894e7d
--- /dev/null
+++ b/_content/doc/articles/wiki/final-noclosure.go
@@ -0,0 +1,105 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build ignore
+
+package main
+
+import (
+	"errors"
+	"html/template"
+	"io/ioutil"
+	"log"
+	"net/http"
+	"regexp"
+)
+
+type Page struct {
+	Title string
+	Body  []byte
+}
+
+func (p *Page) save() error {
+	filename := p.Title + ".txt"
+	return ioutil.WriteFile(filename, p.Body, 0600)
+}
+
+func loadPage(title string) (*Page, error) {
+	filename := title + ".txt"
+	body, err := ioutil.ReadFile(filename)
+	if err != nil {
+		return nil, err
+	}
+	return &Page{Title: title, Body: body}, nil
+}
+
+func viewHandler(w http.ResponseWriter, r *http.Request) {
+	title, err := getTitle(w, r)
+	if err != nil {
+		return
+	}
+	p, err := loadPage(title)
+	if err != nil {
+		http.Redirect(w, r, "/edit/"+title, http.StatusFound)
+		return
+	}
+	renderTemplate(w, "view", p)
+}
+
+func editHandler(w http.ResponseWriter, r *http.Request) {
+	title, err := getTitle(w, r)
+	if err != nil {
+		return
+	}
+	p, err := loadPage(title)
+	if err != nil {
+		p = &Page{Title: title}
+	}
+	renderTemplate(w, "edit", p)
+}
+
+func saveHandler(w http.ResponseWriter, r *http.Request) {
+	title, err := getTitle(w, r)
+	if err != nil {
+		return
+	}
+	body := r.FormValue("body")
+	p := &Page{Title: title, Body: []byte(body)}
+	err = p.save()
+	if err != nil {
+		http.Error(w, err.Error(), http.StatusInternalServerError)
+		return
+	}
+	http.Redirect(w, r, "/view/"+title, http.StatusFound)
+}
+
+func renderTemplate(w http.ResponseWriter, tmpl string, p *Page) {
+	t, err := template.ParseFiles(tmpl + ".html")
+	if err != nil {
+		http.Error(w, err.Error(), http.StatusInternalServerError)
+		return
+	}
+	err = t.Execute(w, p)
+	if err != nil {
+		http.Error(w, err.Error(), http.StatusInternalServerError)
+	}
+}
+
+var validPath = regexp.MustCompile("^/(edit|save|view)/([a-zA-Z0-9]+)$")
+
+func getTitle(w http.ResponseWriter, r *http.Request) (string, error) {
+	m := validPath.FindStringSubmatch(r.URL.Path)
+	if m == nil {
+		http.NotFound(w, r)
+		return "", errors.New("invalid Page Title")
+	}
+	return m[2], nil // The title is the second subexpression.
+}
+
+func main() {
+	http.HandleFunc("/view/", viewHandler)
+	http.HandleFunc("/edit/", editHandler)
+	http.HandleFunc("/save/", saveHandler)
+	log.Fatal(http.ListenAndServe(":8080", nil))
+}
diff --git a/_content/doc/articles/wiki/final-noerror.go b/_content/doc/articles/wiki/final-noerror.go
new file mode 100644
index 0000000..250236d
--- /dev/null
+++ b/_content/doc/articles/wiki/final-noerror.go
@@ -0,0 +1,56 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build ignore
+
+package main
+
+import (
+	"html/template"
+	"io/ioutil"
+	"log"
+	"net/http"
+)
+
+type Page struct {
+	Title string
+	Body  []byte
+}
+
+func (p *Page) save() error {
+	filename := p.Title + ".txt"
+	return ioutil.WriteFile(filename, p.Body, 0600)
+}
+
+func loadPage(title string) (*Page, error) {
+	filename := title + ".txt"
+	body, err := ioutil.ReadFile(filename)
+	if err != nil {
+		return nil, err
+	}
+	return &Page{Title: title, Body: body}, nil
+}
+
+func editHandler(w http.ResponseWriter, r *http.Request) {
+	title := r.URL.Path[len("/edit/"):]
+	p, err := loadPage(title)
+	if err != nil {
+		p = &Page{Title: title}
+	}
+	t, _ := template.ParseFiles("edit.html")
+	t.Execute(w, p)
+}
+
+func viewHandler(w http.ResponseWriter, r *http.Request) {
+	title := r.URL.Path[len("/view/"):]
+	p, _ := loadPage(title)
+	t, _ := template.ParseFiles("view.html")
+	t.Execute(w, p)
+}
+
+func main() {
+	http.HandleFunc("/view/", viewHandler)
+	http.HandleFunc("/edit/", editHandler)
+	log.Fatal(http.ListenAndServe(":8080", nil))
+}
diff --git a/_content/doc/articles/wiki/final-parsetemplate.go b/_content/doc/articles/wiki/final-parsetemplate.go
new file mode 100644
index 0000000..0b90cbd
--- /dev/null
+++ b/_content/doc/articles/wiki/final-parsetemplate.go
@@ -0,0 +1,94 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build ignore
+
+package main
+
+import (
+	"html/template"
+	"io/ioutil"
+	"log"
+	"net/http"
+	"regexp"
+)
+
+type Page struct {
+	Title string
+	Body  []byte
+}
+
+func (p *Page) save() error {
+	filename := p.Title + ".txt"
+	return ioutil.WriteFile(filename, p.Body, 0600)
+}
+
+func loadPage(title string) (*Page, error) {
+	filename := title + ".txt"
+	body, err := ioutil.ReadFile(filename)
+	if err != nil {
+		return nil, err
+	}
+	return &Page{Title: title, Body: body}, nil
+}
+
+func viewHandler(w http.ResponseWriter, r *http.Request, title string) {
+	p, err := loadPage(title)
+	if err != nil {
+		http.Redirect(w, r, "/edit/"+title, http.StatusFound)
+		return
+	}
+	renderTemplate(w, "view", p)
+}
+
+func editHandler(w http.ResponseWriter, r *http.Request, title string) {
+	p, err := loadPage(title)
+	if err != nil {
+		p = &Page{Title: title}
+	}
+	renderTemplate(w, "edit", p)
+}
+
+func saveHandler(w http.ResponseWriter, r *http.Request, title string) {
+	body := r.FormValue("body")
+	p := &Page{Title: title, Body: []byte(body)}
+	err := p.save()
+	if err != nil {
+		http.Error(w, err.Error(), http.StatusInternalServerError)
+		return
+	}
+	http.Redirect(w, r, "/view/"+title, http.StatusFound)
+}
+
+func renderTemplate(w http.ResponseWriter, tmpl string, p *Page) {
+	t, err := template.ParseFiles(tmpl + ".html")
+	if err != nil {
+		http.Error(w, err.Error(), http.StatusInternalServerError)
+		return
+	}
+	err = t.Execute(w, p)
+	if err != nil {
+		http.Error(w, err.Error(), http.StatusInternalServerError)
+	}
+}
+
+var validPath = regexp.MustCompile("^/(edit|save|view)/([a-zA-Z0-9]+)$")
+
+func makeHandler(fn func(http.ResponseWriter, *http.Request, string)) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		m := validPath.FindStringSubmatch(r.URL.Path)
+		if m == nil {
+			http.NotFound(w, r)
+			return
+		}
+		fn(w, r, m[2])
+	}
+}
+
+func main() {
+	http.HandleFunc("/view/", makeHandler(viewHandler))
+	http.HandleFunc("/edit/", makeHandler(editHandler))
+	http.HandleFunc("/save/", makeHandler(saveHandler))
+	log.Fatal(http.ListenAndServe(":8080", nil))
+}
diff --git a/_content/doc/articles/wiki/final-template.go b/_content/doc/articles/wiki/final-template.go
new file mode 100644
index 0000000..5028664
--- /dev/null
+++ b/_content/doc/articles/wiki/final-template.go
@@ -0,0 +1,68 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build ignore
+
+package main
+
+import (
+	"html/template"
+	"io/ioutil"
+	"log"
+	"net/http"
+)
+
+type Page struct {
+	Title string
+	Body  []byte
+}
+
+func (p *Page) save() error {
+	filename := p.Title + ".txt"
+	return ioutil.WriteFile(filename, p.Body, 0600)
+}
+
+func loadPage(title string) (*Page, error) {
+	filename := title + ".txt"
+	body, err := ioutil.ReadFile(filename)
+	if err != nil {
+		return nil, err
+	}
+	return &Page{Title: title, Body: body}, nil
+}
+
+func editHandler(w http.ResponseWriter, r *http.Request) {
+	title := r.URL.Path[len("/edit/"):]
+	p, err := loadPage(title)
+	if err != nil {
+		p = &Page{Title: title}
+	}
+	renderTemplate(w, "edit", p)
+}
+
+func viewHandler(w http.ResponseWriter, r *http.Request) {
+	title := r.URL.Path[len("/view/"):]
+	p, _ := loadPage(title)
+	renderTemplate(w, "view", p)
+}
+
+func saveHandler(w http.ResponseWriter, r *http.Request) {
+	title := r.URL.Path[len("/save/"):]
+	body := r.FormValue("body")
+	p := &Page{Title: title, Body: []byte(body)}
+	p.save()
+	http.Redirect(w, r, "/view/"+title, http.StatusFound)
+}
+
+func renderTemplate(w http.ResponseWriter, tmpl string, p *Page) {
+	t, _ := template.ParseFiles(tmpl + ".html")
+	t.Execute(w, p)
+}
+
+func main() {
+	http.HandleFunc("/view/", viewHandler)
+	http.HandleFunc("/edit/", editHandler)
+	http.HandleFunc("/save/", saveHandler)
+	log.Fatal(http.ListenAndServe(":8080", nil))
+}
diff --git a/_content/doc/articles/wiki/final.go b/_content/doc/articles/wiki/final.go
new file mode 100644
index 0000000..b1439b0
--- /dev/null
+++ b/_content/doc/articles/wiki/final.go
@@ -0,0 +1,92 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build ignore
+
+package main
+
+import (
+	"html/template"
+	"io/ioutil"
+	"log"
+	"net/http"
+	"regexp"
+)
+
+type Page struct {
+	Title string
+	Body  []byte
+}
+
+func (p *Page) save() error {
+	filename := p.Title + ".txt"
+	return ioutil.WriteFile(filename, p.Body, 0600)
+}
+
+func loadPage(title string) (*Page, error) {
+	filename := title + ".txt"
+	body, err := ioutil.ReadFile(filename)
+	if err != nil {
+		return nil, err
+	}
+	return &Page{Title: title, Body: body}, nil
+}
+
+func viewHandler(w http.ResponseWriter, r *http.Request, title string) {
+	p, err := loadPage(title)
+	if err != nil {
+		http.Redirect(w, r, "/edit/"+title, http.StatusFound)
+		return
+	}
+	renderTemplate(w, "view", p)
+}
+
+func editHandler(w http.ResponseWriter, r *http.Request, title string) {
+	p, err := loadPage(title)
+	if err != nil {
+		p = &Page{Title: title}
+	}
+	renderTemplate(w, "edit", p)
+}
+
+func saveHandler(w http.ResponseWriter, r *http.Request, title string) {
+	body := r.FormValue("body")
+	p := &Page{Title: title, Body: []byte(body)}
+	err := p.save()
+	if err != nil {
+		http.Error(w, err.Error(), http.StatusInternalServerError)
+		return
+	}
+	http.Redirect(w, r, "/view/"+title, http.StatusFound)
+}
+
+var templates = template.Must(template.ParseFiles("edit.html", "view.html"))
+
+func renderTemplate(w http.ResponseWriter, tmpl string, p *Page) {
+	err := templates.ExecuteTemplate(w, tmpl+".html", p)
+	if err != nil {
+		http.Error(w, err.Error(), http.StatusInternalServerError)
+	}
+}
+
+var validPath = regexp.MustCompile("^/(edit|save|view)/([a-zA-Z0-9]+)$")
+
+func makeHandler(fn func(http.ResponseWriter, *http.Request, string)) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		m := validPath.FindStringSubmatch(r.URL.Path)
+		if m == nil {
+			http.NotFound(w, r)
+			return
+		}
+		fn(w, r, m[2])
+	}
+}
+
+func main() {
+	http.HandleFunc("/view/", makeHandler(viewHandler))
+	http.HandleFunc("/edit/", makeHandler(editHandler))
+	http.HandleFunc("/save/", makeHandler(saveHandler))
+
+	log.Fatal(http.ListenAndServe(":8080", nil))
+}
diff --git a/_content/doc/articles/wiki/final_test.go b/_content/doc/articles/wiki/final_test.go
new file mode 100644
index 0000000..7644699
--- /dev/null
+++ b/_content/doc/articles/wiki/final_test.go
@@ -0,0 +1,24 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build ignore
+
+package main
+
+import (
+	"fmt"
+	"log"
+	"net"
+	"net/http"
+)
+
+func serve() error {
+	l, err := net.Listen("tcp", "127.0.0.1:0")
+	if err != nil {
+		log.Fatal(err)
+	}
+	fmt.Println(l.Addr().String())
+	s := &http.Server{}
+	return s.Serve(l)
+}
diff --git a/_content/doc/articles/wiki/go.mod b/_content/doc/articles/wiki/go.mod
new file mode 100644
index 0000000..38153ed
--- /dev/null
+++ b/_content/doc/articles/wiki/go.mod
@@ -0,0 +1,3 @@
+module doc/articles/wiki
+
+go 1.14
diff --git a/_content/doc/articles/wiki/http-sample.go b/_content/doc/articles/wiki/http-sample.go
new file mode 100644
index 0000000..803b88c
--- /dev/null
+++ b/_content/doc/articles/wiki/http-sample.go
@@ -0,0 +1,18 @@
+// +build ignore
+
+package main
+
+import (
+	"fmt"
+	"log"
+	"net/http"
+)
+
+func handler(w http.ResponseWriter, r *http.Request) {
+	fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:])
+}
+
+func main() {
+	http.HandleFunc("/", handler)
+	log.Fatal(http.ListenAndServe(":8080", nil))
+}
diff --git a/_content/doc/articles/wiki/index.html b/_content/doc/articles/wiki/index.html
new file mode 100644
index 0000000..a74a58e
--- /dev/null
+++ b/_content/doc/articles/wiki/index.html
@@ -0,0 +1,741 @@
+<!--{
+	"Title": "Writing Web Applications",
+	"Template": true
+}-->
+
+<h2>Introduction</h2>
+
+<p>
+Covered in this tutorial:
+</p>
+<ul>
+<li>Creating a data structure with load and save methods</li>
+<li>Using the <code>net/http</code> package to build web applications
+<li>Using the <code>html/template</code> package to process HTML templates</li>
+<li>Using the <code>regexp</code> package to validate user input</li>
+<li>Using closures</li>
+</ul>
+
+<p>
+Assumed knowledge:
+</p>
+<ul>
+<li>Programming experience</li>
+<li>Understanding of basic web technologies (HTTP, HTML)</li>
+<li>Some UNIX/DOS command-line knowledge</li>
+</ul>
+
+<h2>Getting Started</h2>
+
+<p>
+At present, you need to have a FreeBSD, Linux, OS X, or Windows machine to run Go.
+We will use <code>$</code> to represent the command prompt.
+</p>
+
+<p>
+Install Go (see the <a href="/doc/install">Installation Instructions</a>).
+</p>
+
+<p>
+Make a new directory for this tutorial inside your <code>GOPATH</code> and cd to it:
+</p>
+
+<pre>
+$ mkdir gowiki
+$ cd gowiki
+</pre>
+
+<p>
+Create a file named <code>wiki.go</code>, open it in your favorite editor, and
+add the following lines:
+</p>
+
+<pre>
+package main
+
+import (
+	"fmt"
+	"io/ioutil"
+)
+</pre>
+
+<p>
+We import the <code>fmt</code> and <code>ioutil</code> packages from the Go
+standard library. Later, as we implement additional functionality, we will
+add more packages to this <code>import</code> declaration.
+</p>
+
+<h2>Data Structures</h2>
+
+<p>
+Let's start by defining the data structures. A wiki consists of a series of
+interconnected pages, each of which has a title and a body (the page content).
+Here, we define <code>Page</code> as a struct with two fields representing
+the title and body.
+</p>
+
+{{code "doc/articles/wiki/part1.go" `/^type Page/` `/}/`}}
+
+<p>
+The type <code>[]byte</code> means "a <code>byte</code> slice".
+(See <a href="/doc/articles/slices_usage_and_internals.html">Slices: usage and
+internals</a> for more on slices.)
+The <code>Body</code> element is a <code>[]byte</code> rather than
+<code>string</code> because that is the type expected by the <code>io</code>
+libraries we will use, as you'll see below.
+</p>
+
+<p>
+The <code>Page</code> struct describes how page data will be stored in memory.
+But what about persistent storage? We can address that by creating a
+<code>save</code> method on <code>Page</code>:
+</p>
+
+{{code "doc/articles/wiki/part1.go" `/^func.*Page.*save/` `/}/`}}
+
+<p>
+This method's signature reads: "This is a method named <code>save</code> that
+takes as its receiver <code>p</code>, a pointer to <code>Page</code> . It takes
+no parameters, and returns a value of type <code>error</code>."
+</p>
+
+<p>
+This method will save the <code>Page</code>'s <code>Body</code> to a text
+file. For simplicity, we will use the <code>Title</code> as the file name.
+</p>
+
+<p>
+The <code>save</code> method returns an <code>error</code> value because
+that is the return type of <code>WriteFile</code> (a standard library function
+that writes a byte slice to a file).  The <code>save</code> method returns the
+error value, to let the application handle it should anything go wrong while
+writing the file.  If all goes well, <code>Page.save()</code> will return
+<code>nil</code> (the zero-value for pointers, interfaces, and some other
+types).
+</p>
+
+<p>
+The octal integer literal <code>0600</code>, passed as the third parameter to
+<code>WriteFile</code>, indicates that the file should be created with
+read-write permissions for the current user only. (See the Unix man page
+<code>open(2)</code> for details.)
+</p>
+
+<p>
+In addition to saving pages, we will want to load pages, too:
+</p>
+
+{{code "doc/articles/wiki/part1-noerror.go" `/^func loadPage/` `/^}/`}}
+
+<p>
+The function <code>loadPage</code> constructs the file name from the title
+parameter, reads the file's contents into a new variable <code>body</code>, and
+returns a pointer to a <code>Page</code> literal constructed with the proper
+title and body values.
+</p>
+
+<p>
+Functions can return multiple values. The standard library function
+<code>io.ReadFile</code> returns <code>[]byte</code> and <code>error</code>.
+In <code>loadPage</code>, error isn't being handled yet; the "blank identifier"
+represented by the underscore (<code>_</code>) symbol is used to throw away the
+error return value (in essence, assigning the value to nothing).
+</p>
+
+<p>
+But what happens if <code>ReadFile</code> encounters an error?  For example,
+the file might not exist. We should not ignore such errors.  Let's modify the
+function to return <code>*Page</code> and <code>error</code>.
+</p>
+
+{{code "doc/articles/wiki/part1.go" `/^func loadPage/` `/^}/`}}
+
+<p>
+Callers of this function can now check the second parameter; if it is
+<code>nil</code> then it has successfully loaded a Page. If not, it will be an
+<code>error</code> that can be handled by the caller (see the
+<a href="/ref/spec#Errors">language specification</a> for details).
+</p>
+
+<p>
+At this point we have a simple data structure and the ability to save to and
+load from a file. Let's write a <code>main</code> function to test what we've
+written:
+</p>
+
+{{code "doc/articles/wiki/part1.go" `/^func main/` `/^}/`}}
+
+<p>
+After compiling and executing this code, a file named <code>TestPage.txt</code>
+would be created, containing the contents of <code>p1</code>. The file would
+then be read into the struct <code>p2</code>, and its <code>Body</code> element
+printed to the screen.
+</p>
+
+<p>
+You can compile and run the program like this:
+</p>
+
+<pre>
+$ go build wiki.go
+$ ./wiki
+This is a sample Page.
+</pre>
+
+<p>
+(If you're using Windows you must type "<code>wiki</code>" without the
+"<code>./</code>" to run the program.)
+</p>
+
+<p>
+<a href="part1.go">Click here to view the code we've written so far.</a>
+</p>
+
+<h2>Introducing the <code>net/http</code> package (an interlude)</h2>
+
+<p>
+Here's a full working example of a simple web server:
+</p>
+
+{{code "doc/articles/wiki/http-sample.go"}}
+
+<p>
+The <code>main</code> function begins with a call to
+<code>http.HandleFunc</code>, which tells the <code>http</code> package to
+handle all requests to the web root (<code>"/"</code>) with
+<code>handler</code>.
+</p>
+
+<p>
+It then calls <code>http.ListenAndServe</code>, specifying that it should
+listen on port 8080 on any interface (<code>":8080"</code>). (Don't
+worry about its second parameter, <code>nil</code>, for now.)
+This function will block until the program is terminated.
+</p>
+
+<p>
+<code>ListenAndServe</code> always returns an error, since it only returns when an
+unexpected error occurs.
+In order to log that error we wrap the function call with <code>log.Fatal</code>.
+</p>
+
+<p>
+The function <code>handler</code> is of the type <code>http.HandlerFunc</code>.
+It takes an <code>http.ResponseWriter</code> and an <code>http.Request</code> as
+its arguments.
+</p>
+
+<p>
+An <code>http.ResponseWriter</code> value assembles the HTTP server's response; by writing
+to it, we send data to the HTTP client.
+</p>
+
+<p>
+An <code>http.Request</code> is a data structure that represents the client
+HTTP request. <code>r.URL.Path</code> is the path component
+of the request URL. The trailing <code>[1:]</code> means
+"create a sub-slice of <code>Path</code> from the 1st character to the end."
+This drops the leading "/" from the path name.
+</p>
+
+<p>
+If you run this program and access the URL:
+</p>
+<pre>http://localhost:8080/monkeys</pre>
+<p>
+the program would present a page containing:
+</p>
+<pre>Hi there, I love monkeys!</pre>
+
+<h2>Using <code>net/http</code> to serve wiki pages</h2>
+
+<p>
+To use the <code>net/http</code> package, it must be imported:
+</p>
+
+<pre>
+import (
+	"fmt"
+	"io/ioutil"
+	"log"
+	<b>"net/http"</b>
+)
+</pre>
+
+<p>
+Let's create a handler, <code>viewHandler</code> that will allow users to
+view a wiki page. It will handle URLs prefixed with "/view/".
+</p>
+
+{{code "doc/articles/wiki/part2.go" `/^func viewHandler/` `/^}/`}}
+
+<p>
+Again, note the use of <code>_</code> to ignore the <code>error</code>
+return value from <code>loadPage</code>. This is done here for simplicity
+and generally considered bad practice. We will attend to this later.
+</p>
+
+<p>
+First, this function extracts the page title from <code>r.URL.Path</code>,
+the path component of the request URL.
+The <code>Path</code> is re-sliced with <code>[len("/view/"):]</code> to drop
+the leading <code>"/view/"</code> component of the request path.
+This is because the path will invariably begin with <code>"/view/"</code>,
+which is not part of the page's title.
+</p>
+
+<p>
+The function then loads the page data, formats the page with a string of simple
+HTML, and writes it to <code>w</code>, the <code>http.ResponseWriter</code>.
+</p>
+
+<p>
+To use this handler, we rewrite our <code>main</code> function to
+initialize <code>http</code> using the <code>viewHandler</code> to handle
+any requests under the path <code>/view/</code>.
+</p>
+
+{{code "doc/articles/wiki/part2.go" `/^func main/` `/^}/`}}
+
+<p>
+<a href="part2.go">Click here to view the code we've written so far.</a>
+</p>
+
+<p>
+Let's create some page data (as <code>test.txt</code>), compile our code, and
+try serving a wiki page.
+</p>
+
+<p>
+Open <code>test.txt</code> file in your editor, and save the string "Hello world" (without quotes)
+in it.
+</p>
+
+<pre>
+$ go build wiki.go
+$ ./wiki
+</pre>
+
+<p>
+(If you're using Windows you must type "<code>wiki</code>" without the
+"<code>./</code>" to run the program.)
+</p>
+
+<p>
+With this web server running, a visit to <code><a
+href="http://localhost:8080/view/test">http://localhost:8080/view/test</a></code>
+should show a page titled "test" containing the words "Hello world".
+</p>
+
+<h2>Editing Pages</h2>
+
+<p>
+A wiki is not a wiki without the ability to edit pages. Let's create two new
+handlers: one named <code>editHandler</code> to display an 'edit page' form,
+and the other named <code>saveHandler</code> to save the data entered via the
+form.
+</p>
+
+<p>
+First, we add them to <code>main()</code>:
+</p>
+
+{{code "doc/articles/wiki/final-noclosure.go" `/^func main/` `/^}/`}}
+
+<p>
+The function <code>editHandler</code> loads the page
+(or, if it doesn't exist, create an empty <code>Page</code> struct),
+and displays an HTML form.
+</p>
+
+{{code "doc/articles/wiki/notemplate.go" `/^func editHandler/` `/^}/`}}
+
+<p>
+This function will work fine, but all that hard-coded HTML is ugly.
+Of course, there is a better way.
+</p>
+
+<h2>The <code>html/template</code> package</h2>
+
+<p>
+The <code>html/template</code> package is part of the Go standard library.
+We can use <code>html/template</code> to keep the HTML in a separate file,
+allowing us to change the layout of our edit page without modifying the
+underlying Go code.
+</p>
+
+<p>
+First, we must add <code>html/template</code> to the list of imports. We
+also won't be using <code>fmt</code> anymore, so we have to remove that.
+</p>
+
+<pre>
+import (
+	<b>"html/template"</b>
+	"io/ioutil"
+	"net/http"
+)
+</pre>
+
+<p>
+Let's create a template file containing the HTML form.
+Open a new file named <code>edit.html</code>, and add the following lines:
+</p>
+
+{{code "doc/articles/wiki/edit.html"}}
+
+<p>
+Modify <code>editHandler</code> to use the template, instead of the hard-coded
+HTML:
+</p>
+
+{{code "doc/articles/wiki/final-noerror.go" `/^func editHandler/` `/^}/`}}
+
+<p>
+The function <code>template.ParseFiles</code> will read the contents of
+<code>edit.html</code> and return a <code>*template.Template</code>.
+</p>
+
+<p>
+The method <code>t.Execute</code> executes the template, writing the
+generated HTML to the <code>http.ResponseWriter</code>.
+The <code>.Title</code> and <code>.Body</code> dotted identifiers refer to
+<code>p.Title</code> and <code>p.Body</code>.
+</p>
+
+<p>
+Template directives are enclosed in double curly braces.
+The <code>printf "%s" .Body</code> instruction is a function call
+that outputs <code>.Body</code> as a string instead of a stream of bytes,
+the same as a call to <code>fmt.Printf</code>.
+The <code>html/template</code> package helps guarantee that only safe and
+correct-looking HTML is generated by template actions. For instance, it
+automatically escapes any greater than sign (<code>&gt;</code>), replacing it
+with <code>&amp;gt;</code>, to make sure user data does not corrupt the form
+HTML.
+</p>
+
+<p>
+Since we're working with templates now, let's create a template for our
+<code>viewHandler</code> called <code>view.html</code>:
+</p>
+
+{{code "doc/articles/wiki/view.html"}}
+
+<p>
+Modify <code>viewHandler</code> accordingly:
+</p>
+
+{{code "doc/articles/wiki/final-noerror.go" `/^func viewHandler/` `/^}/`}}
+
+<p>
+Notice that we've used almost exactly the same templating code in both
+handlers. Let's remove this duplication by moving the templating code
+to its own function:
+</p>
+
+{{code "doc/articles/wiki/final-template.go" `/^func renderTemplate/` `/^}/`}}
+
+<p>
+And modify the handlers to use that function:
+</p>
+
+{{code "doc/articles/wiki/final-template.go" `/^func viewHandler/` `/^}/`}}
+{{code "doc/articles/wiki/final-template.go" `/^func editHandler/` `/^}/`}}
+
+<p>
+If we comment out the registration of our unimplemented save handler in
+<code>main</code>, we can once again build and test our program.
+<a href="part3.go">Click here to view the code we've written so far.</a>
+</p>
+
+<h2>Handling non-existent pages</h2>
+
+<p>
+What if you visit <a href="http://localhost:8080/view/APageThatDoesntExist">
+<code>/view/APageThatDoesntExist</code></a>? You'll see a page containing
+HTML. This is because it ignores the error return value from
+<code>loadPage</code> and continues to try and fill out the template
+with no data. Instead, if the requested Page doesn't exist, it should
+redirect the client to the edit Page so the content may be created:
+</p>
+
+{{code "doc/articles/wiki/part3-errorhandling.go" `/^func viewHandler/` `/^}/`}}
+
+<p>
+The <code>http.Redirect</code> function adds an HTTP status code of
+<code>http.StatusFound</code> (302) and a <code>Location</code>
+header to the HTTP response.
+</p>
+
+<h2>Saving Pages</h2>
+
+<p>
+The function <code>saveHandler</code> will handle the submission of forms
+located on the edit pages. After uncommenting the related line in
+<code>main</code>, let's implement the handler:
+</p>
+
+{{code "doc/articles/wiki/final-template.go" `/^func saveHandler/` `/^}/`}}
+
+<p>
+The page title (provided in the URL) and the form's only field,
+<code>Body</code>, are stored in a new <code>Page</code>.
+The <code>save()</code> method is then called to write the data to a file,
+and the client is redirected to the <code>/view/</code> page.
+</p>
+
+<p>
+The value returned by <code>FormValue</code> is of type <code>string</code>.
+We must convert that value to <code>[]byte</code> before it will fit into
+the <code>Page</code> struct. We use <code>[]byte(body)</code> to perform
+the conversion.
+</p>
+
+<h2>Error handling</h2>
+
+<p>
+There are several places in our program where errors are being ignored.  This
+is bad practice, not least because when an error does occur the program will
+have unintended behavior. A better solution is to handle the errors and return
+an error message to the user. That way if something does go wrong, the server
+will function exactly how we want and the user can be notified.
+</p>
+
+<p>
+First, let's handle the errors in <code>renderTemplate</code>:
+</p>
+
+{{code "doc/articles/wiki/final-parsetemplate.go" `/^func renderTemplate/` `/^}/`}}
+
+<p>
+The <code>http.Error</code> function sends a specified HTTP response code
+(in this case "Internal Server Error") and error message.
+Already the decision to put this in a separate function is paying off.
+</p>
+
+<p>
+Now let's fix up <code>saveHandler</code>:
+</p>
+
+{{code "doc/articles/wiki/part3-errorhandling.go" `/^func saveHandler/` `/^}/`}}
+
+<p>
+Any errors that occur during <code>p.save()</code> will be reported
+to the user.
+</p>
+
+<h2>Template caching</h2>
+
+<p>
+There is an inefficiency in this code: <code>renderTemplate</code> calls
+<code>ParseFiles</code> every time a page is rendered.
+A better approach would be to call <code>ParseFiles</code> once at program
+initialization, parsing all templates into a single <code>*Template</code>.
+Then we can use the
+<a href="/pkg/html/template/#Template.ExecuteTemplate"><code>ExecuteTemplate</code></a>
+method to render a specific template.
+</p>
+
+<p>
+First we create a global variable named <code>templates</code>, and initialize
+it with <code>ParseFiles</code>.
+</p>
+
+{{code "doc/articles/wiki/final.go" `/var templates/`}}
+
+<p>
+The function <code>template.Must</code> is a convenience wrapper that panics
+when passed a non-nil <code>error</code> value, and otherwise returns the
+<code>*Template</code> unaltered. A panic is appropriate here; if the templates
+can't be loaded the only sensible thing to do is exit the program.
+</p>
+
+<p>
+The <code>ParseFiles</code> function takes any number of string arguments that
+identify our template files, and parses those files into templates that are
+named after the base file name. If we were to add more templates to our
+program, we would add their names to the <code>ParseFiles</code> call's
+arguments.
+</p>
+
+<p>
+We then modify the <code>renderTemplate</code> function to call the
+<code>templates.ExecuteTemplate</code> method with the name of the appropriate
+template:
+</p>
+
+{{code "doc/articles/wiki/final.go" `/func renderTemplate/` `/^}/`}}
+
+<p>
+Note that the template name is the template file name, so we must
+append <code>".html"</code> to the <code>tmpl</code> argument.
+</p>
+
+<h2>Validation</h2>
+
+<p>
+As you may have observed, this program has a serious security flaw: a user
+can supply an arbitrary path to be read/written on the server. To mitigate
+this, we can write a function to validate the title with a regular expression.
+</p>
+
+<p>
+First, add <code>"regexp"</code> to the <code>import</code> list.
+Then we can create a global variable to store our validation
+expression:
+</p>
+
+{{code "doc/articles/wiki/final-noclosure.go" `/^var validPath/`}}
+
+<p>
+The function <code>regexp.MustCompile</code> will parse and compile the
+regular expression, and return a <code>regexp.Regexp</code>.
+<code>MustCompile</code> is distinct from <code>Compile</code> in that it will
+panic if the expression compilation fails, while <code>Compile</code> returns
+an <code>error</code> as a second parameter.
+</p>
+
+<p>
+Now, let's write a function that uses the <code>validPath</code>
+expression to validate path and extract the page title:
+</p>
+
+{{code "doc/articles/wiki/final-noclosure.go" `/func getTitle/` `/^}/`}}
+
+<p>
+If the title is valid, it will be returned along with a <code>nil</code>
+error value. If the title is invalid, the function will write a
+"404 Not Found" error to the HTTP connection, and return an error to the
+handler. To create a new error, we have to import the <code>errors</code>
+package.
+</p>
+
+<p>
+Let's put a call to <code>getTitle</code> in each of the handlers:
+</p>
+
+{{code "doc/articles/wiki/final-noclosure.go" `/^func viewHandler/` `/^}/`}}
+{{code "doc/articles/wiki/final-noclosure.go" `/^func editHandler/` `/^}/`}}
+{{code "doc/articles/wiki/final-noclosure.go" `/^func saveHandler/` `/^}/`}}
+
+<h2>Introducing Function Literals and Closures</h2>
+
+<p>
+Catching the error condition in each handler introduces a lot of repeated code.
+What if we could wrap each of the handlers in a function that does this
+validation and error checking? Go's
+<a href="/ref/spec#Function_literals">function
+literals</a> provide a powerful means of abstracting functionality
+that can help us here.
+</p>
+
+<p>
+First, we re-write the function definition of each of the handlers to accept
+a title string:
+</p>
+
+<pre>
+func viewHandler(w http.ResponseWriter, r *http.Request, title string)
+func editHandler(w http.ResponseWriter, r *http.Request, title string)
+func saveHandler(w http.ResponseWriter, r *http.Request, title string)
+</pre>
+
+<p>
+Now let's define a wrapper function that <i>takes a function of the above
+type</i>, and returns a function of type <code>http.HandlerFunc</code>
+(suitable to be passed to the function <code>http.HandleFunc</code>):
+</p>
+
+<pre>
+func makeHandler(fn func (http.ResponseWriter, *http.Request, string)) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		// Here we will extract the page title from the Request,
+		// and call the provided handler 'fn'
+	}
+}
+</pre>
+
+<p>
+The returned function is called a closure because it encloses values defined
+outside of it. In this case, the variable <code>fn</code> (the single argument
+to <code>makeHandler</code>) is enclosed by the closure. The variable
+<code>fn</code> will be one of our save, edit, or view handlers.
+</p>
+
+<p>
+Now we can take the code from <code>getTitle</code> and use it here
+(with some minor modifications):
+</p>
+
+{{code "doc/articles/wiki/final.go" `/func makeHandler/` `/^}/`}}
+
+<p>
+The closure returned by <code>makeHandler</code> is a function that takes
+an <code>http.ResponseWriter</code> and <code>http.Request</code> (in other
+words, an <code>http.HandlerFunc</code>).
+The closure extracts the <code>title</code> from the request path, and
+validates it with the <code>validPath</code> regexp. If the
+<code>title</code> is invalid, an error will be written to the
+<code>ResponseWriter</code> using the <code>http.NotFound</code> function.
+If the <code>title</code> is valid, the enclosed handler function
+<code>fn</code> will be called with the <code>ResponseWriter</code>,
+<code>Request</code>, and <code>title</code> as arguments.
+</p>
+
+<p>
+Now we can wrap the handler functions with <code>makeHandler</code> in
+<code>main</code>, before they are registered with the <code>http</code>
+package:
+</p>
+
+{{code "doc/articles/wiki/final.go" `/func main/` `/^}/`}}
+
+<p>
+Finally we remove the calls to <code>getTitle</code> from the handler functions,
+making them much simpler:
+</p>
+
+{{code "doc/articles/wiki/final.go" `/^func viewHandler/` `/^}/`}}
+{{code "doc/articles/wiki/final.go" `/^func editHandler/` `/^}/`}}
+{{code "doc/articles/wiki/final.go" `/^func saveHandler/` `/^}/`}}
+
+<h2>Try it out!</h2>
+
+<p>
+<a href="final.go">Click here to view the final code listing.</a>
+</p>
+
+<p>
+Recompile the code, and run the app:
+</p>
+
+<pre>
+$ go build wiki.go
+$ ./wiki
+</pre>
+
+<p>
+Visiting <a href="http://localhost:8080/view/ANewPage">http://localhost:8080/view/ANewPage</a>
+should present you with the page edit form. You should then be able to
+enter some text, click 'Save', and be redirected to the newly created page.
+</p>
+
+<h2>Other tasks</h2>
+
+<p>
+Here are some simple tasks you might want to tackle on your own:
+</p>
+
+<ul>
+<li>Store templates in <code>tmpl/</code> and page data in <code>data/</code>.
+<li>Add a handler to make the web root redirect to
+	<code>/view/FrontPage</code>.</li>
+<li>Spruce up the page templates by making them valid HTML and adding some
+	CSS rules.</li>
+<li>Implement inter-page linking by converting instances of
+	<code>[PageName]</code> to <br>
+	<code>&lt;a href="/view/PageName"&gt;PageName&lt;/a&gt;</code>.
+	(hint: you could use <code>regexp.ReplaceAllFunc</code> to do this)
+	</li>
+</ul>
diff --git a/_content/doc/articles/wiki/notemplate.go b/_content/doc/articles/wiki/notemplate.go
new file mode 100644
index 0000000..4b358f2
--- /dev/null
+++ b/_content/doc/articles/wiki/notemplate.go
@@ -0,0 +1,59 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build ignore
+
+package main
+
+import (
+	"fmt"
+	"io/ioutil"
+	"log"
+	"net/http"
+)
+
+type Page struct {
+	Title string
+	Body  []byte
+}
+
+func (p *Page) save() error {
+	filename := p.Title + ".txt"
+	return ioutil.WriteFile(filename, p.Body, 0600)
+}
+
+func loadPage(title string) (*Page, error) {
+	filename := title + ".txt"
+	body, err := ioutil.ReadFile(filename)
+	if err != nil {
+		return nil, err
+	}
+	return &Page{Title: title, Body: body}, nil
+}
+
+func viewHandler(w http.ResponseWriter, r *http.Request) {
+	title := r.URL.Path[len("/view/"):]
+	p, _ := loadPage(title)
+	fmt.Fprintf(w, "<h1>%s</h1><div>%s</div>", p.Title, p.Body)
+}
+
+func editHandler(w http.ResponseWriter, r *http.Request) {
+	title := r.URL.Path[len("/edit/"):]
+	p, err := loadPage(title)
+	if err != nil {
+		p = &Page{Title: title}
+	}
+	fmt.Fprintf(w, "<h1>Editing %s</h1>"+
+		"<form action=\"/save/%s\" method=\"POST\">"+
+		"<textarea name=\"body\">%s</textarea><br>"+
+		"<input type=\"submit\" value=\"Save\">"+
+		"</form>",
+		p.Title, p.Title, p.Body)
+}
+
+func main() {
+	http.HandleFunc("/view/", viewHandler)
+	http.HandleFunc("/edit/", editHandler)
+	log.Fatal(http.ListenAndServe(":8080", nil))
+}
diff --git a/_content/doc/articles/wiki/part1-noerror.go b/_content/doc/articles/wiki/part1-noerror.go
new file mode 100644
index 0000000..913c6dc
--- /dev/null
+++ b/_content/doc/articles/wiki/part1-noerror.go
@@ -0,0 +1,35 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build ignore
+
+package main
+
+import (
+	"fmt"
+	"io/ioutil"
+)
+
+type Page struct {
+	Title string
+	Body  []byte
+}
+
+func (p *Page) save() error {
+	filename := p.Title + ".txt"
+	return ioutil.WriteFile(filename, p.Body, 0600)
+}
+
+func loadPage(title string) *Page {
+	filename := title + ".txt"
+	body, _ := ioutil.ReadFile(filename)
+	return &Page{Title: title, Body: body}
+}
+
+func main() {
+	p1 := &Page{Title: "TestPage", Body: []byte("This is a sample page.")}
+	p1.save()
+	p2 := loadPage("TestPage")
+	fmt.Println(string(p2.Body))
+}
diff --git a/_content/doc/articles/wiki/part1.go b/_content/doc/articles/wiki/part1.go
new file mode 100644
index 0000000..2ff1abd
--- /dev/null
+++ b/_content/doc/articles/wiki/part1.go
@@ -0,0 +1,38 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build ignore
+
+package main
+
+import (
+	"fmt"
+	"io/ioutil"
+)
+
+type Page struct {
+	Title string
+	Body  []byte
+}
+
+func (p *Page) save() error {
+	filename := p.Title + ".txt"
+	return ioutil.WriteFile(filename, p.Body, 0600)
+}
+
+func loadPage(title string) (*Page, error) {
+	filename := title + ".txt"
+	body, err := ioutil.ReadFile(filename)
+	if err != nil {
+		return nil, err
+	}
+	return &Page{Title: title, Body: body}, nil
+}
+
+func main() {
+	p1 := &Page{Title: "TestPage", Body: []byte("This is a sample Page.")}
+	p1.save()
+	p2, _ := loadPage("TestPage")
+	fmt.Println(string(p2.Body))
+}
diff --git a/_content/doc/articles/wiki/part2.go b/_content/doc/articles/wiki/part2.go
new file mode 100644
index 0000000..db92f4c
--- /dev/null
+++ b/_content/doc/articles/wiki/part2.go
@@ -0,0 +1,44 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build ignore
+
+package main
+
+import (
+	"fmt"
+	"io/ioutil"
+	"log"
+	"net/http"
+)
+
+type Page struct {
+	Title string
+	Body  []byte
+}
+
+func (p *Page) save() error {
+	filename := p.Title + ".txt"
+	return ioutil.WriteFile(filename, p.Body, 0600)
+}
+
+func loadPage(title string) (*Page, error) {
+	filename := title + ".txt"
+	body, err := ioutil.ReadFile(filename)
+	if err != nil {
+		return nil, err
+	}
+	return &Page{Title: title, Body: body}, nil
+}
+
+func viewHandler(w http.ResponseWriter, r *http.Request) {
+	title := r.URL.Path[len("/view/"):]
+	p, _ := loadPage(title)
+	fmt.Fprintf(w, "<h1>%s</h1><div>%s</div>", p.Title, p.Body)
+}
+
+func main() {
+	http.HandleFunc("/view/", viewHandler)
+	log.Fatal(http.ListenAndServe(":8080", nil))
+}
diff --git a/_content/doc/articles/wiki/part3-errorhandling.go b/_content/doc/articles/wiki/part3-errorhandling.go
new file mode 100644
index 0000000..2c8b42d
--- /dev/null
+++ b/_content/doc/articles/wiki/part3-errorhandling.go
@@ -0,0 +1,76 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build ignore
+
+package main
+
+import (
+	"html/template"
+	"io/ioutil"
+	"log"
+	"net/http"
+)
+
+type Page struct {
+	Title string
+	Body  []byte
+}
+
+func (p *Page) save() error {
+	filename := p.Title + ".txt"
+	return ioutil.WriteFile(filename, p.Body, 0600)
+}
+
+func loadPage(title string) (*Page, error) {
+	filename := title + ".txt"
+	body, err := ioutil.ReadFile(filename)
+	if err != nil {
+		return nil, err
+	}
+	return &Page{Title: title, Body: body}, nil
+}
+
+func renderTemplate(w http.ResponseWriter, tmpl string, p *Page) {
+	t, _ := template.ParseFiles(tmpl + ".html")
+	t.Execute(w, p)
+}
+
+func viewHandler(w http.ResponseWriter, r *http.Request) {
+	title := r.URL.Path[len("/view/"):]
+	p, err := loadPage(title)
+	if err != nil {
+		http.Redirect(w, r, "/edit/"+title, http.StatusFound)
+		return
+	}
+	renderTemplate(w, "view", p)
+}
+
+func editHandler(w http.ResponseWriter, r *http.Request) {
+	title := r.URL.Path[len("/edit/"):]
+	p, err := loadPage(title)
+	if err != nil {
+		p = &Page{Title: title}
+	}
+	renderTemplate(w, "edit", p)
+}
+
+func saveHandler(w http.ResponseWriter, r *http.Request) {
+	title := r.URL.Path[len("/save/"):]
+	body := r.FormValue("body")
+	p := &Page{Title: title, Body: []byte(body)}
+	err := p.save()
+	if err != nil {
+		http.Error(w, err.Error(), http.StatusInternalServerError)
+		return
+	}
+	http.Redirect(w, r, "/view/"+title, http.StatusFound)
+}
+
+func main() {
+	http.HandleFunc("/view/", viewHandler)
+	http.HandleFunc("/edit/", editHandler)
+	http.HandleFunc("/save/", saveHandler)
+	log.Fatal(http.ListenAndServe(":8080", nil))
+}
diff --git a/_content/doc/articles/wiki/part3.go b/_content/doc/articles/wiki/part3.go
new file mode 100644
index 0000000..437ea33
--- /dev/null
+++ b/_content/doc/articles/wiki/part3.go
@@ -0,0 +1,60 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build ignore
+
+package main
+
+import (
+	"html/template"
+	"io/ioutil"
+	"log"
+	"net/http"
+)
+
+type Page struct {
+	Title string
+	Body  []byte
+}
+
+func (p *Page) save() error {
+	filename := p.Title + ".txt"
+	return ioutil.WriteFile(filename, p.Body, 0600)
+}
+
+func loadPage(title string) (*Page, error) {
+	filename := title + ".txt"
+	body, err := ioutil.ReadFile(filename)
+	if err != nil {
+		return nil, err
+	}
+	return &Page{Title: title, Body: body}, nil
+}
+
+func renderTemplate(w http.ResponseWriter, tmpl string, p *Page) {
+	t, _ := template.ParseFiles(tmpl + ".html")
+	t.Execute(w, p)
+}
+
+func viewHandler(w http.ResponseWriter, r *http.Request) {
+	title := r.URL.Path[len("/view/"):]
+	p, _ := loadPage(title)
+	renderTemplate(w, "view", p)
+}
+
+func editHandler(w http.ResponseWriter, r *http.Request) {
+	title := r.URL.Path[len("/edit/"):]
+	p, err := loadPage(title)
+	if err != nil {
+		p = &Page{Title: title}
+	}
+	renderTemplate(w, "edit", p)
+}
+
+func main() {
+	http.HandleFunc("/view/", viewHandler)
+	http.HandleFunc("/edit/", editHandler)
+	//http.HandleFunc("/save/", saveHandler)
+	log.Fatal(http.ListenAndServe(":8080", nil))
+}
diff --git a/_content/doc/articles/wiki/test_Test.txt.good b/_content/doc/articles/wiki/test_Test.txt.good
new file mode 100644
index 0000000..f0eec86
--- /dev/null
+++ b/_content/doc/articles/wiki/test_Test.txt.good
@@ -0,0 +1 @@
+some content
\ No newline at end of file
diff --git a/_content/doc/articles/wiki/test_edit.good b/_content/doc/articles/wiki/test_edit.good
new file mode 100644
index 0000000..36c6dbb
--- /dev/null
+++ b/_content/doc/articles/wiki/test_edit.good
@@ -0,0 +1,6 @@
+<h1>Editing Test</h1>
+
+<form action="/save/Test" method="POST">
+<div><textarea name="body" rows="20" cols="80"></textarea></div>
+<div><input type="submit" value="Save"></div>
+</form>
diff --git a/_content/doc/articles/wiki/test_view.good b/_content/doc/articles/wiki/test_view.good
new file mode 100644
index 0000000..07e8edb
--- /dev/null
+++ b/_content/doc/articles/wiki/test_view.good
@@ -0,0 +1,5 @@
+<h1>Test</h1>
+
+<p>[<a href="/edit/Test">edit</a>]</p>
+
+<div>some content</div>
diff --git a/_content/doc/articles/wiki/view.html b/_content/doc/articles/wiki/view.html
new file mode 100644
index 0000000..b1e87ef
--- /dev/null
+++ b/_content/doc/articles/wiki/view.html
@@ -0,0 +1,5 @@
+<h1>{{.Title}}</h1>
+
+<p>[<a href="/edit/{{.Title}}">edit</a>]</p>
+
+<div>{{printf "%s" .Body}}</div>
diff --git a/_content/doc/articles/wiki/wiki_test.go b/_content/doc/articles/wiki/wiki_test.go
new file mode 100644
index 0000000..1d976fd
--- /dev/null
+++ b/_content/doc/articles/wiki/wiki_test.go
@@ -0,0 +1,165 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main_test
+
+import (
+	"bytes"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"os/exec"
+	"path/filepath"
+	"strings"
+	"testing"
+)
+
+func TestSnippetsCompile(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping slow builds in short mode")
+	}
+
+	goFiles, err := filepath.Glob("*.go")
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	for _, f := range goFiles {
+		if strings.HasSuffix(f, "_test.go") {
+			continue
+		}
+		f := f
+		t.Run(f, func(t *testing.T) {
+			t.Parallel()
+
+			cmd := exec.Command("go", "build", "-o", os.DevNull, f)
+			out, err := cmd.CombinedOutput()
+			if err != nil {
+				t.Errorf("%s: %v\n%s", strings.Join(cmd.Args, " "), err, out)
+			}
+		})
+	}
+}
+
+func TestWikiServer(t *testing.T) {
+	must := func(err error) {
+		if err != nil {
+			t.Helper()
+			t.Fatal(err)
+		}
+	}
+
+	dir, err := ioutil.TempDir("", t.Name())
+	must(err)
+	defer os.RemoveAll(dir)
+
+	// We're testing a walkthrough example of how to write a server.
+	//
+	// That server hard-codes a port number to make the walkthrough simpler, but
+	// we can't assume that the hard-coded port is available on an arbitrary
+	// builder. So we'll patch out the hard-coded port, and replace it with a
+	// function that writes the server's address to stdout
+	// so that we can read it and know where to send the test requests.
+
+	finalGo, err := ioutil.ReadFile("final.go")
+	must(err)
+	const patchOld = `log.Fatal(http.ListenAndServe(":8080", nil))`
+	patched := bytes.ReplaceAll(finalGo, []byte(patchOld), []byte(`log.Fatal(serve())`))
+	if bytes.Equal(patched, finalGo) {
+		t.Fatalf("Can't patch final.go: %q not found.", patchOld)
+	}
+	must(ioutil.WriteFile(filepath.Join(dir, "final_patched.go"), patched, 0644))
+
+	// Build the server binary from the patched sources.
+	// The 'go' command requires that they all be in the same directory.
+	// final_test.go provides the implemtation for our serve function.
+	must(copyFile(filepath.Join(dir, "final_srv.go"), "final_test.go"))
+	cmd := exec.Command("go", "build",
+		"-o", filepath.Join(dir, "final.exe"),
+		filepath.Join(dir, "final_patched.go"),
+		filepath.Join(dir, "final_srv.go"))
+	out, err := cmd.CombinedOutput()
+	if err != nil {
+		t.Fatalf("%s: %v\n%s", strings.Join(cmd.Args, " "), err, out)
+	}
+
+	// Run the server in our temporary directory so that it can
+	// write its content there. It also needs a couple of template files,
+	// and looks for them in the same directory.
+	must(copyFile(filepath.Join(dir, "edit.html"), "edit.html"))
+	must(copyFile(filepath.Join(dir, "view.html"), "view.html"))
+	cmd = exec.Command(filepath.Join(dir, "final.exe"))
+	cmd.Dir = dir
+	stderr := bytes.NewBuffer(nil)
+	cmd.Stderr = stderr
+	stdout, err := cmd.StdoutPipe()
+	must(err)
+	must(cmd.Start())
+
+	defer func() {
+		cmd.Process.Kill()
+		err := cmd.Wait()
+		if stderr.Len() > 0 {
+			t.Logf("%s: %v\n%s", strings.Join(cmd.Args, " "), err, stderr)
+		}
+	}()
+
+	var addr string
+	if _, err := fmt.Fscanln(stdout, &addr); err != nil || addr == "" {
+		t.Fatalf("Failed to read server address: %v", err)
+	}
+
+	// The server is up and has told us its address.
+	// Make sure that its HTTP API works as described in the article.
+
+	r, err := http.Get(fmt.Sprintf("http://%s/edit/Test", addr))
+	must(err)
+	responseMustMatchFile(t, r, "test_edit.good")
+
+	r, err = http.Post(fmt.Sprintf("http://%s/save/Test", addr),
+		"application/x-www-form-urlencoded",
+		strings.NewReader("body=some%20content"))
+	must(err)
+	responseMustMatchFile(t, r, "test_view.good")
+
+	gotTxt, err := ioutil.ReadFile(filepath.Join(dir, "Test.txt"))
+	must(err)
+	wantTxt, err := ioutil.ReadFile("test_Test.txt.good")
+	must(err)
+	if !bytes.Equal(wantTxt, gotTxt) {
+		t.Fatalf("Test.txt differs from expected after posting to /save.\ngot:\n%s\nwant:\n%s", gotTxt, wantTxt)
+	}
+
+	r, err = http.Get(fmt.Sprintf("http://%s/view/Test", addr))
+	must(err)
+	responseMustMatchFile(t, r, "test_view.good")
+}
+
+func responseMustMatchFile(t *testing.T, r *http.Response, filename string) {
+	t.Helper()
+
+	defer r.Body.Close()
+	body, err := ioutil.ReadAll(r.Body)
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	wantBody, err := ioutil.ReadFile(filename)
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	if !bytes.Equal(body, wantBody) {
+		t.Fatalf("%v: body does not match %s.\ngot:\n%s\nwant:\n%s", r.Request.URL, filename, body, wantBody)
+	}
+}
+
+func copyFile(dst, src string) error {
+	buf, err := ioutil.ReadFile(src)
+	if err != nil {
+		return err
+	}
+	return ioutil.WriteFile(dst, buf, 0644)
+}
diff --git a/_content/doc/cmd.html b/_content/doc/cmd.html
new file mode 100644
index 0000000..c3bd918
--- /dev/null
+++ b/_content/doc/cmd.html
@@ -0,0 +1,100 @@
+<!--{
+	"Title": "Command Documentation",
+	"Path":  "/doc/cmd"
+}-->
+
+<p>
+There is a suite of programs to build and process Go source code.
+Instead of being run directly, programs in the suite are usually invoked
+by the <a href="/cmd/go/">go</a> program.
+</p>
+
+<p>
+The most common way to run these programs is as a subcommand of the go program,
+for instance as <code>go fmt</code>. Run like this, the command operates on
+complete packages of Go source code, with the go program invoking the
+underlying binary with arguments appropriate to package-level processing.
+</p>
+
+<p>
+The programs can also be run as stand-alone binaries, with unmodified arguments,
+using the go <code>tool</code> subcommand, such as <code>go tool cgo</code>.
+For most commands this is mainly useful for debugging.
+Some of the commands, such as <code>pprof</code>, are accessible only through
+the go <code>tool</code> subcommand.
+</p>
+
+<p>
+Finally the <code>fmt</code> and <code>godoc</code> commands are installed
+as regular binaries called <code>gofmt</code> and <code>godoc</code> because
+they are so often referenced.
+</p>
+
+<p>
+Click on the links for more documentation, invocation methods, and usage details.
+</p>
+
+<table class="dir">
+<tr>
+<th>Name</th>
+<th>&nbsp;&nbsp;&nbsp;&nbsp;</th>
+<th>Synopsis</th>
+</tr>
+
+<tr>
+<td><a href="/cmd/go/">go</a></td>
+<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
+<td>
+The <code>go</code> program manages Go source code and runs the other
+commands listed here.
+See the command docs for usage
+details.
+</td>
+</tr>
+
+<tr>
+<td><a href="/cmd/cgo/">cgo</a></td>
+<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
+<td>Cgo enables the creation of Go packages that call C code.</td>
+</tr>
+
+<tr>
+<td><a href="/cmd/cover/">cover</a></td>
+<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
+<td>Cover is a program for creating and analyzing the coverage profiles
+generated by <code>"go test -coverprofile"</code>.</td>
+</tr>
+
+<tr>
+<td><a href="/cmd/fix/">fix</a></td>
+<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
+<td>Fix finds Go programs that use old features of the language and libraries
+and rewrites them to use newer ones.</td>
+</tr>
+
+<tr>
+<td><a href="/cmd/gofmt/">fmt</a></td>
+<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
+<td>Fmt formats Go packages, it is also available as an independent <a href="/cmd/gofmt/">
+gofmt</a> command with more general options.</td>
+</tr>
+
+<tr>
+<td><a href="//godoc.org/golang.org/x/tools/cmd/godoc/">godoc</a></td>
+<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
+<td>Godoc extracts and generates documentation for Go packages.</td>
+</tr>
+
+<tr>
+<td><a href="/cmd/vet/">vet</a></td>
+<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
+<td>Vet examines Go source code and reports suspicious constructs, such as Printf
+calls whose arguments do not align with the format string.</td>
+</tr>
+
+</table>
+
+<p>
+This is an abridged list. See the <a href="/cmd/">full command reference</a>
+for documentation of the compilers and more.
+</p>
diff --git a/_content/doc/codewalk/codewalk.css b/_content/doc/codewalk/codewalk.css
new file mode 100644
index 0000000..a0814e4
--- /dev/null
+++ b/_content/doc/codewalk/codewalk.css
@@ -0,0 +1,234 @@
+/*
+   Copyright 2010 The Go Authors. All rights reserved.
+   Use of this source code is governed by a BSD-style
+   license that can be found in the LICENSE file.
+*/
+
+#codewalk-main {
+  text-align: left;
+  width: 100%;
+  overflow: auto;
+}
+
+#code-display {
+  border: 0;
+  width: 100%;
+}
+
+.setting {
+  font-size: 8pt;
+  color: #888888;
+  padding: 5px;
+}
+
+.hotkey {
+  text-decoration: underline;
+}
+
+/* Style for Comments (the left-hand column) */
+
+#comment-column {
+  margin: 0pt;
+  width: 30%;
+}
+
+#comment-column.right {
+  float: right;
+}
+
+#comment-column.left {
+  float: left;
+}
+
+#comment-area {
+  overflow-x: hidden;
+  overflow-y: auto;
+}
+
+.comment {
+  cursor: pointer;
+  font-size: 16px;
+  border: 2px solid #ba9836;
+  margin-bottom: 10px;
+  margin-right: 10px;  /* yes, for both .left and .right */
+}
+
+.comment:last-child {
+  margin-bottom: 0px;
+}
+
+.right .comment {
+  margin-left: 10px;
+}
+
+.right .comment.first {
+}
+
+.right .comment.last {
+}
+
+.left .comment.first {
+}
+
+.left .comment.last {
+}
+
+.comment.selected {
+  border-color: #99b2cb;
+}
+
+.right .comment.selected {
+  border-left-width: 12px;
+  margin-left: 0px;
+}
+
+.left .comment.selected {
+  border-right-width: 12px;
+  margin-right: 0px;
+}
+
+.comment-link {
+  display: none;
+}
+
+.comment-title {
+  font-size: small;
+  font-weight: bold;
+  background-color: #fffff0;
+  padding-right: 10px;
+  padding-left: 10px;
+  padding-top: 5px;
+  padding-bottom: 5px;
+}
+
+.right .comment-title {
+}
+
+.left .comment-title {
+}
+
+.comment.selected .comment-title {
+  background-color: #f8f8ff;
+}
+
+.comment-text {
+  overflow: auto;
+  padding-left: 10px;
+  padding-right: 10px;
+  padding-top: 10px;
+  padding-bottom: 5px;
+  font-size: small;
+  line-height: 1.3em;
+}
+
+.comment-text p {
+  margin-top: 0em;
+  margin-bottom: 0.5em;
+}
+
+.comment-text p:last-child {
+  margin-bottom: 0em;
+}
+
+.file-name {
+  font-size: x-small;
+  padding-top: 0px;
+  padding-bottom: 5px;
+}
+
+.hidden-filepaths .file-name {
+  display: none;
+}
+
+.path-dir {
+  color: #555;
+}
+
+.path-file {
+  color: #555;
+}
+
+
+/* Style for Code (the right-hand column) */
+
+/* Wrapper for the code column to make widths get calculated correctly */
+#code-column {
+  display: block;
+  position: relative;
+  margin: 0pt;
+  width: 70%;
+}
+
+#code-column.left {
+  float: left;
+}
+
+#code-column.right {
+  float: right;
+}
+
+#code-area {
+  background-color: #f8f8ff;
+  border: 2px solid #99b2cb;
+  padding: 5px;
+}
+
+.left #code-area {
+  margin-right: -1px;
+}
+
+.right #code-area {
+  margin-left: -1px;
+}
+
+#code-header {
+  margin-bottom: 5px;
+}
+
+#code {
+  background-color: white;
+}
+
+code {
+  font-size: 100%;
+}
+
+.codewalkhighlight {
+  font-weight: bold;
+  background-color: #f8f8ff;
+}
+
+#code-display {
+  margin-top: 0px;
+  margin-bottom: 0px;
+}
+
+#sizer {
+  position: absolute;
+  cursor: col-resize;
+  left: 0px;
+  top: 0px;
+  width: 8px;
+}
+
+/* Style for options (bottom strip) */
+
+#code-options {
+  display: none;
+}
+
+#code-options > span {
+  padding-right: 20px;
+}
+
+#code-options .selected {
+  border-bottom: 1px dotted;
+}
+
+#comment-options {
+  text-align: center;
+}
+
+div#content {
+  padding-bottom: 0em;
+}
diff --git a/_content/doc/codewalk/codewalk.js b/_content/doc/codewalk/codewalk.js
new file mode 100644
index 0000000..4f59a8f
--- /dev/null
+++ b/_content/doc/codewalk/codewalk.js
@@ -0,0 +1,305 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+/**
+ * A class to hold information about the Codewalk Viewer.
+ * @param {jQuery} context The top element in whose context the viewer should
+ *     operate.  It will not touch any elements above this one.
+ * @constructor
+ */
+ var CodewalkViewer = function(context) {
+  this.context = context;
+
+  /**
+   * The div that contains all of the comments and their controls.
+   */
+  this.commentColumn = this.context.find('#comment-column');
+
+  /**
+   * The div that contains the comments proper.
+   */
+  this.commentArea = this.context.find('#comment-area');
+
+  /**
+   * The div that wraps the iframe with the code, as well as the drop down menu
+   * listing the different files.
+   * @type {jQuery}
+   */
+  this.codeColumn = this.context.find('#code-column');
+
+  /**
+   * The div that contains the code but excludes the options strip.
+   * @type {jQuery}
+   */
+  this.codeArea = this.context.find('#code-area');
+
+  /**
+   * The iframe that holds the code (from Sourcerer).
+   * @type {jQuery}
+   */
+  this.codeDisplay = this.context.find('#code-display');
+
+  /**
+   * The overlaid div used as a grab handle for sizing the code/comment panes.
+   * @type {jQuery}
+   */
+  this.sizer = this.context.find('#sizer');
+
+  /**
+   * The full-screen overlay that ensures we don't lose track of the mouse
+   * while dragging.
+   * @type {jQuery}
+   */
+  this.overlay = this.context.find('#overlay');
+
+  /**
+   * The hidden input field that we use to hold the focus so that we can detect
+   * shortcut keypresses.
+   * @type {jQuery}
+   */
+  this.shortcutInput = this.context.find('#shortcut-input');
+
+  /**
+   * The last comment that was selected.
+   * @type {jQuery}
+   */
+  this.lastSelected = null;
+};
+
+/**
+ * Minimum width of the comments or code pane, in pixels.
+ * @type {number}
+ */
+CodewalkViewer.MIN_PANE_WIDTH = 200;
+
+/**
+ * Navigate the code iframe to the given url and update the code popout link.
+ * @param {string} url The target URL.
+ * @param {Object} opt_window Window dependency injection for testing only.
+ */
+CodewalkViewer.prototype.navigateToCode = function(url, opt_window) {
+  if (!opt_window) opt_window = window;
+  // Each iframe is represented by two distinct objects in the DOM:  an iframe
+  // object and a window object.  These do not expose the same capabilities.
+  // Here we need to get the window representation to get the location member,
+  // so we access it directly through window[] since jQuery returns the iframe
+  // representation.
+  // We replace location rather than set so as not to create a history for code
+  // navigation.
+  opt_window['code-display'].location.replace(url);
+  var k = url.indexOf('&');
+  if (k != -1) url = url.slice(0, k);
+  k = url.indexOf('fileprint=');
+  if (k != -1) url = url.slice(k+10, url.length);
+  this.context.find('#code-popout-link').attr('href', url);
+};
+
+/**
+ * Selects the first comment from the list and forces a refresh of the code
+ * view.
+ */
+CodewalkViewer.prototype.selectFirstComment = function() {
+  // TODO(rsc): handle case where there are no comments
+  var firstSourcererLink = this.context.find('.comment:first');
+  this.changeSelectedComment(firstSourcererLink);
+};
+
+/**
+ * Sets the target on all links nested inside comments to be _blank.
+ */
+CodewalkViewer.prototype.targetCommentLinksAtBlank = function() {
+  this.context.find('.comment a[href], #description a[href]').each(function() {
+    if (!this.target) this.target = '_blank';
+  });
+};
+
+/**
+ * Installs event handlers for all the events we care about.
+ */
+CodewalkViewer.prototype.installEventHandlers = function() {
+  var self = this;
+
+  this.context.find('.comment')
+      .click(function(event) {
+        if (jQuery(event.target).is('a[href]')) return true;
+        self.changeSelectedComment(jQuery(this));
+        return false;
+      });
+
+  this.context.find('#code-selector')
+      .change(function() {self.navigateToCode(jQuery(this).val());});
+
+  this.context.find('#description-table .quote-feet.setting')
+      .click(function() {self.toggleDescription(jQuery(this)); return false;});
+
+  this.sizer
+      .mousedown(function(ev) {self.startSizerDrag(ev); return false;});
+  this.overlay
+      .mouseup(function(ev) {self.endSizerDrag(ev); return false;})
+      .mousemove(function(ev) {self.handleSizerDrag(ev); return false;});
+
+  this.context.find('#prev-comment')
+      .click(function() {
+          self.changeSelectedComment(self.lastSelected.prev()); return false;
+      });
+
+  this.context.find('#next-comment')
+      .click(function() {
+          self.changeSelectedComment(self.lastSelected.next()); return false;
+      });
+
+  // Workaround for Firefox 2 and 3, which steal focus from the main document
+  // whenever the iframe content is (re)loaded.  The input field is not shown,
+  // but is a way for us to bring focus back to a place where we can detect
+  // keypresses.
+  this.context.find('#code-display')
+      .load(function(ev) {self.shortcutInput.focus();});
+
+  jQuery(document).keypress(function(ev) {
+    switch(ev.which) {
+      case 110:  // 'n'
+          self.changeSelectedComment(self.lastSelected.next());
+          return false;
+      case 112:  // 'p'
+          self.changeSelectedComment(self.lastSelected.prev());
+          return false;
+      default:  // ignore
+    }
+  });
+
+  window.onresize = function() {self.updateHeight();};
+};
+
+/**
+ * Starts dragging the pane sizer.
+ * @param {Object} ev The mousedown event that started us dragging.
+ */
+CodewalkViewer.prototype.startSizerDrag = function(ev) {
+  this.initialCodeWidth = this.codeColumn.width();
+  this.initialCommentsWidth = this.commentColumn.width();
+  this.initialMouseX = ev.pageX;
+  this.overlay.show();
+};
+
+/**
+ * Handles dragging the pane sizer.
+ * @param {Object} ev The mousemove event updating dragging position.
+ */
+CodewalkViewer.prototype.handleSizerDrag = function(ev) {
+  var delta = ev.pageX - this.initialMouseX;
+  if (this.codeColumn.is('.right')) delta = -delta;
+  var proposedCodeWidth = this.initialCodeWidth + delta;
+  var proposedCommentWidth = this.initialCommentsWidth - delta;
+  var mw = CodewalkViewer.MIN_PANE_WIDTH;
+  if (proposedCodeWidth < mw) delta = mw - this.initialCodeWidth;
+  if (proposedCommentWidth < mw) delta = this.initialCommentsWidth - mw;
+  proposedCodeWidth = this.initialCodeWidth + delta;
+  proposedCommentWidth = this.initialCommentsWidth - delta;
+  // If window is too small, don't even try to resize.
+  if (proposedCodeWidth < mw || proposedCommentWidth < mw) return;
+  this.codeColumn.width(proposedCodeWidth);
+  this.commentColumn.width(proposedCommentWidth);
+  this.options.codeWidth = parseInt(
+      this.codeColumn.width() /
+      (this.codeColumn.width() + this.commentColumn.width()) * 100);
+  this.context.find('#code-column-width').text(this.options.codeWidth + '%');
+};
+
+/**
+ * Ends dragging the pane sizer.
+ * @param {Object} ev The mouseup event that caused us to stop dragging.
+ */
+CodewalkViewer.prototype.endSizerDrag = function(ev) {
+  this.overlay.hide();
+  this.updateHeight();
+};
+
+/**
+ * Toggles the Codewalk description between being shown and hidden.
+ * @param {jQuery} target The target that was clicked to trigger this function.
+ */
+CodewalkViewer.prototype.toggleDescription = function(target) {
+  var description = this.context.find('#description');
+  description.toggle();
+  target.find('span').text(description.is(':hidden') ? 'show' : 'hide');
+  this.updateHeight();
+};
+
+/**
+ * Changes the side of the window on which the code is shown and saves the
+ * setting in a cookie.
+ * @param {string?} codeSide The side on which the code should be, either
+ *     'left' or 'right'.
+ */
+CodewalkViewer.prototype.changeCodeSide = function(codeSide) {
+  var commentSide = codeSide == 'left' ? 'right' : 'left';
+  this.context.find('#set-code-' + codeSide).addClass('selected');
+  this.context.find('#set-code-' + commentSide).removeClass('selected');
+  // Remove previous side class and add new one.
+  this.codeColumn.addClass(codeSide).removeClass(commentSide);
+  this.commentColumn.addClass(commentSide).removeClass(codeSide);
+  this.sizer.css(codeSide, 'auto').css(commentSide, 0);
+  this.options.codeSide = codeSide;
+};
+
+/**
+ * Adds selected class to newly selected comment, removes selected style from
+ * previously selected comment, changes drop down options so that the correct
+ * file is selected, and updates the code popout link.
+ * @param {jQuery} target The target that was clicked to trigger this function.
+ */
+CodewalkViewer.prototype.changeSelectedComment = function(target) {
+  var currentFile = target.find('.comment-link').attr('href');
+  if (!currentFile) return;
+
+  if (!(this.lastSelected && this.lastSelected.get(0) === target.get(0))) {
+    if (this.lastSelected) this.lastSelected.removeClass('selected');
+    target.addClass('selected');
+    this.lastSelected = target;
+    var targetTop = target.position().top;
+    var parentTop = target.parent().position().top;
+    if (targetTop + target.height() > parentTop + target.parent().height() ||
+        targetTop < parentTop) {
+      var delta = targetTop - parentTop;
+      target.parent().animate(
+          {'scrollTop': target.parent().scrollTop() + delta},
+          Math.max(delta / 2, 200), 'swing');
+    }
+    var fname = currentFile.match(/(?:select=|fileprint=)\/[^&]+/)[0];
+    fname = fname.slice(fname.indexOf('=')+2, fname.length);
+    this.context.find('#code-selector').val(fname);
+    this.context.find('#prev-comment').toggleClass(
+        'disabled', !target.prev().length);
+    this.context.find('#next-comment').toggleClass(
+        'disabled', !target.next().length);
+  }
+
+  // Force original file even if user hasn't changed comments since they may
+  // have navigated away from it within the iframe without us knowing.
+  this.navigateToCode(currentFile);
+};
+
+/**
+ * Updates the viewer by changing the height of the comments and code so that
+ * they fit within the height of the window.  The function is typically called
+ * after the user changes the window size.
+ */
+CodewalkViewer.prototype.updateHeight = function() {
+  var windowHeight = jQuery(window).height() - 5  // GOK
+  var areaHeight = windowHeight - this.codeArea.offset().top
+  var footerHeight = this.context.find('#footer').outerHeight(true)
+  this.commentArea.height(areaHeight - footerHeight - this.context.find('#comment-options').outerHeight(true))
+  var codeHeight = areaHeight - footerHeight - 15  // GOK
+  this.codeArea.height(codeHeight)
+  this.codeDisplay.height(codeHeight - this.codeDisplay.offset().top + this.codeArea.offset().top);
+  this.sizer.height(codeHeight);
+};
+
+window.initFuncs.push(function() {
+  var viewer = new CodewalkViewer(jQuery('#codewalk-main'));
+  viewer.selectFirstComment();
+  viewer.targetCommentLinksAtBlank();
+  viewer.installEventHandlers();
+  viewer.updateHeight();
+});
diff --git a/_content/doc/codewalk/codewalk.xml b/_content/doc/codewalk/codewalk.xml
new file mode 100644
index 0000000..34e6e91
--- /dev/null
+++ b/_content/doc/codewalk/codewalk.xml
@@ -0,0 +1,124 @@
+<codewalk title="How to Write a Codewalk">
+
+<step title="Introduction" src="doc/codewalk/codewalk.xml">
+	A codewalk is a guided tour through a piece of code.
+	It consists of a sequence of steps, each typically explaining
+	a highlighted section of code.
+	<br/><br/>
+	
+	The <a href="/cmd/godoc">godoc</a> web server translates
+	an XML file like the one in the main window pane into the HTML
+	page that you're viewing now.
+	<br/><br/>
+	
+	The codewalk with URL path <code>/doc/codewalk/</code><i>name</i>
+	is loaded from the input file <code>$GOROOT/doc/codewalk/</code><i>name</i><code>.xml</code>.
+	<br/><br/>
+	
+	This codewalk explains how to write a codewalk by examining
+	its own source code,
+	<code><a href="/doc/codewalk/codewalk.xml">$GOROOT/doc/codewalk/codewalk.xml</a></code>,
+	shown in the main window pane to the left.	
+</step>
+
+<step title="Title" src="doc/codewalk/codewalk.xml:/title=/">
+	The codewalk input file is an XML file containing a single
+	<code>&lt;codewalk&gt;</code> element.
+	That element's <code>title</code> attribute gives the title
+	that is used both on the codewalk page and in the codewalk list.
+</step>
+
+<step title="Steps" src="doc/codewalk/codewalk.xml:/&lt;step/,/step&gt;/">
+	Each step in the codewalk is a <code>&lt;step&gt;</code> element 
+	nested inside the main <code>&lt;codewalk&gt;</code>.
+	The step element's <code>title</code> attribute gives the step's title,
+	which is shown in a shaded bar above the main step text.
+	The element's <code>src</code> attribute specifies the source
+	code to show in the main window pane and, optionally, a range of 
+	lines to highlight.
+	<br/><br/>
+	
+	The first step in this codewalk does not highlight any lines:
+	its <code>src</code> is just a file name.
+</step>
+
+<step title="Specifying a source line" src='doc/codewalk/codewalk.xml:/title="Title"/'>
+	The most complex part of the codewalk specification is
+	saying what lines to highlight.
+	Instead of ordinary line numbers,
+	the codewalk uses an address syntax that makes it possible
+	to describe the match by its content.
+	As the file gets edited, this descriptive address has a better
+	chance to continue to refer to the right section of the file.
+	<br/><br/>
+
+	To specify a source line, use a <code>src</code> attribute of the form
+	<i>filename</i><code>:</code><i>address</i>,
+	where <i>address</i> is an address in the syntax used by the text editors <i>sam</i> and <i>acme</i>.
+	<br/><br/>
+	
+	The simplest address is a single regular expression.
+	The highlighted line in the main window pane shows that the
+	address for the &ldquo;Title&rdquo; step was <code>/title=/</code>,
+	which matches the first instance of that <a href="/pkg/regexp">regular expression</a> (<code>title=</code>) in the file.
+</step>
+
+<step title="Specifying a source range" src='doc/codewalk/codewalk.xml:/title="Steps"/'>
+	To highlight a range of source lines, the simplest address to use is
+	a pair of regular expressions
+	<code>/</code><i>regexp1</i><code>/,/</code><i>regexp2</i><code>/</code>.
+	The highlight begins with the line containing the first match for <i>regexp1</i>
+	and ends with the line containing the first match for <i>regexp2</i>
+	after the end of the match for <i>regexp1</i>.
+	Ignoring the HTML quoting, 
+	The line containing the first match for <i>regexp1</i> will be the first one highlighted,
+	and the line containing the first match for <i>regexp2</i>.
+	<br/><br/>
+	
+	The address <code>/&lt;step/,/step&gt;/</code> looks for the first instance of
+	<code>&lt;step</code> in the file, and then starting after that point,
+	looks for the first instance of <code>step&gt;</code>.
+	(Click on the &ldquo;Steps&rdquo; step above to see the highlight in action.)
+	Note that the <code>&lt;</code> and <code>&gt;</code> had to be written
+	using XML escapes in order to be valid XML.
+</step>
+
+<step title="Advanced addressing" src="doc/codewalk/codewalk.xml:/Advanced/,/step&gt;/">
+	The <code>/</code><i>regexp</i><code>/</code>
+ 	and <code>/</code><i>regexp1</i><code>/,/</code><i>regexp2</i><code>/</code>
+ 	forms suffice for most highlighting.
+ 	<br/><br/>
+
+	The full address syntax is summarized in this table
+	(an excerpt of Table II from
+	<a href="https://9p.io/sys/doc/sam/sam.html">The text editor <code>sam</code></a>):
+	<br/><br/>
+
+	<table>
+	<tr><td colspan="2"><b>Simple addresses</b></td></tr>
+	<tr><td><code>#</code><i>n</i></td>
+	    <td>The empty string after character <i>n</i></td></tr>
+	<tr><td><i>n</i></td>
+	    <td>Line <i>n</i></td></tr>
+	<tr><td><code>/</code><i>regexp</i><code>/</code></td>
+	    <td>The first following match of the regular expression</td></tr>
+	<!-- not supported (yet?)
+	<tr><td><code>–/</code><i>regexp</i><code>/</code></td>
+	    <td>The first previous match of the regular expression</td></tr>
+	-->
+	<tr><td><code>$</code></td>
+	    <td>The null string at the end of the file</td></tr>
+
+	<tr><td colspan="2"><b>Compound addresses</b></td></tr>
+	<tr><td><i>a1</i><code>+</code><i>a2</i></td>
+	    <td>The address <i>a2</i> evaluated starting at the right of <i>a1</i></td></tr>
+	<tr><td><i>a1</i><code>-</code><i>a2</i></td>
+	    <td>The address <i>a2</i> evaluated in the reverse direction starting at the left of <i>a1</i></td></tr>
+	<tr><td><i>a1</i><code>,</code><i>a2</i></td>
+	    <td>From the left of <i>a1</i> to the right of <i>a2</i> (default <code>0,$</code>).</td></tr>
+	</table>
+</step>
+
+
+	
+</codewalk>
diff --git a/_content/doc/codewalk/codewalk_test.go b/_content/doc/codewalk/codewalk_test.go
new file mode 100644
index 0000000..31f078a
--- /dev/null
+++ b/_content/doc/codewalk/codewalk_test.go
@@ -0,0 +1,52 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main_test
+
+import (
+	"bytes"
+	"os"
+	"os/exec"
+	"strings"
+	"testing"
+)
+
+// TestMarkov tests the code dependency of markov.xml.
+func TestMarkov(t *testing.T) {
+	cmd := exec.Command("go", "run", "markov.go")
+	cmd.Stdin = strings.NewReader("foo")
+	cmd.Stderr = bytes.NewBuffer(nil)
+	out, err := cmd.Output()
+	if err != nil {
+		t.Fatalf("%s: %v\n%s", strings.Join(cmd.Args, " "), err, cmd.Stderr)
+	}
+
+	if !bytes.Equal(out, []byte("foo\n")) {
+		t.Fatalf(`%s with input "foo" did not output "foo":\n%s`, strings.Join(cmd.Args, " "), out)
+	}
+}
+
+// TestPig tests the code dependency of functions.xml.
+func TestPig(t *testing.T) {
+	cmd := exec.Command("go", "run", "pig.go")
+	cmd.Stderr = bytes.NewBuffer(nil)
+	out, err := cmd.Output()
+	if err != nil {
+		t.Fatalf("%s: %v\n%s", strings.Join(cmd.Args, " "), err, cmd.Stderr)
+	}
+
+	const want = "Wins, losses staying at k = 100: 210/990 (21.2%), 780/990 (78.8%)\n"
+	if !bytes.Contains(out, []byte(want)) {
+		t.Fatalf(`%s: unexpected output\ngot:\n%s\nwant output containing:\n%s`, strings.Join(cmd.Args, " "), out, want)
+	}
+}
+
+// TestURLPoll tests the code dependency of sharemem.xml.
+func TestURLPoll(t *testing.T) {
+	cmd := exec.Command("go", "build", "-o", os.DevNull, "urlpoll.go")
+	out, err := cmd.CombinedOutput()
+	if err != nil {
+		t.Fatalf("%s: %v\n%s", strings.Join(cmd.Args, " "), err, out)
+	}
+}
diff --git a/_content/doc/codewalk/functions.xml b/_content/doc/codewalk/functions.xml
new file mode 100644
index 0000000..db518dc
--- /dev/null
+++ b/_content/doc/codewalk/functions.xml
@@ -0,0 +1,105 @@
+<codewalk title="First-Class Functions in Go">
+
+<step title="Introduction" src="doc/codewalk/pig.go">
+	Go supports first class functions, higher-order functions, user-defined
+	function types, function literals, closures, and multiple return values.
+  <br/><br/>
+
+	This rich feature set supports a functional programming style in a strongly
+	typed language.
+	<br/><br/>
+
+	In this codewalk we will look at a simple program that simulates a dice game
+	called <a href="http://en.wikipedia.org/wiki/Pig_(dice)">Pig</a> and evaluates
+	basic strategies.
+</step>
+
+<step title="Game overview" src="doc/codewalk/pig.go:/\/\/ A score/,/thisTurn int\n}/">
+  Pig is a two-player game played with a 6-sided die.  Each turn, you may roll or stay.
+	<ul>
+		<li> If you roll a 1, you lose all points for your turn and play passes to
+			your opponent.  Any other roll adds its value to your turn score.  </li>
+		<li> If you stay, your turn score is added to your total score, and play passes
+			to your opponent.  </li>
+	</ul>
+	
+	The first person to reach 100 total points wins.
+	<br/><br/>
+
+	The <code>score</code> type stores the scores of the current and opposing
+	players, in addition to the points accumulated during the current turn.
+</step>
+
+<step title="User-defined function types" src="doc/codewalk/pig.go:/\/\/ An action/,/bool\)/">
+	In Go, functions can be passed around just like any other value. A function's
+	type signature describes the types of its arguments and return values.
+	<br/><br/>
+
+	The <code>action</code> type is a function that takes a <code>score</code>
+	and returns the resulting <code>score</code> and whether the current turn is
+	over.
+	<br/><br/>
+
+  If the turn is over, the <code>player</code> and <code>opponent</code> fields
+  in the resulting <code>score</code> should be swapped, as it is now the other player's
+  turn.
+</step>
+
+<step title="Multiple return values" src="doc/codewalk/pig.go:/\/\/ roll returns/,/true\n}/">
+	Go functions can return multiple values.  
+	<br/><br/>
+
+	The functions <code>roll</code> and <code>stay</code> each return a pair of
+	values.  They also match the <code>action</code> type signature.  These
+	<code>action</code> functions define the rules of Pig.
+</step>
+
+<step title="Higher-order functions" src="doc/codewalk/pig.go:/\/\/ A strategy/,/action\n/">
+	A function can use other functions as arguments and return values.
+	<br/><br/>
+
+  A <code>strategy</code> is a function that takes a <code>score</code> as input
+  and returns an <code>action</code> to perform.  <br/>
+  (Remember, an <code>action</code> is itself a function.)
+</step>
+
+<step title="Function literals and closures" src="doc/codewalk/pig.go:/return func/,/return roll\n\t}/">
+	Anonymous functions can be declared in Go, as in this example.  Function
+	literals are closures: they inherit the scope of the function in which they
+	are declared.
+	<br/><br/>
+
+	One basic strategy in Pig is to continue rolling until you have accumulated at
+	least k points in a turn, and then stay.  The argument <code>k</code> is
+	enclosed by this function literal, which matches the <code>strategy</code> type
+	signature.
+</step>
+
+<step title="Simulating games" src="doc/codewalk/pig.go:/\/\/ play/,/currentPlayer\n}/">
+  We simulate a game of Pig by calling an <code>action</code> to update the
+  <code>score</code> until one player reaches 100 points.  Each
+  <code>action</code> is selected by calling the <code>strategy</code> function
+  associated with the current player.
+</step>
+
+<step title="Simulating a tournament" src="doc/codewalk/pig.go:/\/\/ roundRobin/,/gamesPerStrategy\n}/">
+	The <code>roundRobin</code> function simulates a tournament and tallies wins.
+	Each strategy plays each other strategy <code>gamesPerSeries</code> times.
+</step>
+	
+<step title="Variadic function declarations" src="doc/codewalk/pig.go:/\/\/ ratioS/,/string {/">
+	Variadic functions like <code>ratioString</code> take a variable number of
+	arguments.  These arguments are available as a slice inside the function.
+</step>
+
+<step title="Simulation results" src="doc/codewalk/pig.go:/func main/,/\n}/">
+	The <code>main</code> function defines 100 basic strategies, simulates a round
+	robin tournament, and then prints the win/loss record of each strategy.
+	<br/><br/>
+
+	Among these strategies, staying at 25 is best, but the <a
+	href="http://www.google.com/search?q=optimal+play+pig">optimal strategy for
+	Pig</a> is much more complex.
+</step>
+
+</codewalk>
diff --git a/_content/doc/codewalk/markov.go b/_content/doc/codewalk/markov.go
new file mode 100644
index 0000000..5f62e05
--- /dev/null
+++ b/_content/doc/codewalk/markov.go
@@ -0,0 +1,130 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+/*
+Generating random text: a Markov chain algorithm
+
+Based on the program presented in the "Design and Implementation" chapter
+of The Practice of Programming (Kernighan and Pike, Addison-Wesley 1999).
+See also Computer Recreations, Scientific American 260, 122 - 125 (1989).
+
+A Markov chain algorithm generates text by creating a statistical model of
+potential textual suffixes for a given prefix. Consider this text:
+
+	I am not a number! I am a free man!
+
+Our Markov chain algorithm would arrange this text into this set of prefixes
+and suffixes, or "chain": (This table assumes a prefix length of two words.)
+
+	Prefix       Suffix
+
+	"" ""        I
+	"" I         am
+	I am         a
+	I am         not
+	a free       man!
+	am a         free
+	am not       a
+	a number!    I
+	number! I    am
+	not a        number!
+
+To generate text using this table we select an initial prefix ("I am", for
+example), choose one of the suffixes associated with that prefix at random
+with probability determined by the input statistics ("a"),
+and then create a new prefix by removing the first word from the prefix
+and appending the suffix (making the new prefix is "am a"). Repeat this process
+until we can't find any suffixes for the current prefix or we exceed the word
+limit. (The word limit is necessary as the chain table may contain cycles.)
+
+Our version of this program reads text from standard input, parsing it into a
+Markov chain, and writes generated text to standard output.
+The prefix and output lengths can be specified using the -prefix and -words
+flags on the command-line.
+*/
+package main
+
+import (
+	"bufio"
+	"flag"
+	"fmt"
+	"io"
+	"math/rand"
+	"os"
+	"strings"
+	"time"
+)
+
+// Prefix is a Markov chain prefix of one or more words.
+type Prefix []string
+
+// String returns the Prefix as a string (for use as a map key).
+func (p Prefix) String() string {
+	return strings.Join(p, " ")
+}
+
+// Shift removes the first word from the Prefix and appends the given word.
+func (p Prefix) Shift(word string) {
+	copy(p, p[1:])
+	p[len(p)-1] = word
+}
+
+// Chain contains a map ("chain") of prefixes to a list of suffixes.
+// A prefix is a string of prefixLen words joined with spaces.
+// A suffix is a single word. A prefix can have multiple suffixes.
+type Chain struct {
+	chain     map[string][]string
+	prefixLen int
+}
+
+// NewChain returns a new Chain with prefixes of prefixLen words.
+func NewChain(prefixLen int) *Chain {
+	return &Chain{make(map[string][]string), prefixLen}
+}
+
+// Build reads text from the provided Reader and
+// parses it into prefixes and suffixes that are stored in Chain.
+func (c *Chain) Build(r io.Reader) {
+	br := bufio.NewReader(r)
+	p := make(Prefix, c.prefixLen)
+	for {
+		var s string
+		if _, err := fmt.Fscan(br, &s); err != nil {
+			break
+		}
+		key := p.String()
+		c.chain[key] = append(c.chain[key], s)
+		p.Shift(s)
+	}
+}
+
+// Generate returns a string of at most n words generated from Chain.
+func (c *Chain) Generate(n int) string {
+	p := make(Prefix, c.prefixLen)
+	var words []string
+	for i := 0; i < n; i++ {
+		choices := c.chain[p.String()]
+		if len(choices) == 0 {
+			break
+		}
+		next := choices[rand.Intn(len(choices))]
+		words = append(words, next)
+		p.Shift(next)
+	}
+	return strings.Join(words, " ")
+}
+
+func main() {
+	// Register command-line flags.
+	numWords := flag.Int("words", 100, "maximum number of words to print")
+	prefixLen := flag.Int("prefix", 2, "prefix length in words")
+
+	flag.Parse()                     // Parse command-line flags.
+	rand.Seed(time.Now().UnixNano()) // Seed the random number generator.
+
+	c := NewChain(*prefixLen)     // Initialize a new Chain.
+	c.Build(os.Stdin)             // Build chains from standard input.
+	text := c.Generate(*numWords) // Generate text.
+	fmt.Println(text)             // Write text to standard output.
+}
diff --git a/_content/doc/codewalk/markov.xml b/_content/doc/codewalk/markov.xml
new file mode 100644
index 0000000..7e44840
--- /dev/null
+++ b/_content/doc/codewalk/markov.xml
@@ -0,0 +1,307 @@
+<!--
+Copyright 2011 The Go Authors. All rights reserved.
+Use of this source code is governed by a BSD-style
+license that can be found in the LICENSE file.
+-->
+
+<codewalk title="Generating arbitrary text: a Markov chain algorithm">
+
+<step title="Introduction" src="doc/codewalk/markov.go:/Generating/,/line\./">
+	This codewalk describes a program that generates random text using
+	a Markov chain algorithm. The package comment describes the algorithm
+	and the operation of the program. Please read it before continuing.
+</step>
+
+<step title="Modeling Markov chains" src="doc/codewalk/markov.go:/	chain/">
+	A chain consists of a prefix and a suffix. Each prefix is a set
+	number of words, while a suffix is a single word.
+	A prefix can have an arbitrary number of suffixes.
+	To model this data, we use a <code>map[string][]string</code>.
+	Each map key is a prefix (a <code>string</code>) and its values are
+	lists of suffixes (a slice of strings, <code>[]string</code>).
+	<br/><br/>
+	Here is the example table from the package comment
+	as modeled by this data structure:
+	<pre>
+map[string][]string{
+	" ":          {"I"},
+	" I":         {"am"},
+	"I am":       {"a", "not"},
+	"a free":     {"man!"},
+	"am a":       {"free"},
+	"am not":     {"a"},
+	"a number!":  {"I"},
+	"number! I":  {"am"},
+	"not a":      {"number!"},
+}</pre>
+	While each prefix consists of multiple words, we
+	store prefixes in the map as a single <code>string</code>.
+	It would seem more natural to store the prefix as a
+	<code>[]string</code>, but we can't do this with a map because the
+	key type of a map must implement equality (and slices do not).
+	<br/><br/>
+	Therefore, in most of our code we will model prefixes as a
+	<code>[]string</code> and join the strings together with a space
+	to generate the map key:
+	<pre>
+Prefix               Map key
+
+[]string{"", ""}     " "
+[]string{"", "I"}    " I"
+[]string{"I", "am"}  "I am"
+</pre>
+</step>
+
+<step title="The Chain struct" src="doc/codewalk/markov.go:/type Chain/,/}/">
+	The complete state of the chain table consists of the table itself and
+	the word length of the prefixes. The <code>Chain</code> struct stores
+	this data.
+</step>
+
+<step title="The NewChain constructor function" src="doc/codewalk/markov.go:/func New/,/\n}/">
+	The <code>Chain</code> struct has two unexported fields (those that
+	do not begin with an upper case character), and so we write a
+	<code>NewChain</code> constructor function that initializes the
+	<code>chain</code> map with <code>make</code> and sets the
+	<code>prefixLen</code> field.
+	<br/><br/>
+	This is constructor function is not strictly necessary as this entire
+	program is within a single package (<code>main</code>) and therefore
+	there is little practical difference between exported and unexported
+	fields. We could just as easily write out the contents of this function
+	when we want to construct a new Chain.
+	But using these unexported fields is good practice; it clearly denotes
+	that only methods of Chain and its constructor function should access
+	those fields. Also, structuring <code>Chain</code> like this means we
+	could easily move it into its own package at some later date.
+</step>
+
+<step title="The Prefix type" src="doc/codewalk/markov.go:/type Prefix/">
+	Since we'll be working with prefixes often, we define a
+	<code>Prefix</code> type with the concrete type <code>[]string</code>.
+	Defining a named type clearly allows us to be explicit when we are
+	working with a prefix instead of just a <code>[]string</code>.
+	Also, in Go we can define methods on any named type (not just structs),
+	so we can add methods that operate on <code>Prefix</code> if we need to.
+</step>
+
+<step title="The String method" src="doc/codewalk/markov.go:/func[^\n]+String/,/}/">
+	The first method we define on <code>Prefix</code> is
+	<code>String</code>. It returns a <code>string</code> representation
+	of a <code>Prefix</code> by joining the slice elements together with
+	spaces. We will use this method to generate keys when working with
+	the chain map.
+</step>
+
+<step title="Building the chain" src="doc/codewalk/markov.go:/func[^\n]+Build/,/\n}/">
+	The <code>Build</code> method reads text from an <code>io.Reader</code>
+	and parses it into prefixes and suffixes that are stored in the
+	<code>Chain</code>.
+	<br/><br/>
+	The <code><a href="/pkg/io/#Reader">io.Reader</a></code> is an
+	interface type that is widely used by the standard library and
+	other Go code. Our code uses the
+	<code><a href="/pkg/fmt/#Fscan">fmt.Fscan</a></code> function, which
+	reads space-separated values from an <code>io.Reader</code>.
+	<br/><br/>
+	The <code>Build</code> method returns once the <code>Reader</code>'s
+	<code>Read</code> method returns <code>io.EOF</code> (end of file)
+	or some other read error occurs.
+</step>
+
+<step title="Buffering the input" src="doc/codewalk/markov.go:/bufio\.NewReader/">
+	This function does many small reads, which can be inefficient for some
+	<code>Readers</code>. For efficiency we wrap the provided
+	<code>io.Reader</code> with
+	<code><a href="/pkg/bufio/">bufio.NewReader</a></code> to create a
+	new <code>io.Reader</code> that provides buffering.
+</step>
+
+<step title="The Prefix variable" src="doc/codewalk/markov.go:/make\(Prefix/">
+	At the top of the function we make a <code>Prefix</code> slice
+	<code>p</code> using the <code>Chain</code>'s <code>prefixLen</code>
+	field as its length.
+	We'll use this variable to hold the current prefix and mutate it with
+	each new word we encounter.
+</step>
+
+<step title="Scanning words" src="doc/codewalk/markov.go:/var s string/,/\n		}/">
+	In our loop we read words from the <code>Reader</code> into a
+	<code>string</code> variable <code>s</code> using
+	<code>fmt.Fscan</code>. Since <code>Fscan</code> uses space to
+	separate each input value, each call will yield just one word
+	(including punctuation), which is exactly what we need.
+	<br/><br/>
+	<code>Fscan</code> returns an error if it encounters a read error
+	(<code>io.EOF</code>, for example) or if it can't scan the requested
+	value (in our case, a single string). In either case we just want to
+	stop scanning, so we <code>break</code> out of the loop.
+</step>
+
+<step title="Adding a prefix and suffix to the chain" src="doc/codewalk/markov.go:/	key/,/key\], s\)">
+	The word stored in <code>s</code> is a new suffix. We add the new
+	prefix/suffix combination to the <code>chain</code> map by computing
+	the map key with <code>p.String</code> and appending the suffix
+	to the slice stored under that key.
+	<br/><br/>
+	The built-in <code>append</code> function appends elements to a slice
+	and allocates new storage when necessary. When the provided slice is
+	<code>nil</code>, <code>append</code> allocates a new slice.
+	This behavior conveniently ties in with the semantics of our map:
+	retrieving an unset key returns the zero value of the value type and
+	the zero value of <code>[]string</code> is <code>nil</code>.
+	When our program encounters a new prefix (yielding a <code>nil</code>
+	value in the map) <code>append</code> will allocate a new slice.
+	<br/><br/>
+	For more information about the <code>append</code> function and slices
+	in general see the
+	<a href="/doc/articles/slices_usage_and_internals.html">Slices: usage and internals</a> article.
+</step>
+
+<step title="Pushing the suffix onto the prefix" src="doc/codewalk/markov.go:/p\.Shift/">
+	Before reading the next word our algorithm requires us to drop the
+	first word from the prefix and push the current suffix onto the prefix.
+	<br/><br/>
+	When in this state
+	<pre>
+p == Prefix{"I", "am"}
+s == "not" </pre>
+	the new value for <code>p</code> would be
+	<pre>
+p == Prefix{"am", "not"}</pre>
+	This operation is also required during text generation so we put
+	the code to perform this mutation of the slice inside a method on
+	<code>Prefix</code> named <code>Shift</code>.
+</step>
+
+<step title="The Shift method" src="doc/codewalk/markov.go:/func[^\n]+Shift/,/\n}/">
+	The <code>Shift</code> method uses the built-in <code>copy</code>
+	function to copy the last len(p)-1 elements of <code>p</code> to
+	the start of the slice, effectively moving the elements
+	one index to the left (if you consider zero as the leftmost index).
+	<pre>
+p := Prefix{"I", "am"}
+copy(p, p[1:])
+// p == Prefix{"am", "am"}</pre>
+	We then assign the provided <code>word</code> to the last index
+	of the slice:
+	<pre>
+// suffix == "not"
+p[len(p)-1] = suffix
+// p == Prefix{"am", "not"}</pre>
+</step>
+
+<step title="Generating text" src="doc/codewalk/markov.go:/func[^\n]+Generate/,/\n}/">
+	The <code>Generate</code> method is similar to <code>Build</code>
+	except that instead of reading words from a <code>Reader</code>
+	and storing them in a map, it reads words from the map and
+	appends them to a slice (<code>words</code>).
+	<br/><br/>
+	<code>Generate</code> uses a conditional for loop to generate
+	up to <code>n</code> words.
+</step>
+
+<step title="Getting potential suffixes" src="doc/codewalk/markov.go:/choices/,/}\n/">
+	At each iteration of the loop we retrieve a list of potential suffixes
+	for the current prefix. We access the <code>chain</code> map at key
+	<code>p.String()</code> and assign its contents to <code>choices</code>.
+	<br/><br/>
+	If <code>len(choices)</code> is zero we break out of the loop as there
+	are no potential suffixes for that prefix.
+	This test also works if the key isn't present in the map at all:
+	in that case, <code>choices</code> will be <code>nil</code> and the
+	length of a <code>nil</code> slice is zero.
+</step>
+
+<step title="Choosing a suffix at random" src="doc/codewalk/markov.go:/next := choices/,/Shift/">
+	To choose a suffix we use the
+	<code><a href="/pkg/math/rand/#Intn">rand.Intn</a></code> function.
+	It returns a random integer up to (but not including) the provided
+	value. Passing in <code>len(choices)</code> gives us a random index
+	into the full length of the list.
+	<br/><br/>
+	We use that index to pick our new suffix, assign it to
+	<code>next</code> and append it to the <code>words</code> slice.
+	<br/><br/>
+	Next, we <code>Shift</code> the new suffix onto the prefix just as
+	we did in the <code>Build</code> method.
+</step>
+
+<step title="Returning the generated text" src="doc/codewalk/markov.go:/Join\(words/">
+	Before returning the generated text as a string, we use the
+	<code>strings.Join</code> function to join the elements of
+	the <code>words</code> slice together, separated by spaces.
+</step>
+
+<step title="Command-line flags" src="doc/codewalk/markov.go:/Register command-line flags/,/prefixLen/">
+	To make it easy to tweak the prefix and generated text lengths we
+	use the <code><a href="/pkg/flag/">flag</a></code> package to parse
+	command-line flags.
+	<br/><br/>
+	These calls to <code>flag.Int</code> register new flags with the
+	<code>flag</code> package. The arguments to <code>Int</code> are the
+	flag name, its default value, and a description. The <code>Int</code>
+	function returns a pointer to an integer that will contain the
+	user-supplied value (or the default value if the flag was omitted on
+	the command-line).
+</step>
+
+<step title="Program set up" src="doc/codewalk/markov.go:/flag.Parse/,/rand.Seed/">
+	The <code>main</code> function begins by parsing the command-line
+	flags with <code>flag.Parse</code> and seeding the <code>rand</code>
+	package's random number generator with the current time.
+	<br/><br/>
+	If the command-line flags provided by the user are invalid the
+	<code>flag.Parse</code> function will print an informative usage
+	message and terminate the program.
+</step>
+
+<step title="Creating and building a new Chain" src="doc/codewalk/markov.go:/c := NewChain/,/c\.Build/">
+	To create the new <code>Chain</code> we call <code>NewChain</code>
+	with the value of the <code>prefix</code> flag.
+	<br/><br/>
+	To build the chain we call <code>Build</code> with
+	<code>os.Stdin</code> (which implements <code>io.Reader</code>) so
+	that it will read its input from standard input.
+</step>
+
+<step title="Generating and printing text" src="doc/codewalk/markov.go:/c\.Generate/,/fmt.Println/">
+	Finally, to generate text we call <code>Generate</code> with
+	the value of the <code>words</code> flag and assigning the result
+	to the variable <code>text</code>.
+	<br/><br/>
+	Then we call <code>fmt.Println</code> to write the text to standard
+	output, followed by a carriage return.
+</step>
+
+<step title="Using this program" src="doc/codewalk/markov.go">
+	To use this program, first build it with the
+	<a href="/cmd/go/">go</a> command:
+	<pre>
+$ go build markov.go</pre>
+	And then execute it while piping in some input text:
+	<pre>
+$ echo "a man a plan a canal panama" \
+	| ./markov -prefix=1
+a plan a man a plan a canal panama</pre>
+	Here's a transcript of generating some text using the Go distribution's
+	README file as source material:
+	<pre>
+$ ./markov -words=10 &lt; $GOROOT/README
+This is the source code repository for the Go source
+$ ./markov -prefix=1 -words=10 &lt; $GOROOT/README
+This is the go directory (the one containing this README).
+$ ./markov -prefix=1 -words=10 &lt; $GOROOT/README
+This is the variable if you have just untarred a</pre>
+</step>
+
+<step title="An exercise for the reader" src="doc/codewalk/markov.go">
+	The <code>Generate</code> function does a lot of allocations when it
+	builds the <code>words</code> slice. As an exercise, modify it to
+	take an <code>io.Writer</code> to which it incrementally writes the
+	generated text with <code>Fprint</code>.
+	Aside from being more efficient this makes <code>Generate</code>
+	more symmetrical to <code>Build</code>.
+</step>
+
+</codewalk>
diff --git a/_content/doc/codewalk/pig.go b/_content/doc/codewalk/pig.go
new file mode 100644
index 0000000..941daae
--- /dev/null
+++ b/_content/doc/codewalk/pig.go
@@ -0,0 +1,121 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"fmt"
+	"math/rand"
+)
+
+const (
+	win            = 100 // The winning score in a game of Pig
+	gamesPerSeries = 10  // The number of games per series to simulate
+)
+
+// A score includes scores accumulated in previous turns for each player,
+// as well as the points scored by the current player in this turn.
+type score struct {
+	player, opponent, thisTurn int
+}
+
+// An action transitions stochastically to a resulting score.
+type action func(current score) (result score, turnIsOver bool)
+
+// roll returns the (result, turnIsOver) outcome of simulating a die roll.
+// If the roll value is 1, then thisTurn score is abandoned, and the players'
+// roles swap.  Otherwise, the roll value is added to thisTurn.
+func roll(s score) (score, bool) {
+	outcome := rand.Intn(6) + 1 // A random int in [1, 6]
+	if outcome == 1 {
+		return score{s.opponent, s.player, 0}, true
+	}
+	return score{s.player, s.opponent, outcome + s.thisTurn}, false
+}
+
+// stay returns the (result, turnIsOver) outcome of staying.
+// thisTurn score is added to the player's score, and the players' roles swap.
+func stay(s score) (score, bool) {
+	return score{s.opponent, s.player + s.thisTurn, 0}, true
+}
+
+// A strategy chooses an action for any given score.
+type strategy func(score) action
+
+// stayAtK returns a strategy that rolls until thisTurn is at least k, then stays.
+func stayAtK(k int) strategy {
+	return func(s score) action {
+		if s.thisTurn >= k {
+			return stay
+		}
+		return roll
+	}
+}
+
+// play simulates a Pig game and returns the winner (0 or 1).
+func play(strategy0, strategy1 strategy) int {
+	strategies := []strategy{strategy0, strategy1}
+	var s score
+	var turnIsOver bool
+	currentPlayer := rand.Intn(2) // Randomly decide who plays first
+	for s.player+s.thisTurn < win {
+		action := strategies[currentPlayer](s)
+		s, turnIsOver = action(s)
+		if turnIsOver {
+			currentPlayer = (currentPlayer + 1) % 2
+		}
+	}
+	return currentPlayer
+}
+
+// roundRobin simulates a series of games between every pair of strategies.
+func roundRobin(strategies []strategy) ([]int, int) {
+	wins := make([]int, len(strategies))
+	for i := 0; i < len(strategies); i++ {
+		for j := i + 1; j < len(strategies); j++ {
+			for k := 0; k < gamesPerSeries; k++ {
+				winner := play(strategies[i], strategies[j])
+				if winner == 0 {
+					wins[i]++
+				} else {
+					wins[j]++
+				}
+			}
+		}
+	}
+	gamesPerStrategy := gamesPerSeries * (len(strategies) - 1) // no self play
+	return wins, gamesPerStrategy
+}
+
+// ratioString takes a list of integer values and returns a string that lists
+// each value and its percentage of the sum of all values.
+// e.g., ratios(1, 2, 3) = "1/6 (16.7%), 2/6 (33.3%), 3/6 (50.0%)"
+func ratioString(vals ...int) string {
+	total := 0
+	for _, val := range vals {
+		total += val
+	}
+	s := ""
+	for _, val := range vals {
+		if s != "" {
+			s += ", "
+		}
+		pct := 100 * float64(val) / float64(total)
+		s += fmt.Sprintf("%d/%d (%0.1f%%)", val, total, pct)
+	}
+	return s
+}
+
+func main() {
+	strategies := make([]strategy, win)
+	for k := range strategies {
+		strategies[k] = stayAtK(k + 1)
+	}
+	wins, games := roundRobin(strategies)
+
+	for k := range strategies {
+		fmt.Printf("Wins, losses staying at k =% 4d: %s\n",
+			k+1, ratioString(wins[k], games-wins[k]))
+	}
+}
diff --git a/_content/doc/codewalk/popout.png b/_content/doc/codewalk/popout.png
new file mode 100644
index 0000000..9c0c236
--- /dev/null
+++ b/_content/doc/codewalk/popout.png
Binary files differ
diff --git a/_content/doc/codewalk/sharemem.xml b/_content/doc/codewalk/sharemem.xml
new file mode 100644
index 0000000..8b47f12
--- /dev/null
+++ b/_content/doc/codewalk/sharemem.xml
@@ -0,0 +1,181 @@
+<codewalk title="Share Memory By Communicating">
+
+<step title="Introduction" src="doc/codewalk/urlpoll.go">
+Go's approach to concurrency differs from the traditional use of
+threads and shared memory. Philosophically, it can be summarized:
+<br/><br/>
+<i>Don't communicate by sharing memory; share memory by communicating.</i>
+<br/><br/>
+Channels allow you to pass references to data structures between goroutines.
+If you consider this as passing around ownership of the data (the ability to
+read and write it), they become a powerful and expressive synchronization 
+mechanism.
+<br/><br/>
+In this codewalk we will look at a simple program that polls a list of
+URLs, checking their HTTP response codes and periodically printing their state.
+</step>
+
+<step title="State type" src="doc/codewalk/urlpoll.go:/State/,/}/">
+The State type represents the state of a URL.
+<br/><br/>
+The Pollers send State values to the StateMonitor,
+which maintains a map of the current state of each URL.
+</step>
+
+<step title="Resource type" src="doc/codewalk/urlpoll.go:/Resource/,/}/">
+A Resource represents the state of a URL to be polled: the URL itself
+and the number of errors encountered since the last successful poll.
+<br/><br/>
+When the program starts, it allocates one Resource for each URL.
+The main goroutine and the Poller goroutines send the Resources to
+each other on channels.
+</step>
+
+<step title="Poller function" src="doc/codewalk/urlpoll.go:/func Poller/,/\n}/">
+Each Poller receives Resource pointers from an input channel.
+In this program, the convention is that sending a Resource pointer on
+a channel passes ownership of the underlying data from the sender
+to the receiver.  Because of this convention, we know that
+no two goroutines will access this Resource at the same time.
+This means we don't have to worry about locking to prevent concurrent 
+access to these data structures.
+<br/><br/>
+The Poller processes the Resource by calling its Poll method.
+<br/><br/>
+It sends a State value to the status channel, to inform the StateMonitor
+of the result of the Poll.
+<br/><br/>
+Finally, it sends the Resource pointer to the out channel. This can be
+interpreted as the Poller saying &quot;I'm done with this Resource&quot; and 
+returning ownership of it to the main goroutine. 
+<br/><br/>
+Several goroutines run Pollers, processing Resources in parallel.
+</step>
+
+<step title="The Poll method" src="doc/codewalk/urlpoll.go:/Poll executes/,/\n}/">
+The Poll method (of the Resource type) performs an HTTP HEAD request
+for the Resource's URL and returns the HTTP response's status code.
+If an error occurs, Poll logs the message to standard error and returns the 
+error string instead.
+</step>
+
+<step title="main function" src="doc/codewalk/urlpoll.go:/func main/,/\n}/">
+The main function starts the Poller and StateMonitor goroutines
+and then loops passing completed Resources back to the pending
+channel after appropriate delays.
+</step>
+
+<step title="Creating channels" src="doc/codewalk/urlpoll.go:/Create our/,/complete/">
+First, main makes two channels of *Resource, pending and complete.
+<br/><br/>
+Inside main, a new goroutine sends one Resource per URL to pending
+and the main goroutine receives completed Resources from complete.
+<br/><br/>
+The pending and complete channels are passed to each of the Poller
+goroutines, within which they are known as in and out. 
+</step>
+
+<step title="Initializing StateMonitor" src="doc/codewalk/urlpoll.go:/Launch the StateMonitor/,/statusInterval/">
+StateMonitor will initialize and launch a goroutine that stores the state 
+of each Resource. We will look at this function in detail later. 
+<br/><br/>
+For now, the important thing to note is that it returns a channel of State, 
+which is saved as status and passed to the Poller goroutines.
+</step>
+
+<step title="Launching Poller goroutines" src="doc/codewalk/urlpoll.go:/Launch some Poller/,/}/">
+Now that it has the necessary channels, main launches a number of
+Poller goroutines, passing the channels as arguments.
+The channels provide the means of communication between the main, Poller, and 
+StateMonitor goroutines.
+</step>
+
+<step title="Send Resources to pending" src="doc/codewalk/urlpoll.go:/Send some Resources/,/}\(\)/">
+To add the initial work to the system, main starts a new goroutine
+that allocates and sends one Resource per URL to pending.
+<br/><br/>
+The new goroutine is necessary because unbuffered channel sends and
+receives are synchronous. That means these channel sends will block until
+the Pollers are ready to read from pending.
+<br/><br/>
+Were these sends performed in the main goroutine with fewer Pollers than 
+channel sends, the program would reach a deadlock situation, because
+main would not yet be receiving from complete.
+<br/><br/>
+Exercise for the reader: modify this part of the program to read a list of
+URLs from a file. (You may want to move this goroutine into its own
+named function.)
+</step>
+
+<step title="Main Event Loop" src="doc/codewalk/urlpoll.go:/range complete/,/\n	}/">
+When a Poller is done with a Resource, it sends it on the complete channel.
+This loop receives those Resource pointers from complete.
+For each received Resource, it starts a new goroutine calling
+the Resource's Sleep method.  Using a new goroutine for each
+ensures that the sleeps can happen in parallel.
+<br/><br/>
+Note that any single Resource pointer may only be sent on either pending or
+complete at any one time. This ensures that a Resource is either being
+handled by a Poller goroutine or sleeping, but never both simultaneously.  
+In this way, we share our Resource data by communicating.
+</step>
+
+<step title="The Sleep method" src="doc/codewalk/urlpoll.go:/Sleep/,/\n}/">
+Sleep calls time.Sleep to pause before sending the Resource to done.
+The pause will either be of a fixed length (pollInterval) plus an
+additional delay proportional to the number of sequential errors (r.errCount).
+<br/><br/>
+This is an example of a typical Go idiom: a function intended to run inside 
+a goroutine takes a channel, upon which it sends its return value 
+(or other indication of completed state).
+</step>
+
+<step title="StateMonitor" src="doc/codewalk/urlpoll.go:/StateMonitor/,/\n}/">
+The StateMonitor receives State values on a channel and periodically
+outputs the state of all Resources being polled by the program.
+</step>
+
+<step title="The updates channel" src="doc/codewalk/urlpoll.go:/updates :=/">
+The variable updates is a channel of State, on which the Poller goroutines
+send State values.
+<br/><br/>
+This channel is returned by the function.
+</step>
+
+<step title="The urlStatus map" src="doc/codewalk/urlpoll.go:/urlStatus/">
+The variable urlStatus is a map of URLs to their most recent status. 
+</step>
+
+<step title="The Ticker object" src="doc/codewalk/urlpoll.go:/ticker/">
+A time.Ticker is an object that repeatedly sends a value on a channel at a 
+specified interval. 
+<br/><br/>
+In this case, ticker triggers the printing of the current state to 
+standard output every updateInterval nanoseconds.
+</step>
+
+<step title="The StateMonitor goroutine" src="doc/codewalk/urlpoll.go:/go func/,/}\(\)/">
+StateMonitor will loop forever, selecting on two channels: 
+ticker.C and update. The select statement blocks until one of its 
+communications is ready to proceed.
+<br/><br/>
+When StateMonitor receives a tick from ticker.C, it calls logState to
+print the current state.  When it receives a State update from updates,
+it records the new status in the urlStatus map.
+<br/><br/>
+Notice that this goroutine owns the urlStatus data structure,
+ensuring that it can only be accessed sequentially. 
+This prevents memory corruption issues that might arise from parallel reads 
+and/or writes to a shared map.
+</step>
+
+<step title="Conclusion" src="doc/codewalk/urlpoll.go">
+In this codewalk we have explored a simple example of using Go's concurrency
+primitives to share memory through communication.
+<br/><br/>
+This should provide a starting point from which to explore the ways in which
+goroutines and channels can be used to write expressive and concise concurrent
+programs.
+</step>
+	
+</codewalk>
diff --git a/_content/doc/codewalk/urlpoll.go b/_content/doc/codewalk/urlpoll.go
new file mode 100644
index 0000000..1fb9958
--- /dev/null
+++ b/_content/doc/codewalk/urlpoll.go
@@ -0,0 +1,116 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"log"
+	"net/http"
+	"time"
+)
+
+const (
+	numPollers     = 2                // number of Poller goroutines to launch
+	pollInterval   = 60 * time.Second // how often to poll each URL
+	statusInterval = 10 * time.Second // how often to log status to stdout
+	errTimeout     = 10 * time.Second // back-off timeout on error
+)
+
+var urls = []string{
+	"http://www.google.com/",
+	"http://golang.org/",
+	"http://blog.golang.org/",
+}
+
+// State represents the last-known state of a URL.
+type State struct {
+	url    string
+	status string
+}
+
+// StateMonitor maintains a map that stores the state of the URLs being
+// polled, and prints the current state every updateInterval nanoseconds.
+// It returns a chan State to which resource state should be sent.
+func StateMonitor(updateInterval time.Duration) chan<- State {
+	updates := make(chan State)
+	urlStatus := make(map[string]string)
+	ticker := time.NewTicker(updateInterval)
+	go func() {
+		for {
+			select {
+			case <-ticker.C:
+				logState(urlStatus)
+			case s := <-updates:
+				urlStatus[s.url] = s.status
+			}
+		}
+	}()
+	return updates
+}
+
+// logState prints a state map.
+func logState(s map[string]string) {
+	log.Println("Current state:")
+	for k, v := range s {
+		log.Printf(" %s %s", k, v)
+	}
+}
+
+// Resource represents an HTTP URL to be polled by this program.
+type Resource struct {
+	url      string
+	errCount int
+}
+
+// Poll executes an HTTP HEAD request for url
+// and returns the HTTP status string or an error string.
+func (r *Resource) Poll() string {
+	resp, err := http.Head(r.url)
+	if err != nil {
+		log.Println("Error", r.url, err)
+		r.errCount++
+		return err.Error()
+	}
+	r.errCount = 0
+	return resp.Status
+}
+
+// Sleep sleeps for an appropriate interval (dependent on error state)
+// before sending the Resource to done.
+func (r *Resource) Sleep(done chan<- *Resource) {
+	time.Sleep(pollInterval + errTimeout*time.Duration(r.errCount))
+	done <- r
+}
+
+func Poller(in <-chan *Resource, out chan<- *Resource, status chan<- State) {
+	for r := range in {
+		s := r.Poll()
+		status <- State{r.url, s}
+		out <- r
+	}
+}
+
+func main() {
+	// Create our input and output channels.
+	pending, complete := make(chan *Resource), make(chan *Resource)
+
+	// Launch the StateMonitor.
+	status := StateMonitor(statusInterval)
+
+	// Launch some Poller goroutines.
+	for i := 0; i < numPollers; i++ {
+		go Poller(pending, complete, status)
+	}
+
+	// Send some Resources to the pending queue.
+	go func() {
+		for _, url := range urls {
+			pending <- &Resource{url: url}
+		}
+	}()
+
+	for r := range complete {
+		go r.Sleep(pending)
+	}
+}
diff --git a/_content/doc/contribute.html b/_content/doc/contribute.html
new file mode 100644
index 0000000..66a47eb
--- /dev/null
+++ b/_content/doc/contribute.html
@@ -0,0 +1,1294 @@
+<!--{
+	"Title": "Contribution Guide"
+}-->
+
+<p>
+The Go project welcomes all contributors.
+</p>
+
+<p>
+This document is a guide to help you through the process
+of contributing to the Go project, which is a little different
+from that used by other open source projects.
+We assume you have a basic understanding of Git and Go.
+</p>
+
+<p>
+In addition to the information here, the Go community maintains a
+<a href="https://golang.org/wiki/CodeReview">CodeReview</a> wiki page.
+Feel free to contribute to the wiki as you learn the review process.
+</p>
+
+<p>
+Note that the <code>gccgo</code> front end lives elsewhere;
+see <a href="gccgo_contribute.html">Contributing to gccgo</a>.
+</p>
+
+<h2 id="contributor">Becoming a contributor</h2>
+
+<h3 id="contrib_overview">Overview</h3>
+
+<p>
+The first step is registering as a Go contributor and configuring your environment.
+Here is a checklist of the required steps to follow:
+</p>
+
+<ul>
+<li>
+<b>Step 0</b>: Decide on a single Google Account you will be using to contribute to Go.
+Use that account for all the following steps and make sure that <code>git</code>
+is configured to create commits with that account's e-mail address.
+</li>
+<li>
+<b>Step 1</b>: <a href="https://cla.developers.google.com/clas">Sign and submit</a> a
+CLA (Contributor License Agreement).
+</li>
+<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
+"Generate Password" in the page's top right menu bar, and follow the
+instructions.
+</li>
+<li>
+<b>Step 3</b>: Register for Gerrit, the code review tool used by the Go team,
+by <a href="https://go-review.googlesource.com/login/">visiting this page</a>.
+The CLA and the registration need to be done only once for your account.
+</li>
+<li>
+<b>Step 4</b>: Install <code>git-codereview</code> by running
+<code>go get -u golang.org/x/review/git-codereview</code>
+</li>
+</ul>
+
+<p>
+If you prefer, there is an automated tool that walks through these steps.
+Just run:
+</p>
+
+<pre>
+$ go get -u golang.org/x/tools/cmd/go-contrib-init
+$ cd /code/to/edit
+$ go-contrib-init
+</pre>
+
+<p>
+The rest of this chapter elaborates on these instructions.
+If you have completed the steps above (either manually or through the tool), jump to
+<a href="#before_contributing">Before contributing code</a>.
+</p>
+
+<h3 id="google_account">Step 0: Select a Google Account</h3>
+
+<p>
+A contribution to Go is made through a Google account with a specific
+e-mail address.
+Make sure to use the same account throughout the process and
+for all your subsequent contributions.
+You may need to decide whether to use a personal address or a corporate address.
+The choice will depend on who
+will own the copyright for the code that you will be writing
+and submitting.
+You might want to discuss this topic with your employer before deciding which
+account to use.
+</p>
+
+<p>
+Google accounts can either be Gmail e-mail accounts, G Suite organization accounts, or
+accounts associated with an external e-mail address.
+For instance, if you need to use
+an existing corporate e-mail that is not managed through G Suite, you can create
+an account associated
+<a href="https://accounts.google.com/SignUpWithoutGmail">with your existing
+e-mail address</a>.
+</p>
+
+<p>
+You also need to make sure that your Git tool is configured to create commits
+using your chosen e-mail address.
+You can either configure Git globally
+(as a default for all projects), or locally (for a single specific project).
+You can check the current configuration with this command:
+</p>
+
+<pre>
+$ git config --global user.email  # check current global config
+$ git config user.email           # check current local config
+</pre>
+
+<p>
+To change the configured address:
+</p>
+
+<pre>
+$ git config --global user.email name@example.com   # change global config
+$ git config user.email name@example.com            # change local config
+</pre>
+
+
+<h3 id="cla">Step 1: Contributor License Agreement</h3>
+
+<p>
+Before sending your first change to the Go project
+you must have completed one of the following two CLAs.
+Which CLA you should sign depends on who owns the copyright to your work.
+</p>
+
+<ul>
+<li>
+If you are the copyright holder, you will need to agree to the
+<a href="https://developers.google.com/open-source/cla/individual">individual
+contributor license agreement</a>, which can be completed online.
+</li>
+<li>
+If your organization is the copyright holder, the organization
+will need to agree to the
+<a href="https://developers.google.com/open-source/cla/corporate">corporate
+contributor license agreement</a>.<br>
+</li>
+</ul>
+
+<p>
+You can check your currently signed agreements and sign new ones at
+the <a href="https://cla.developers.google.com/clas?pli=1&amp;authuser=1">Google Developers
+Contributor License Agreements</a> website.
+If the copyright holder for your contribution has already completed the
+agreement in connection with another Google open source project,
+it does not need to be completed again.
+</p>
+
+<p>
+If the copyright holder for the code you are submitting changes&mdash;for example,
+if you start contributing code on behalf of a new company&mdash;please send mail
+to the <a href="mailto:golang-dev@googlegroups.com"><code>golang-dev</code>
+mailing list</a>.
+This will let us know the situation so we can make sure an appropriate agreement is
+completed and update the <code>AUTHORS</code> file.
+</p>
+
+
+<h3 id="config_git_auth">Step 2: Configure git authentication</h3>
+
+<p>
+The main Go repository is located at
+<a href="https://go.googlesource.com">go.googlesource.com</a>,
+a Git server hosted by Google.
+Authentication on the web server is made through your Google account, but
+you also need to configure <code>git</code> on your computer to access it.
+Follow these steps:
+</p>
+
+<ol>
+<li>
+Visit <a href="https://go.googlesource.com">go.googlesource.com</a>
+and click on "Generate Password" in the page's top right menu bar.
+You will be redirected to accounts.google.com to sign in.
+</li>
+<li>
+After signing in, you will be taken to a page with the title "Configure Git".
+This page contains a personalized script that when run locally will configure Git
+to hold your unique authentication key.
+This key is paired with one that is generated and stored on the server,
+analogous to how SSH keys work.
+</li>
+<li>
+Copy and run this script locally in your terminal to store your secret
+authentication token in a <code>.gitcookies</code> file.
+If you are using a Windows computer and running <code>cmd</code>,
+you should instead follow the instructions in the yellow box to run the command;
+otherwise run the regular script.
+</li>
+</ol>
+
+<h3 id="auth">Step 3: Create a Gerrit account </h3>
+
+<p>
+Gerrit is an open-source tool used by Go maintainers to discuss and review
+code submissions.
+</p>
+
+<p>
+To register your account, visit <a href="https://go-review.googlesource.com/login/">
+go-review.googlesource.com/login/</a> and sign in once using the same Google Account you used above.
+</p>
+
+<h3 id="git-codereview_install">Step 4: Install the git-codereview command</h3>
+
+<p>
+Changes to Go must be reviewed before they are accepted, no matter who makes the change.
+A custom <code>git</code> command called <code>git-codereview</code>
+simplifies sending changes to Gerrit.
+</p>
+
+<p>
+Install the <code>git-codereview</code> command by running,
+</p>
+
+<pre>
+$ go get -u golang.org/x/review/git-codereview
+</pre>
+
+<p>
+Make sure <code>git-codereview</code> is installed in your shell path, so that the
+<code>git</code> command can find it.
+Check that
+</p>
+
+<pre>
+$ git codereview help
+</pre>
+
+<p>
+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 <code>$GOPATH/bin</code> to this
+directory.
+</p>
+
+
+<h2 id="before_contributing">Before contributing code</h2>
+
+<p>
+The project welcomes code patches, but to make sure things are well
+coordinated you should discuss any significant change before starting
+the work.
+It's recommended that you signal your intention to contribute in the
+issue tracker, either by <a href="https://golang.org/issue/new">filing
+a new issue</a> or by claiming
+an <a href="https://golang.org/issues">existing one</a>.
+</p>
+
+<h3 id="where">Where to contribute</h3>
+
+<p>
+The Go project consists of the main
+<a href="https://go.googlesource.com/go">go</a> repository, which contains the
+source code for the Go language, as well as many golang.org/x/... repostories.
+These contain the various tools and infrastructure that support Go. For
+example, <a href="https://go.googlesource.com/pkgsite">golang.org/x/pkgsite</a>
+is for <a href="https://pkg.go.dev">pkg.go.dev</a>,
+<a href="https://go.googlesource.com/playground">golang.org/x/playground</a>
+is for the Go playground, and
+<a href="https://go.googlesource.com/tools">golang.org/x/tools</a> contains
+a variety of Go tools, including the Go language server,
+<a href="https://golang.org/s/gopls">gopls</a>. You can see a
+list of all the golang.org/x/... repositories on
+<a href="https://go.googlesource.com">go.googlesource.com</a>.
+</p>
+
+<h3 id="check_tracker">Check the issue tracker</h3>
+
+<p>
+Whether you already know what contribution to make, or you are searching for
+an idea, the <a href="https://github.com/golang/go/issues">issue tracker</a> is
+always the first place to go.
+Issues are triaged to categorize them and manage the workflow.
+</p>
+
+<p>
+The majority of the golang.org/x/... repos also use the main Go
+issue tracker. However, a few of these repositories manage their issues
+separately, so please be sure to check the right tracker for the repository to
+which you would like to contribute.
+</p>
+
+<p>
+Most issues will be marked with one of the following workflow labels:
+</p>
+
+<ul>
+	<li>
+	<b>NeedsInvestigation</b>: The issue is not fully understood
+	and requires analysis to understand the root cause.
+	</li>
+	<li>
+	<b>NeedsDecision</b>: the issue is relatively well understood, but the
+	Go team hasn't yet decided the best way to address it.
+	It would be better to wait for a decision before writing code.
+	If you are interested in working on an issue in this state,
+	feel free to "ping" maintainers in the issue's comments
+	if some time has passed without a decision.
+	</li>
+	<li>
+	<b>NeedsFix</b>: the issue is fully understood and code can be written
+	to fix it.
+	</li>
+</ul>
+
+<p>
+You can use GitHub's search functionality to find issues to help out with. Examples:
+</p>
+
+<ul>
+	<li>
+	Issues that need investigation: <a href="https://github.com/golang/go/issues?q=is%3Aissue+is%3Aopen+label%3ANeedsInvestigation"><code>is:issue is:open label:NeedsInvestigation</code></a>
+	</li>
+	<li>
+	Issues that need a fix: <a href="https://github.com/golang/go/issues?q=is%3Aissue+is%3Aopen+label%3ANeedsFix"><code>is:issue is:open label:NeedsFix</code></a>
+	</li>
+	<li>
+	Issues that need a fix and have a CL: <a href="https://github.com/golang/go/issues?q=is%3Aissue+is%3Aopen+label%3ANeedsFix+%22golang.org%2Fcl%22"><code>is:issue is:open label:NeedsFix "golang.org/cl"</code></a>
+	</li>
+	<li>
+	Issues that need a fix and do not have a CL: <a href="https://github.com/golang/go/issues?q=is%3Aissue+is%3Aopen+label%3ANeedsFix+NOT+%22golang.org%2Fcl%22"><code>is:issue is:open label:NeedsFix NOT "golang.org/cl"</code></a>
+	</li>
+</ul>
+
+<h3 id="design">Open an issue for any new problem</h3>
+
+<p>
+Excluding very trivial changes, all contributions should be connected
+to an existing issue.
+Feel free to open one and discuss your plans.
+This process gives everyone a chance to validate the design,
+helps prevent duplication of effort,
+and ensures that the idea fits inside the goals for the language and tools.
+It also checks that the design is sound before code is written;
+the code review tool is not the place for high-level discussions.
+</p>
+
+<p>
+When planning work, please note that the Go project follows a <a
+href="https://golang.org/wiki/Go-Release-Cycle">six-month development cycle</a>
+for the main Go repository. The latter half of each cycle is a three-month
+feature freeze during which only bug fixes and documentation updates are
+accepted. New contributions can be sent during a feature freeze, but they will
+not be merged until the freeze is over. The freeze applies to the entire main
+repository as well as to the code in golang.org/x/... repositories that is
+needed to build the binaries included in the release. See the lists of packages
+vendored into
+<a href="https://github.com/golang/go/blob/master/src/vendor/modules.txt">the standard library</a>
+and the <a href="https://github.com/golang/go/blob/master/src/cmd/vendor/modules.txt"><code>go</code> command</a>.
+</p>
+
+<p>
+Significant changes to the language, libraries, or tools must go
+through the
+<a href="https://golang.org/s/proposal-process">change proposal process</a>
+before they can be accepted.
+</p>
+
+<p>
+Sensitive security-related issues (only!) should be reported to <a href="mailto:security@golang.org">security@golang.org</a>.
+</p>
+
+<h2 id="sending_a_change_github">Sending a change via GitHub</h2>
+
+<p>
+First-time contributors that are already familiar with the
+<a href="https://guides.github.com/introduction/flow/">GitHub flow</a>
+are encouraged to use the same process for Go contributions.
+Even though Go
+maintainers use Gerrit for code review, a bot called Gopherbot has been created to sync
+GitHub pull requests to Gerrit.
+</p>
+
+<p>
+Open a pull request as you normally would.
+Gopherbot will create a corresponding Gerrit change and post a link to
+it on your GitHub pull request; updates to the pull request will also
+get reflected in the Gerrit change.
+When somebody comments on the change, their comment will be also
+posted in your pull request, so you will get a notification.
+</p>
+
+<p>
+Some things to keep in mind:
+</p>
+
+<ul>
+<li>
+To update the pull request with new code, just push it to the branch; you can either
+add more commits, or rebase and force-push (both styles are accepted).
+</li>
+<li>
+If the request is accepted, all commits will be squashed, and the final
+commit description will be composed by concatenating the pull request's
+title and description.
+The individual commits' descriptions will be discarded.
+See <a href="#commit_messages">Writing good commit messages</a> for some
+suggestions.
+</li>
+<li>
+Gopherbot is unable to sync line-by-line codereview into GitHub: only the
+contents of the overall comment on the request will be synced.
+Remember you can always visit Gerrit to see the fine-grained review.
+</li>
+</ul>
+
+<h2 id="sending_a_change_gerrit">Sending a change via Gerrit</h2>
+
+<p>
+It is not possible to fully sync Gerrit and GitHub, at least at the moment,
+so we recommend learning Gerrit.
+It's different but powerful and familiarity with it will help you understand
+the flow.
+</p>
+
+<h3 id="gerrit_overview">Overview</h3>
+
+<p>
+This is an overview of the overall process:
+</p>
+
+<ul>
+<li>
+<b>Step 1:</b> Clone the source code from <code>go.googlesource.com</code> and
+make sure it's stable by compiling and testing it once.
+
+<p>If you're making a change to the
+<a href="https://go.googlesource.com/go">main Go repository</a>:</p>
+
+<pre>
+$ git clone https://go.googlesource.com/go
+$ cd go/src
+$ ./all.bash                                # compile and test
+</pre>
+
+<p>
+If you're making a change to one of the golang.org/x/... repositories
+(<a href="https://go.googlesource.com/tools">golang.org/x/tools</a>,
+in this example):
+</p>
+
+<pre>
+$ git clone https://go.googlesource.com/tools
+$ cd tools
+$ go test ./...                             # compile and test
+</pre>
+</li>
+
+<li>
+<b>Step 2:</b> Prepare changes in a new branch, created from the master branch.
+To commit the changes, use <code>git</code> <code>codereview</code> <code>change</code>; that
+will create or amend a single commit in the branch.
+<pre>
+$ git checkout -b mybranch
+$ [edit files...]
+$ git add [files...]
+$ git codereview change   # create commit in the branch
+$ [edit again...]
+$ git add [files...]
+$ git codereview change   # amend the existing commit with new changes
+$ [etc.]
+</pre>
+</li>
+
+<li>
+<b>Step 3:</b> Test your changes, either by running the tests in the package
+you edited or by re-running <code>all.bash</code>.
+
+<p>In the main Go repository:</p>
+<pre>
+$ ./all.bash    # recompile and test
+</pre>
+
+<p>In a golang.org/x/... repository:</p>
+<pre>
+$ go test ./... # recompile and test
+</pre>
+</li>
+
+<li>
+<b>Step 4:</b> Send the changes for review to Gerrit using <code>git</code>
+<code>codereview</code> <code>mail</code> (which doesn't use e-mail, despite the name).
+<pre>
+$ git codereview mail     # send changes to Gerrit
+</pre>
+</li>
+
+<li>
+<b>Step 5:</b> After a review, apply changes to the same single commit
+and mail them to Gerrit again:
+<pre>
+$ [edit files...]
+$ git add [files...]
+$ git codereview change   # update same commit
+$ git codereview mail     # send to Gerrit again
+</pre>
+</li>
+</ul>
+
+<p>
+The rest of this section describes these steps in more detail.
+</p>
+
+
+<h3 id="checkout_go">Step 1: Clone the source code</h3>
+
+<p>
+In addition to a recent Go installation, you need to have a local copy of the source
+checked out from the correct repository.
+You can check out the Go source repo onto your local file system anywhere
+you want as long as it's outside your <code>GOPATH</code>.
+Clone from <code>go.googlesource.com</code> (not GitHub):
+</p>
+
+<p>Main Go repository:</p>
+<pre>
+$ git clone https://go.googlesource.com/go
+$ cd go
+</pre>
+
+<p>golang.org/x/... repository</p>
+(<a href="https://go.googlesource.com/tools">golang.org/x/tools</a> in this example):
+<pre>
+$ git clone https://go.googlesource.com/tools
+$ cd tools
+</pre>
+
+<h3 id="make_branch">Step 2: Prepare changes in a new branch</h3>
+
+<p>
+Each Go change must be made in a separate branch, created from the master branch.
+You can use
+the normal <code>git</code> commands to create a branch and add changes to the
+staging area:
+</p>
+
+<pre>
+$ git checkout -b mybranch
+$ [edit files...]
+$ git add [files...]
+</pre>
+
+<p>
+To commit changes, instead of <code>git commit</code>, use <code>git codereview change</code>.
+</p>
+
+<pre>
+$ git codereview change
+(open $EDITOR)
+</pre>
+
+<p>
+You can edit the commit description in your favorite editor as usual.
+The  <code>git</code> <code>codereview</code> <code>change</code> command
+will automatically add a unique Change-Id line near the bottom.
+That line is used by Gerrit to match successive uploads of the same change.
+Do not edit or delete it.
+A Change-Id looks like this:
+</p>
+
+<pre>
+Change-Id: I2fbdbffb3aab626c4b6f56348861b7909e3e8990
+</pre>
+
+<p>
+The tool also checks that you've
+run <code>go</code> <code>fmt</code> over the source code, and that
+the commit message follows the <a href="#commit_messages">suggested format</a>.
+</p>
+
+<p>
+If you need to edit the files again, you can stage the new changes and
+re-run <code>git</code> <code>codereview</code> <code>change</code>: each subsequent
+run will amend the existing commit while preserving the Change-Id.
+</p>
+
+<p>
+Make sure that you always keep a single commit in each branch.
+If you add more
+commits by mistake, you can use <code>git</code> <code>rebase</code> to
+<a href="https://stackoverflow.com/questions/31668794/squash-all-your-commits-in-one-before-a-pull-request-in-github">squash them together</a>
+into a single one.
+</p>
+
+
+<h3 id="testing">Step 3: Test your changes</h3>
+
+<p>
+You've <a href="code.html">written and tested your code</a>, but
+before sending code out for review, run <i>all the tests for the whole
+tree</i> to make sure the changes don't break other packages or programs.
+</p>
+
+<h4 id="test-gorepo">In the main Go repository</h4>
+
+<p>This can be done by running <code>all.bash</code>:</p>
+
+<pre>
+$ cd go/src
+$ ./all.bash
+</pre>
+
+<p>
+(To build under Windows use <code>all.bat</code>)
+</p>
+
+<p>
+After running for a while and printing a lot of testing output, the command should finish
+by printing,
+</p>
+
+<pre>
+ALL TESTS PASSED
+</pre>
+
+<p>
+You can use <code>make.bash</code> instead of <code>all.bash</code>
+to just build the compiler and the standard library without running the test suite.
+Once the <code>go</code> tool is built, it will be installed as <code>bin/go</code>
+under the directory in which you cloned the Go repository, and you can
+run it directly from there.
+See also
+the section on how to <a href="#quick_test">test your changes quickly</a>.
+</p>
+
+<h4 id="test-xrepo">In the golang.org/x/... repositories</h4>
+
+<p>
+Run the tests for the entire repository
+(<a href="https://go.googlesource.com/tools">golang.org/x/tools</a>,
+in this example):
+</p>
+
+<pre>
+$ cd tools
+$ go test ./...
+</pre>
+
+<p>
+If you're concerned about the build status,
+you can check the <a href="https://build.golang.org">Build Dashboard</a>.
+Test failures may also be caught by the TryBots in code review.
+</p>
+
+<p>
+Some repositories, like
+<a href="https://go.googlesource.com/vscode-go">golang.org/x/vscode-go</a> will
+have different testing infrastructures, so always check the documentation
+for the repository in which you are working. The README file in the root of the
+repository will usually have this information.
+</p>
+
+<h3 id="mail">Step 4: Send changes for review</h3>
+
+<p>
+Once the change is ready and tested over the whole tree, send it for review.
+This is done with the <code>mail</code> sub-command which, despite its name, doesn't
+directly mail anything; it just sends the change to Gerrit:
+</p>
+
+<pre>
+$ git codereview mail
+</pre>
+
+<p>
+Gerrit assigns your change a number and URL, which <code>git</code> <code>codereview</code> <code>mail</code> will print, something like:
+</p>
+
+<pre>
+remote: New Changes:
+remote:   https://go-review.googlesource.com/99999 math: improved Sin, Cos and Tan precision for very large arguments
+</pre>
+
+<p>
+If you get an error instead, check the
+<a href="#troubleshooting_mail">Troubleshooting mail errors</a> section.
+</p>
+
+<p>
+If your change relates to an open GitHub issue and you have followed the <a href="#commit_messages">
+suggested commit message format</a>, the issue will be updated in a few minutes by a bot,
+linking your Gerrit change to it in the comments.
+</p>
+
+
+<h3 id="revise">Step 5: Revise changes after a review</h3>
+
+<p>
+Go maintainers will review your code on Gerrit, and you will get notifications via e-mail.
+You can see the review on Gerrit and comment on them there.
+You can also reply
+<a href="https://gerrit-review.googlesource.com/Documentation/intro-user.html#reply-by-email">using e-mail</a>
+if you prefer.
+</p>
+
+<p>
+If you need to revise your change after the review, edit the files in
+the same branch you previously created, add them to the Git staging
+area, and then amend the commit with
+<code>git</code> <code>codereview</code> <code>change</code>:
+</p>
+
+<pre>
+$ git codereview change     # amend current commit
+(open $EDITOR)
+$ git codereview mail       # send new changes to Gerrit
+</pre>
+
+<p>
+If you don't need to change the commit description, just save and exit from the editor.
+Remember not to touch the special Change-Id line.
+</p>
+
+<p>
+Again, make sure that you always keep a single commit in each branch.
+If you add more
+commits by mistake, you can use <code>git rebase</code> to
+<a href="https://stackoverflow.com/questions/31668794/squash-all-your-commits-in-one-before-a-pull-request-in-github">squash them together</a>
+into a single one.
+</p>
+
+<h2 id="commit_messages">Good commit messages</h2>
+
+<p>
+Commit messages in Go follow a specific set of conventions,
+which we discuss in this section.
+</p>
+
+<p>
+Here is an example of a good one:
+</p>
+
+<pre>
+math: improve Sin, Cos and Tan precision for very large arguments
+
+The existing implementation has poor numerical properties for
+large arguments, so use the McGillicutty algorithm to improve
+accuracy above 1e10.
+
+The algorithm is described at https://wikipedia.org/wiki/McGillicutty_Algorithm
+
+Fixes #159
+</pre>
+
+<h3 id="first_line">First line</h3>
+
+<p>
+The first line of the change description is conventionally a short one-line
+summary of the change, prefixed by the primary affected package.
+</p>
+
+<p>
+A rule of thumb is that it should be written so to complete the sentence
+"This change modifies Go to _____."
+That means it does not start with a capital letter, is not a complete sentence,
+and actually summarizes the result of the change.
+</p>
+
+<p>
+Follow the first line by a blank line.
+</p>
+
+<h3 id="main_content">Main content</h3>
+
+<p>
+The rest of the description elaborates and should provide context for the
+change and explain what it does.
+Write in complete sentences with correct punctuation, just like
+for your comments in Go.
+Don't use HTML, Markdown, or any other markup language.
+</p>
+
+<p>
+Add any relevant information, such as benchmark data if the change
+affects performance.
+The <a href="https://godoc.org/golang.org/x/perf/cmd/benchstat">benchstat</a>
+tool is conventionally used to format
+benchmark data for change descriptions.
+</p>
+
+<h3 id="ref_issues">Referencing issues</h3>
+
+<p>
+The special notation "Fixes #12345" associates the change with issue 12345 in the
+<a href="https://golang.org/issue/12345">Go issue tracker</a>.
+When this change is eventually applied, the issue
+tracker will automatically mark the issue as fixed.
+</p>
+
+<p>
+If the change is a partial step towards the resolution of the issue,
+write "Updates #12345" instead.
+This will leave a comment in the issue linking back to the change in
+Gerrit, but it will not close the issue when the change is applied.
+</p>
+
+<p>
+If you are sending a change against a golang.org/x/... repository, you must use
+the fully-qualified syntax supported by GitHub to make sure the change is
+linked to the issue in the main repository, not the x/ repository.
+Most issues are tracked in the main repository's issue tracker.
+The correct form is "Fixes golang/go#159".
+</p>
+
+
+<h2 id="review">The review process</h2>
+
+<p>
+This section explains the review process in detail and how to approach
+reviews after a change has been mailed.
+</p>
+
+
+<h3 id="mistakes">Common beginner mistakes</h3>
+
+<p>
+When a change is sent to Gerrit, it is usually triaged within a few days.
+A maintainer will have a look and provide some initial review that for first-time
+contributors usually focuses on basic cosmetics and common mistakes.
+These include things like:
+</p>
+
+<ul>
+<li>
+Commit message not following the <a href="#commit_messages">suggested
+format</a>.
+</li>
+
+<li>
+The lack of a linked GitHub issue.
+The vast majority of changes
+require a linked issue that describes the bug or the feature that the change
+fixes or implements, and consensus should have been reached on the tracker
+before proceeding with it.
+Gerrit reviews do not discuss the merit of the change,
+just its implementation.
+<br>
+Only trivial or cosmetic changes will be accepted without an associated issue.
+</li>
+
+<li>
+Change sent during the freeze phase of the development cycle, when the tree
+is closed for general changes.
+In this case,
+a maintainer might review the code with a line such as <code>R=go1.12</code>,
+which means that it will be reviewed later when the tree opens for a new
+development window.
+You can add <code>R=go1.XX</code> as a comment yourself
+if you know that it's not the correct time frame for the change.
+</li>
+</ul>
+
+<h3 id="trybots">Trybots</h3>
+
+<p>
+After an initial reading of your change, maintainers will trigger trybots,
+a cluster of servers that will run the full test suite on several different
+architectures.
+Most trybots complete in a few minutes, at which point a link will
+be posted in Gerrit where you can see the results.
+</p>
+
+<p>
+If the trybot run fails, follow the link and check the full logs of the
+platforms on which the tests failed.
+Try to understand what broke, update your patch to fix it, and upload again.
+Maintainers will trigger a new trybot run to see
+if the problem was fixed.
+</p>
+
+<p>
+Sometimes, the tree can be broken on some platforms for a few hours; if
+the failure reported by the trybot doesn't seem related to your patch, go to the
+<a href="https://build.golang.org">Build Dashboard</a> and check if the same
+failure appears in other recent commits on the same platform.
+In this case,
+feel free to write a comment in Gerrit to mention that the failure is
+unrelated to your change, to help maintainers understand the situation.
+</p>
+
+<h3 id="reviews">Reviews</h3>
+
+<p>
+The Go community values very thorough reviews.
+Think of each review comment like a ticket: you are expected to somehow "close" it
+by acting on it, either by implementing the suggestion or convincing the
+reviewer otherwise.
+</p>
+
+<p>
+After you update the change, go through the review comments and make sure
+to reply to every one.
+You can click the "Done" button to reply
+indicating that you've implemented the reviewer's suggestion; otherwise,
+click on "Reply" and explain why you have not, or what you have done instead.
+</p>
+
+<p>
+It is perfectly normal for changes to go through several round of reviews,
+with one or more reviewers making new comments every time
+and then waiting for an updated change before reviewing again.
+This cycle happens even for experienced contributors, so
+don't be discouraged by it.
+</p>
+
+<h3 id="votes">Voting conventions</h3>
+
+<p>
+As they near a decision, reviewers will make a "vote" on your change.
+The Gerrit voting system involves an integer in the range -2 to +2:
+</p>
+
+<ul>
+	<li>
+	<b>+2</b> The change is approved for being merged.
+	Only Go maintainers can cast a +2 vote.
+	</li>
+	<li>
+	<b>+1</b> The change looks good, but either the reviewer is requesting
+	minor changes before approving it, or they are not a maintainer and cannot
+	approve it, but would like to encourage an approval.
+	</li>
+	<li>
+	<b>-1</b> The change is not good the way it is but might be fixable.
+	A -1 vote will always have a comment explaining why the change is unacceptable.
+	</li>
+	<li>
+	<b>-2</b> The change is blocked by a maintainer and cannot be approved.
+	Again, there will be a comment explaining the decision.
+	</li>
+</ul>
+
+<p>
+At least two maintainers must approve of the change, and at least one
+of those maintainers must +2 the change.
+The second maintainer may cast a vote of Trust+1, meaning that the
+change looks basically OK, but that the maintainer hasn't done the
+detailed review required for a +2 vote.
+</p>
+
+<h3 id="submit">Submitting an approved change</h3>
+
+<p>
+After the code has been +2'ed and Trust+1'ed, an approver will
+apply it to the master branch using the Gerrit user interface.
+This is called "submitting the change".
+</p>
+
+<p>
+The two steps (approving and submitting) are separate because in some cases maintainers
+may want to approve it but not to submit it right away (for instance,
+the tree could be temporarily frozen).
+</p>
+
+<p>
+Submitting a change checks it into the repository.
+The change description will include a link to the code review,
+which will be updated with a link to the change
+in the repository.
+Since the method used to integrate the changes is Git's "Cherry Pick",
+the commit hashes in the repository will be changed by
+the submit operation.
+</p>
+
+<p>
+If your change has been approved for a few days without being
+submitted, feel free to write a comment in Gerrit requesting
+submission.
+</p>
+
+
+<h3 id="more_information">More information</h3>
+
+<p>
+In addition to the information here, the Go community maintains a <a
+href="https://golang.org/wiki/CodeReview">CodeReview</a> wiki page.
+Feel free to contribute to this page as you learn more about the review process.
+</p>
+
+
+
+<h2 id="advanced_topics">Miscellaneous topics</h2>
+
+<p>
+This section collects a number of other comments that are
+outside the issue/edit/code review/submit process itself.
+</p>
+
+
+<h3 id="copyright">Copyright headers</h3>
+
+<p>
+Files in the Go repository don't list author names, both to avoid clutter
+and to avoid having to keep the lists up to date.
+Instead, your name will appear in the
+<a href="https://golang.org/change">change log</a> and in the <a
+href="/CONTRIBUTORS"><code>CONTRIBUTORS</code></a> file and perhaps the <a
+href="/AUTHORS"><code>AUTHORS</code></a> file.
+These files are automatically generated from the commit logs periodically.
+The <a href="/AUTHORS"><code>AUTHORS</code></a> file defines who &ldquo;The Go
+Authors&rdquo;&mdash;the copyright holders&mdash;are.
+</p>
+
+<p>
+New files that you contribute should use the standard copyright header:
+</p>
+
+<pre>
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+</pre>
+
+<p>
+(Use the current year if you're reading this in 2022 or beyond.)
+Files in the repository are copyrighted the year they are added.
+Do not update the copyright year on files that you change.
+</p>
+
+
+
+
+<h3 id="troubleshooting_mail">Troubleshooting mail errors</h3>
+
+<p>
+The most common way that the <code>git</code> <code>codereview</code> <code>mail</code>
+command fails is because the e-mail address in the commit does not match the one
+that you used during <a href="#google_account">the registration process</a>.
+
+<br>
+If you see something like...
+</p>
+
+<pre>
+remote: Processing changes: refs: 1, done
+remote:
+remote: ERROR:  In commit ab13517fa29487dcf8b0d48916c51639426c5ee9
+remote: ERROR:  author email address XXXXXXXXXXXXXXXXXXX
+remote: ERROR:  does not match your user account.
+</pre>
+
+<p>
+you need to configure Git for this repository to use the
+e-mail address that you registered with.
+To change the e-mail address to ensure this doesn't happen again, run:
+</p>
+
+<pre>
+$ git config user.email email@address.com
+</pre>
+
+<p>
+Then change the commit to use this alternative e-mail address with this command:
+</p>
+
+<pre>
+$ git commit --amend --author="Author Name &lt;email@address.com&gt;"
+</pre>
+
+<p>
+Then retry by running:
+</p>
+
+<pre>
+$ git codereview mail
+</pre>
+
+
+<h3 id="quick_test">Quickly testing your changes</h3>
+
+<p>
+Running <code>all.bash</code> for every single change to the code tree
+is burdensome.
+Even though it is strongly suggested to run it before
+sending a change, during the normal development cycle you may want
+to compile and test only the package you are developing.
+</p>
+
+<ul>
+<li>
+In general, you can run <code>make.bash</code> instead of <code>all.bash</code>
+to only rebuild the Go tool chain without running the whole test suite.
+Or you
+can run <code>run.bash</code> to only run the whole test suite without rebuilding
+the tool chain.
+You can think of <code>all.bash</code> as <code>make.bash</code>
+followed by <code>run.bash</code>.
+</li>
+
+<li>
+In this section, we'll call the directory into which you cloned the Go repository <code>$GODIR</code>.
+The <code>go</code> tool built by <code>$GODIR/src/make.bash</code> will be installed
+in <code>$GODIR/bin/go</code> and you
+can invoke it to test your code.
+For instance, if you
+have modified the compiler and you want to test how it affects the
+test suite of your own project, just run <code>go</code> <code>test</code>
+using it:
+
+<pre>
+$ cd &lt;MYPROJECTDIR&gt;
+$ $GODIR/bin/go test
+</pre>
+</li>
+
+<li>
+If you're changing the standard library, you probably don't need to rebuild
+the compiler: you can just run the tests for the package you've changed.
+You can do that either with the Go version you normally use, or
+with the Go compiler built from your clone (which is
+sometimes required because the standard library code you're modifying
+might require a newer version than the stable one you have installed).
+
+<pre>
+$ cd $GODIR/src/crypto/sha1
+$ [make changes...]
+$ $GODIR/bin/go test .
+</pre>
+</li>
+
+<li>
+If you're modifying the compiler itself, you can just recompile
+the <code>compile</code> tool (which is the internal binary invoked
+by <code>go</code> <code>build</code> to compile each single package).
+After that, you will want to test it by compiling or running something.
+
+<pre>
+$ cd $GODIR/src
+$ [make changes...]
+$ $GODIR/bin/go install cmd/compile
+$ $GODIR/bin/go build [something...]   # test the new compiler
+$ $GODIR/bin/go run [something...]     # test the new compiler
+$ $GODIR/bin/go test [something...]    # test the new compiler
+</pre>
+
+The same applies to other internal tools of the Go tool chain,
+such as <code>asm</code>, <code>cover</code>, <code>link</code>, and so on.
+Just recompile and install the tool using <code>go</code>
+<code>install</code> <code>cmd/&lt;TOOL&gt;</code> and then use
+the built Go binary to test it.
+</li>
+
+<li>
+In addition to the standard per-package tests, there is a top-level
+test suite in <code>$GODIR/test</code> that contains
+several black-box and regression tests.
+The test suite is run
+by <code>all.bash</code> but you can also run it manually:
+
+<pre>
+$ cd $GODIR/test
+$ $GODIR/bin/go run run.go
+</pre>
+</ul>
+
+
+<h3 id="cc">Specifying a reviewer / CCing others</h3>
+
+<p>
+Unless explicitly told otherwise, such as in the discussion leading
+up to sending in the change, it's better not to specify a reviewer.
+All changes are automatically CC'ed to the
+<a href="https://groups.google.com/group/golang-codereviews">golang-codereviews@googlegroups.com</a>
+mailing list.
+If this is your first ever change, there may be a moderation
+delay before it appears on the mailing list, to prevent spam.
+</p>
+
+<p>
+You can specify a reviewer or CC interested parties
+using the <code>-r</code> or <code>-cc</code> options.
+Both accept a comma-separated list of e-mail addresses:
+</p>
+
+<pre>
+$ git codereview mail -r joe@golang.org -cc mabel@example.com,math-nuts@swtch.com
+</pre>
+
+
+<h3 id="sync">Synchronize your client</h3>
+
+<p>
+While you were working, others might have submitted changes to the repository.
+To update your local branch, run
+</p>
+
+<pre>
+$ git codereview sync
+</pre>
+
+<p>
+(Under the covers this runs
+<code>git</code> <code>pull</code> <code>-r</code>.)
+</p>
+
+
+<h3 id="download">Reviewing code by others</h3>
+
+<p>
+As part of the review process reviewers can propose changes directly (in the
+GitHub workflow this would be someone else attaching commits to a pull request).
+
+You can import these changes proposed by someone else into your local Git repository.
+On the Gerrit review page, click the "Download ▼" link in the upper right
+corner, copy the "Checkout" command and run it from your local Git repo.
+It will look something like this:
+</p>
+
+<pre>
+$ git fetch https://go.googlesource.com/review refs/changes/21/13245/1 &amp;&amp; git checkout FETCH_HEAD
+</pre>
+
+<p>
+To revert, change back to the branch you were working in.
+</p>
+
+
+<h3 id="git-config">Set up git aliases</h3>
+
+<p>
+The <code>git-codereview</code> command can be run directly from the shell
+by typing, for instance,
+</p>
+
+<pre>
+$ git codereview sync
+</pre>
+
+<p>
+but it is more convenient to set up aliases for <code>git-codereview</code>'s own
+subcommands, so that the above becomes,
+</p>
+
+<pre>
+$ git sync
+</pre>
+
+<p>
+The <code>git-codereview</code> subcommands have been chosen to be distinct from
+Git's own, so it's safe to define these aliases.
+To install them, copy this text into your
+Git configuration file (usually <code>.gitconfig</code> in your home directory):
+</p>
+
+<pre>
+[alias]
+	change = codereview change
+	gofmt = codereview gofmt
+	mail = codereview mail
+	pending = codereview pending
+	submit = codereview submit
+	sync = codereview sync
+</pre>
+
+
+<h3 id="multiple_changes">Sending multiple dependent changes</h3>
+
+<p>
+Advanced users may want to stack up related commits in a single branch.
+Gerrit allows for changes to be dependent on each other, forming such a dependency chain.
+Each change will need to be approved and submitted separately but the dependency
+will be visible to reviewers.
+</p>
+
+<p>
+To send out a group of dependent changes, keep each change as a different commit under
+the same branch, and then run:
+</p>
+
+<pre>
+$ git codereview mail HEAD
+</pre>
+
+<p>
+Make sure to explicitly specify <code>HEAD</code>, which is usually not required when sending
+single changes. More details can be found in the <a href="https://pkg.go.dev/golang.org/x/review/git-codereview?tab=doc#hdr-Multiple_Commit_Work_Branches">git-codereview documentation</a>.
+</p>
diff --git a/_content/doc/debugging_with_gdb.html b/_content/doc/debugging_with_gdb.html
new file mode 100644
index 0000000..e1fb292
--- /dev/null
+++ b/_content/doc/debugging_with_gdb.html
@@ -0,0 +1,554 @@
+<!--{
+	"Title": "Debugging Go Code with GDB",
+	"Path": "/doc/gdb"
+}-->
+
+<!--
+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.
+-->
+
+<i>
+<p>
+The following instructions apply to the standard toolchain
+(the <code>gc</code> Go compiler and tools).
+Gccgo has native gdb support.
+</p>
+<p>
+Note that 
+<a href="https://github.com/go-delve/delve">Delve</a> is a better
+alternative to GDB when debugging Go programs built with the standard
+toolchain. It understands the Go runtime, data structures, and
+expressions better than GDB. Delve currently supports Linux, OSX,
+and Windows on <code>amd64</code>.
+For the most up-to-date list of supported platforms, please see
+<a href="https://github.com/go-delve/delve/tree/master/Documentation/installation">
+ the Delve documentation</a>.
+</p>
+</i>
+
+<p>
+GDB does not understand Go programs well.
+The stack management, threading, and runtime contain aspects that differ
+enough from the execution model GDB expects that they can confuse
+the debugger and cause incorrect results even when the program is
+compiled with gccgo.
+As a consequence, although GDB can be useful in some situations (e.g.,
+debugging Cgo code, or debugging the runtime itself), it is not
+a reliable debugger for Go programs, particularly heavily concurrent
+ones.  Moreover, it is not a priority for the Go project to address
+these issues, which are difficult.
+</p>
+
+<p>
+In short, the instructions below should be taken only as a guide to how
+to use GDB when it works, not as a guarantee of success.
+
+Besides this overview you might want to consult the
+<a href="https://sourceware.org/gdb/current/onlinedocs/gdb/">GDB manual</a>.
+</p>
+
+<p>
+</p>
+
+<h2 id="Introduction">Introduction</h2>
+
+<p>
+When you compile and link your Go programs with the <code>gc</code> toolchain
+on Linux, macOS, FreeBSD or NetBSD, the resulting binaries contain DWARFv4
+debugging information that recent versions (&ge;7.5) of the GDB debugger can
+use to inspect a live process or a core dump.
+</p>
+
+<p>
+Pass the <code>'-w'</code> flag to the linker to omit the debug information
+(for example, <code>go</code> <code>build</code> <code>-ldflags=-w</code> <code>prog.go</code>).
+</p>
+
+<p>
+The code generated by the <code>gc</code> compiler includes inlining of
+function invocations and registerization of variables. These optimizations
+can sometimes make debugging with <code>gdb</code> harder.
+If you find that you need to disable these optimizations,
+build your program using <code>go</code> <code>build</code> <code>-gcflags=all="-N -l"</code>.
+</p>
+
+<p>
+If you want to use gdb to inspect a core dump, you can trigger a dump
+on a program crash, on systems that permit it, by setting
+<code>GOTRACEBACK=crash</code> in the environment (see the
+<a href="/pkg/runtime/#hdr-Environment_Variables"> runtime package
+documentation</a> for more info).
+</p>
+
+<h3 id="Common_Operations">Common Operations</h3>
+
+<ul>
+<li>
+Show file and line number for code, set breakpoints and disassemble:
+<pre>(gdb) <b>list</b>
+(gdb) <b>list <i>line</i></b>
+(gdb) <b>list <i>file.go</i>:<i>line</i></b>
+(gdb) <b>break <i>line</i></b>
+(gdb) <b>break <i>file.go</i>:<i>line</i></b>
+(gdb) <b>disas</b></pre>
+</li>
+<li>
+Show backtraces and unwind stack frames:
+<pre>(gdb) <b>bt</b>
+(gdb) <b>frame <i>n</i></b></pre>
+</li>
+<li>
+Show the name, type and location on the stack frame of local variables,
+arguments and return values:
+<pre>(gdb) <b>info locals</b>
+(gdb) <b>info args</b>
+(gdb) <b>p variable</b>
+(gdb) <b>whatis variable</b></pre>
+</li>
+<li>
+Show the name, type and location of global variables:
+<pre>(gdb) <b>info variables <i>regexp</i></b></pre>
+</li>
+</ul>
+
+
+<h3 id="Go_Extensions">Go Extensions</h3>
+
+<p>
+A recent extension mechanism to GDB allows it to load extension scripts for a
+given binary. The toolchain uses this to extend GDB with a handful of
+commands to inspect internals of the runtime code (such as goroutines) and to
+pretty print the built-in map, slice and channel types.
+</p>
+
+<ul>
+<li>
+Pretty printing a string, slice, map, channel or interface:
+<pre>(gdb) <b>p <i>var</i></b></pre>
+</li>
+<li>
+A $len() and $cap() function for strings, slices and maps:
+<pre>(gdb) <b>p $len(<i>var</i>)</b></pre>
+</li>
+<li>
+A function to cast interfaces to their dynamic types:
+<pre>(gdb) <b>p $dtype(<i>var</i>)</b>
+(gdb) <b>iface <i>var</i></b></pre>
+<p class="detail"><b>Known issue:</b> GDB can’t automatically find the dynamic
+type of an interface value if its long name differs from its short name
+(annoying when printing stacktraces, the pretty printer falls back to printing
+the short type name and a pointer).</p>
+</li>
+<li>
+Inspecting goroutines:
+<pre>(gdb) <b>info goroutines</b>
+(gdb) <b>goroutine <i>n</i> <i>cmd</i></b>
+(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>
+
+<p>
+If you'd like to see how this works, or want to extend it, take a look at <a
+href="/src/runtime/runtime-gdb.py">src/runtime/runtime-gdb.py</a> in
+the Go source distribution. It depends on some special magic types
+(<code>hash&lt;T,U&gt;</code>) and variables (<code>runtime.m</code> and
+<code>runtime.g</code>) that the linker
+(<a href="/src/cmd/link/internal/ld/dwarf.go">src/cmd/link/internal/ld/dwarf.go</a>) ensures are described in
+the DWARF code.
+</p>
+
+<p>
+If you're interested in what the debugging information looks like, run
+<code>objdump</code> <code>-W</code> <code>a.out</code> and browse through the <code>.debug_*</code>
+sections.
+</p>
+
+
+<h3 id="Known_Issues">Known Issues</h3>
+
+<ol>
+<li>String pretty printing only triggers for type string, not for types derived
+from it.</li>
+<li>Type information is missing for the C parts of the runtime library.</li>
+<li>GDB does not understand Go’s name qualifications and treats
+<code>"fmt.Print"</code> as an unstructured literal with a <code>"."</code>
+that needs to be quoted.  It objects even more strongly to method names of
+the form <code>pkg.(*MyType).Meth</code>.
+<li>As of Go 1.11, debug information is compressed by default.
+Older versions of gdb, such as the one available by default on MacOS,
+do not understand the compression.
+You can generate uncompressed debug information by using <code>go
+build -ldflags=-compressdwarf=false</code>.
+(For convenience you can put the <code>-ldflags</code> option in
+the <a href="/cmd/go/#hdr-Environment_variables"><code>GOFLAGS</code>
+environment variable</a> so that you don't have to specify it each time.)
+</li>
+</ol>
+
+<h2 id="Tutorial">Tutorial</h2>
+
+<p>
+In this tutorial we will inspect the binary of the
+<a href="/pkg/regexp/">regexp</a> package's unit tests. To build the binary,
+change to <code>$GOROOT/src/regexp</code> and run <code>go</code> <code>test</code> <code>-c</code>.
+This should produce an executable file named <code>regexp.test</code>.
+</p>
+
+
+<h3 id="Getting_Started">Getting Started</h3>
+
+<p>
+Launch GDB, debugging <code>regexp.test</code>:
+</p>
+
+<pre>
+$ <b>gdb regexp.test</b>
+GNU gdb (GDB) 7.2-gg8
+Copyright (C) 2010 Free Software Foundation, Inc.
+License GPLv  3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
+Type "show copying" and "show warranty" for licensing/warranty details.
+This GDB was configured as "x86_64-linux".
+
+Reading symbols from  /home/user/go/src/regexp/regexp.test...
+done.
+Loading Go Runtime support.
+(gdb) 
+</pre>
+
+<p>
+The message "Loading Go Runtime support" means that GDB loaded the
+extension from <code>$GOROOT/src/runtime/runtime-gdb.py</code>.
+</p>
+
+<p>
+To help GDB find the Go runtime sources and the accompanying support script,
+pass your <code>$GOROOT</code> with the <code>'-d'</code> flag:
+</p>
+
+<pre>
+$ <b>gdb regexp.test -d $GOROOT</b>
+</pre>
+
+<p>
+If for some reason GDB still can't find that directory or that script, you can load
+it by hand by telling gdb (assuming you have the go sources in
+<code>~/go/</code>):
+</p>
+
+<pre>
+(gdb) <b>source ~/go/src/runtime/runtime-gdb.py</b>
+Loading Go Runtime support.
+</pre>
+
+<h3 id="Inspecting_the_source">Inspecting the source</h3>
+
+<p>
+Use the <code>"l"</code> or <code>"list"</code> command to inspect source code.
+</p>
+
+<pre>
+(gdb) <b>l</b>
+</pre>
+
+<p>
+List a specific part of the source parameterizing <code>"list"</code> with a
+function name (it must be qualified with its package name).
+</p>
+
+<pre>
+(gdb) <b>l main.main</b>
+</pre>
+
+<p>
+List a specific file and line number:
+</p>
+
+<pre>
+(gdb) <b>l regexp.go:1</b>
+(gdb) <i># Hit enter to repeat last command. Here, this lists next 10 lines.</i>
+</pre>
+
+
+<h3 id="Naming">Naming</h3>
+
+<p>
+Variable and function names must be qualified with the name of the packages
+they belong to. The <code>Compile</code> function from the <code>regexp</code>
+package is known to GDB as <code>'regexp.Compile'</code>. 
+</p>
+
+<p>
+Methods must be qualified with the name of their receiver types. For example,
+the <code>*Regexp</code> type’s <code>String</code> method is known as
+<code>'regexp.(*Regexp).String'</code>.
+</p>
+
+<p>
+Variables that shadow other variables are magically suffixed with a number in the debug info.
+Variables referenced by closures will appear as pointers magically prefixed with '&amp;'.
+</p>
+
+<h3 id="Setting_breakpoints">Setting breakpoints</h3>
+
+<p>
+Set a breakpoint at the <code>TestFind</code> function:
+</p>
+
+<pre>
+(gdb) <b>b 'regexp.TestFind'</b>
+Breakpoint 1 at 0x424908: file /home/user/go/src/regexp/find_test.go, line 148.
+</pre>
+
+<p>
+Run the program:
+</p>
+
+<pre>
+(gdb) <b>run</b>
+Starting program: /home/user/go/src/regexp/regexp.test
+
+Breakpoint 1, regexp.TestFind (t=0xf8404a89c0) at /home/user/go/src/regexp/find_test.go:148
+148	func TestFind(t *testing.T) {
+</pre>
+
+<p>
+Execution has paused at the breakpoint.
+See which goroutines are running, and what they're doing:
+</p>
+
+<pre>
+(gdb) <b>info goroutines</b>
+  1  waiting runtime.gosched
+* 13  running runtime.goexit
+</pre>
+
+<p>
+the one marked with the <code>*</code> is the current goroutine.
+</p>
+
+<h3 id="Inspecting_the_stack">Inspecting the stack</h3>
+
+<p>
+Look at the stack trace for where we’ve paused the program:
+</p>
+
+<pre>
+(gdb) <b>bt</b>  <i># backtrace</i>
+#0  regexp.TestFind (t=0xf8404a89c0) at /home/user/go/src/regexp/find_test.go:148
+#1  0x000000000042f60b in testing.tRunner (t=0xf8404a89c0, test=0x573720) at /home/user/go/src/testing/testing.go:156
+#2  0x000000000040df64 in runtime.initdone () at /home/user/go/src/runtime/proc.c:242
+#3  0x000000f8404a89c0 in ?? ()
+#4  0x0000000000573720 in ?? ()
+#5  0x0000000000000000 in ?? ()
+</pre>
+
+<p>
+The other goroutine, number 1, is stuck in <code>runtime.gosched</code>, blocked on a channel receive:
+</p>
+
+<pre>
+(gdb) <b>goroutine 1 bt</b>
+#0  0x000000000040facb in runtime.gosched () at /home/user/go/src/runtime/proc.c:873
+#1  0x00000000004031c9 in runtime.chanrecv (c=void, ep=void, selected=void, received=void)
+ at  /home/user/go/src/runtime/chan.c:342
+#2  0x0000000000403299 in runtime.chanrecv1 (t=void, c=void) at/home/user/go/src/runtime/chan.c:423
+#3  0x000000000043075b in testing.RunTests (matchString={void (struct string, struct string, bool *, error *)}
+ 0x7ffff7f9ef60, tests=  []testing.InternalTest = {...}) at /home/user/go/src/testing/testing.go:201
+#4  0x00000000004302b1 in testing.Main (matchString={void (struct string, struct string, bool *, error *)} 
+ 0x7ffff7f9ef80, tests= []testing.InternalTest = {...}, benchmarks= []testing.InternalBenchmark = {...})
+at /home/user/go/src/testing/testing.go:168
+#5  0x0000000000400dc1 in main.main () at /home/user/go/src/regexp/_testmain.go:98
+#6  0x00000000004022e7 in runtime.mainstart () at /home/user/go/src/runtime/amd64/asm.s:78
+#7  0x000000000040ea6f in runtime.initdone () at /home/user/go/src/runtime/proc.c:243
+#8  0x0000000000000000 in ?? ()
+</pre>
+
+<p>
+The stack frame shows we’re currently executing the <code>regexp.TestFind</code> function, as expected.
+</p>
+
+<pre>
+(gdb) <b>info frame</b>
+Stack level 0, frame at 0x7ffff7f9ff88:
+ rip = 0x425530 in regexp.TestFind (/home/user/go/src/regexp/find_test.go:148); 
+    saved rip 0x430233
+ called by frame at 0x7ffff7f9ffa8
+ source language minimal.
+ Arglist at 0x7ffff7f9ff78, args: t=0xf840688b60
+ Locals at 0x7ffff7f9ff78, Previous frame's sp is 0x7ffff7f9ff88
+ Saved registers:
+  rip at 0x7ffff7f9ff80
+</pre>
+
+<p>
+The command <code>info</code> <code>locals</code> lists all variables local to the function and their values, but is a bit
+dangerous to use, since it will also try to print uninitialized variables. Uninitialized slices may cause gdb to try
+to print arbitrary large arrays.
+</p>
+
+<p>
+The function’s arguments:
+</p>
+
+<pre>
+(gdb) <b>info args</b>
+t = 0xf840688b60
+</pre>
+
+<p>
+When printing the argument, notice that it’s a pointer to a
+<code>Regexp</code> value. Note that GDB has incorrectly put the <code>*</code>
+on the right-hand side of the type name and made up a 'struct' keyword, in traditional C style.
+</p>
+
+<pre>
+(gdb) <b>p re</b>
+(gdb) p t
+$1 = (struct testing.T *) 0xf840688b60
+(gdb) p t
+$1 = (struct testing.T *) 0xf840688b60
+(gdb) p *t
+$2 = {errors = "", failed = false, ch = 0xf8406f5690}
+(gdb) p *t-&gt;ch
+$3 = struct hchan&lt;*testing.T&gt;
+</pre>
+
+<p>
+That <code>struct</code> <code>hchan&lt;*testing.T&gt;</code> is the
+runtime-internal representation of a channel. It is currently empty,
+or gdb would have pretty-printed its contents.
+</p>
+
+<p>
+Stepping forward:
+</p>
+
+<pre>
+(gdb) <b>n</b>  <i># execute next line</i>
+149             for _, test := range findTests {
+(gdb)    <i># enter is repeat</i>
+150                     re := MustCompile(test.pat)
+(gdb) <b>p test.pat</b>
+$4 = ""
+(gdb) <b>p re</b>
+$5 = (struct regexp.Regexp *) 0xf84068d070
+(gdb) <b>p *re</b>
+$6 = {expr = "", prog = 0xf840688b80, prefix = "", prefixBytes =  []uint8, prefixComplete = true, 
+  prefixRune = 0, cond = 0 '\000', numSubexp = 0, longest = false, mu = {state = 0, sema = 0}, 
+  machine =  []*regexp.machine}
+(gdb) <b>p *re->prog</b>
+$7 = {Inst =  []regexp/syntax.Inst = {{Op = 5 '\005', Out = 0, Arg = 0, Rune =  []int}, {Op = 
+    6 '\006', Out = 2, Arg = 0, Rune =  []int}, {Op = 4 '\004', Out = 0, Arg = 0, Rune =  []int}}, 
+  Start = 1, NumCap = 2}
+</pre>
+
+
+<p>
+We can step into the <code>String</code>function call with <code>"s"</code>:
+</p>
+
+<pre>
+(gdb) <b>s</b>
+regexp.(*Regexp).String (re=0xf84068d070, noname=void) at /home/user/go/src/regexp/regexp.go:97
+97      func (re *Regexp) String() string {
+</pre>
+
+<p>
+Get a stack trace to see where we are:
+</p>
+
+<pre>
+(gdb) <b>bt</b>
+#0  regexp.(*Regexp).String (re=0xf84068d070, noname=void)
+    at /home/user/go/src/regexp/regexp.go:97
+#1  0x0000000000425615 in regexp.TestFind (t=0xf840688b60)
+    at /home/user/go/src/regexp/find_test.go:151
+#2  0x0000000000430233 in testing.tRunner (t=0xf840688b60, test=0x5747b8)
+    at /home/user/go/src/testing/testing.go:156
+#3  0x000000000040ea6f in runtime.initdone () at /home/user/go/src/runtime/proc.c:243
+....
+</pre>
+
+<p>
+Look at the source code:
+</p>
+
+<pre>
+(gdb) <b>l</b>
+92              mu      sync.Mutex
+93              machine []*machine
+94      }
+95
+96      // String returns the source text used to compile the regular expression.
+97      func (re *Regexp) String() string {
+98              return re.expr
+99      }
+100
+101     // Compile parses a regular expression and returns, if successful,
+</pre>
+
+<h3 id="Pretty_Printing">Pretty Printing</h3>
+
+<p>
+GDB's pretty printing mechanism is triggered by regexp matches on type names.  An example for slices:
+</p>
+
+<pre>
+(gdb) <b>p utf</b>
+$22 =  []uint8 = {0 '\000', 0 '\000', 0 '\000', 0 '\000'}
+</pre>
+
+<p>
+Since slices, arrays and strings are not C pointers, GDB can't interpret the subscripting operation for you, but
+you can look inside the runtime representation to do that (tab completion helps here):
+</p>
+<pre>
+
+(gdb) <b>p slc</b>
+$11 =  []int = {0, 0}
+(gdb) <b>p slc-&gt;</b><i>&lt;TAB&gt;</i>
+array  slc    len    
+(gdb) <b>p slc->array</b>
+$12 = (int *) 0xf84057af00
+(gdb) <b>p slc->array[1]</b>
+$13 = 0</pre>
+
+
+
+<p>
+The extension functions $len and $cap work on strings, arrays and slices:
+</p>
+
+<pre>
+(gdb) <b>p $len(utf)</b>
+$23 = 4
+(gdb) <b>p $cap(utf)</b>
+$24 = 4
+</pre>
+
+<p>
+Channels and maps are 'reference' types, which gdb shows as pointers to C++-like types <code>hash&lt;int,string&gt;*</code>.  Dereferencing will trigger prettyprinting
+</p>
+
+<p>
+Interfaces are represented in the runtime as a pointer to a type descriptor and a pointer to a value.  The Go GDB runtime extension decodes this and automatically triggers pretty printing for the runtime type.  The extension function <code>$dtype</code> decodes the dynamic type for you (examples are taken from a breakpoint at <code>regexp.go</code> line 293.)
+</p>
+
+<pre>
+(gdb) <b>p i</b>
+$4 = {str = "cbb"}
+(gdb) <b>whatis i</b>
+type = regexp.input
+(gdb) <b>p $dtype(i)</b>
+$26 = (struct regexp.inputBytes *) 0xf8400b4930
+(gdb) <b>iface i</b>
+regexp.input: struct regexp.inputBytes *
+</pre>
diff --git a/_content/doc/diagnostics.html b/_content/doc/diagnostics.html
new file mode 100644
index 0000000..438cdce
--- /dev/null
+++ b/_content/doc/diagnostics.html
@@ -0,0 +1,472 @@
+<!--{
+	"Title": "Diagnostics",
+	"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.
+-->
+
+<h2 id="introduction">Introduction</h2>
+
+<p>
+The Go ecosystem provides a large suite of APIs and tools to
+diagnose logic and performance problems in Go programs. This page
+summarizes the available tools and helps Go users pick the right one
+for their specific problem.
+</p>
+
+<p>
+Diagnostics solutions can be categorized into the following groups:
+</p>
+
+<ul>
+<li><strong>Profiling</strong>: Profiling tools analyze the complexity and costs of a
+Go program such as its memory usage and frequently called
+functions to identify the expensive sections of a Go program.</li>
+<li><strong>Tracing</strong>: Tracing is a way to instrument code to analyze latency
+throughout the lifecycle of a call or user request. Traces provide an
+overview of how much latency each component contributes to the overall
+latency in a system. Traces can span multiple Go processes.</li>
+<li><strong>Debugging</strong>: Debugging allows us to pause a Go program and examine
+its execution. Program state and flow can be verified with debugging.</li>
+<li><strong>Runtime statistics and events</strong>: Collection and analysis of runtime stats and events
+provides a high-level overview of the health of Go programs. Spikes/dips of metrics
+helps us to identify changes in throughput, utilization, and performance.</li>
+</ul>
+
+<p>
+Note: Some diagnostics tools may interfere with each other. For example, precise
+memory profiling skews CPU profiles and goroutine blocking profiling affects scheduler
+trace. Use tools in isolation to get more precise info.
+</p>
+
+<h2 id="profiling">Profiling</h2>
+
+<p>
+Profiling is useful for identifying expensive or frequently called sections
+of code. The Go runtime provides <a href="https://golang.org/pkg/runtime/pprof/">
+profiling data</a> in the format expected by the
+<a href="https://github.com/google/pprof/blob/master/doc/README.md">pprof visualization tool</a>.
+The profiling data can be collected during testing
+via <code>go</code> <code>test</code> or endpoints made available from the <a href="/pkg/net/http/pprof/">
+net/http/pprof</a> package. Users need to collect the profiling data and use pprof tools to filter
+and visualize the top code paths.
+</p>
+
+<p>Predefined profiles provided by the <a href="/pkg/runtime/pprof">runtime/pprof</a> package:</p>
+
+<ul>
+<li>
+<strong>cpu</strong>: CPU profile determines where a program spends
+its time while actively consuming CPU cycles (as opposed to while sleeping or waiting for I/O).
+</li>
+<li>
+<strong>heap</strong>: Heap profile reports memory allocation samples;
+used to monitor current and historical memory usage, and to check for memory leaks.
+</li>
+<li>
+<strong>threadcreate</strong>: Thread creation profile reports the sections
+of the program that lead the creation of new OS threads.
+</li>
+<li>
+<strong>goroutine</strong>: Goroutine profile reports the stack traces of all current goroutines.
+</li>
+<li>
+<strong>block</strong>: Block profile shows where goroutines block waiting on synchronization
+primitives (including timer channels). Block profile is not enabled by default;
+use <code>runtime.SetBlockProfileRate</code> to enable it.
+</li>
+<li>
+<strong>mutex</strong>: Mutex profile reports the lock contentions. When you think your
+CPU is not fully utilized due to a mutex contention, use this profile. Mutex profile
+is not enabled by default, see <code>runtime.SetMutexProfileFraction</code> to enable it.
+</li>
+</ul>
+
+
+<p><strong>What other profilers can I use to profile Go programs?</strong></p>
+
+<p>
+On Linux, <a href="https://perf.wiki.kernel.org/index.php/Tutorial">perf tools</a>
+can be used for profiling Go programs. Perf can profile
+and unwind cgo/SWIG code and kernel, so it can be useful to get insights into
+native/kernel performance bottlenecks. On macOS,
+<a href="https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/">Instruments</a>
+suite can be used profile Go programs.
+</p>
+
+<p><strong>Can I profile my production services?</strong></p>
+
+<p>Yes. It is safe to profile programs in production, but enabling
+some profiles (e.g. the CPU profile) adds cost. You should expect to
+see performance downgrade. The performance penalty can be estimated
+by measuring the overhead of the profiler before turning it on in
+production.
+</p>
+
+<p>
+You may want to periodically profile your production services.
+Especially in a system with many replicas of a single process, selecting
+a random replica periodically is a safe option.
+Select a production process, profile it for
+X seconds for every Y seconds and save the results for visualization and
+analysis; then repeat periodically. Results may be manually and/or automatically
+reviewed to find problems.
+Collection of profiles can interfere with each other,
+so it is recommended to collect only a single profile at a time.
+</p>
+
+<p>
+<strong>What are the best ways to visualize the profiling data?</strong>
+</p>
+
+<p>
+The Go tools provide text, graph, and <a href="http://valgrind.org/docs/manual/cl-manual.html">callgrind</a>
+visualization of the profile data using
+<code><a href="https://github.com/google/pprof/blob/master/doc/README.md">go tool pprof</a></code>.
+Read <a href="https://blog.golang.org/profiling-go-programs">Profiling Go programs</a>
+to see them in action.
+</p>
+
+<p>
+<img width="800" src="https://storage.googleapis.com/golangorg-assets/pprof-text.png">
+<br>
+<small>Listing of the most expensive calls as text.</small>
+</p>
+
+<p>
+<img width="800" src="https://storage.googleapis.com/golangorg-assets/pprof-dot.png">
+<br>
+<small>Visualization of the most expensive calls as a graph.</small>
+</p>
+
+<p>Weblist view displays the expensive parts of the source line by line in
+an HTML page. In the following example, 530ms is spent in the
+<code>runtime.concatstrings</code> and cost of each line is presented
+in the listing.</p>
+
+<p>
+<img width="800" src="https://storage.googleapis.com/golangorg-assets/pprof-weblist.png">
+<br>
+<small>Visualization of the most expensive calls as weblist.</small>
+</p>
+
+<p>
+Another way to visualize profile data is a <a href="http://www.brendangregg.com/flamegraphs.html">flame graph</a>.
+Flame graphs allow you to move in a specific ancestry path, so you can zoom
+in/out of specific sections of code.
+The <a href="https://github.com/google/pprof">upstream pprof</a>
+has support for flame graphs.
+</p>
+
+<p>
+<img width="800" src="https://storage.googleapis.com/golangorg-assets/flame.png">
+<br>
+<small>Flame graphs offers visualization to spot the most expensive code-paths.</small>
+</p>
+
+<p><strong>Am I restricted to the built-in profiles?</strong></p>
+
+<p>
+Additionally to what is provided by the runtime, Go users can create
+their custom profiles via <a href="/pkg/runtime/pprof/#Profile">pprof.Profile</a>
+and use the existing tools to examine them.
+</p>
+
+<p><strong>Can I serve the profiler handlers (/debug/pprof/...) on a different path and port?</strong></p>
+
+<p>
+Yes. The <code>net/http/pprof</code> package registers its handlers to the default
+mux by default, but you can also register them yourself by using the handlers
+exported from the package.
+</p>
+
+<p>
+For example, the following example will serve the pprof.Profile
+handler on :7777 at /custom_debug_path/profile:
+</p>
+
+<p>
+<pre>
+package main
+
+import (
+	"log"
+	"net/http"
+	"net/http/pprof"
+)
+
+func main() {
+	mux := http.NewServeMux()
+	mux.HandleFunc("/custom_debug_path/profile", pprof.Profile)
+	log.Fatal(http.ListenAndServe(":7777", mux))
+}
+</pre>
+</p>
+
+<h2 id="tracing">Tracing</h2>
+
+<p>
+Tracing is a way to instrument code to analyze latency throughout the
+lifecycle of a chain of calls. Go provides
+<a href="https://godoc.org/golang.org/x/net/trace">golang.org/x/net/trace</a>
+package as a minimal tracing backend per Go node and provides a minimal
+instrumentation library with a simple dashboard. Go also provides
+an execution tracer to trace the runtime events within an interval.
+</p>
+
+<p>Tracing enables us to:</p>
+
+<ul>
+<li>Instrument and analyze application latency in a Go process.</li>
+<li>Measure the cost of specific calls in a long chain of calls.</li>
+<li>Figure out the utilization and performance improvements.
+Bottlenecks are not always obvious without tracing data.</li>
+</ul>
+
+<p>
+In monolithic systems, it's relatively easy to collect diagnostic data
+from the building blocks of a program. All modules live within one
+process and share common resources to report logs, errors, and other
+diagnostic information. Once your system grows beyond a single process and
+starts to become distributed, it becomes harder to follow a call starting
+from the front-end web server to all of its back-ends until a response is
+returned back to the user. This is where distributed tracing plays a big
+role to instrument and analyze your production systems.
+</p>
+
+<p>
+Distributed tracing is a way to instrument code to analyze latency throughout
+the lifecycle of a user request. When a system is distributed and when
+conventional profiling and debugging tools don’t scale, you might want
+to use distributed tracing tools to analyze the performance of your user
+requests and RPCs.
+</p>
+
+<p>Distributed tracing enables us to:</p>
+
+<ul>
+<li>Instrument and profile application latency in a large system.</li>
+<li>Track all RPCs within the lifecycle of a user request and see integration issues
+that are only visible in production.</li>
+<li>Figure out performance improvements that can be applied to our systems.
+Many bottlenecks are not obvious before the collection of tracing data.</li>
+</ul>
+
+<p>The Go ecosystem provides various distributed tracing libraries per tracing system
+and backend-agnostic ones.</p>
+
+
+<p><strong>Is there a way to automatically intercept each function call and create traces?</strong></p>
+
+<p>
+Go doesn’t provide a way to automatically intercept every function call and create
+trace spans. You need to manually instrument your code to create, end, and annotate spans.
+</p>
+
+<p><strong>How should I propagate trace headers in Go libraries?</strong></p>
+
+<p>
+You can propagate trace identifiers and tags in the
+<a href="/pkg/context#Context"><code>context.Context</code></a>.
+There is no canonical trace key or common representation of trace headers
+in the industry yet. Each tracing provider is responsible for providing propagation
+utilities in their Go libraries.
+</p>
+
+<p>
+<strong>What other low-level events from the standard library or
+runtime can be included in a trace?</strong>
+</p>
+
+<p>
+The standard library and runtime are trying to expose several additional APIs
+to notify on low level internal events. For example,
+<a href="/pkg/net/http/httptrace#ClientTrace"><code>httptrace.ClientTrace</code></a>
+provides APIs to follow low-level events in the life cycle of an outgoing request.
+There is an ongoing effort to retrieve low-level runtime events from
+the runtime execution tracer and allow users to define and record their user events.
+</p>
+
+<h2 id="debugging">Debugging</h2>
+
+<p>
+Debugging is the process of identifying why a program misbehaves.
+Debuggers allow us to understand a program’s execution flow and current state.
+There are several styles of debugging; this section will only focus on attaching
+a debugger to a program and core dump debugging.
+</p>
+
+<p>Go users mostly use the following debuggers:</p>
+
+<ul>
+<li>
+<a href="https://github.com/derekparker/delve">Delve</a>:
+Delve is a debugger for the Go programming language. It has
+support for Go’s runtime concepts and built-in types. Delve is
+trying to be a fully featured reliable debugger for Go programs.
+</li>
+<li>
+<a href="https://golang.org/doc/gdb">GDB</a>:
+Go provides GDB support via the standard Go compiler and Gccgo.
+The stack management, threading, and runtime contain aspects that differ
+enough from the execution model GDB expects that they can confuse the
+debugger, even when the program is compiled with gccgo. Even though
+GDB can be used to debug Go programs, it is not ideal and may
+create confusion.
+</li>
+</ul>
+
+<p><strong>How well do debuggers work with Go programs?</strong></p>
+
+<p>
+The <code>gc</code> compiler performs optimizations such as
+function inlining and variable registerization. These optimizations
+sometimes make debugging with debuggers harder. There is an ongoing
+effort to improve the quality of the DWARF information generated for
+optimized binaries. Until those improvements are available, we recommend
+disabling optimizations when building the code being debugged. The following
+command builds a package with no compiler optimizations:
+
+<p>
+<pre>
+$ go build -gcflags=all="-N -l"
+</pre>
+</p>
+
+As part of the improvement effort, Go 1.10 introduced a new compiler
+flag <code>-dwarflocationlists</code>. The flag causes the compiler to
+add location lists that helps debuggers work with optimized binaries.
+The following command builds a package with optimizations but with
+the DWARF location lists:
+
+<p>
+<pre>
+$ go build -gcflags="-dwarflocationlists=true"
+</pre>
+</p>
+
+<p><strong>What’s the recommended debugger user interface?</strong></p>
+
+<p>
+Even though both delve and gdb provides CLIs, most editor integrations
+and IDEs provides debugging-specific user interfaces.
+</p>
+
+<p><strong>Is it possible to do postmortem debugging with Go programs?</strong></p>
+
+<p>
+A core dump file is a file that contains the memory dump of a running
+process and its process status. It is primarily used for post-mortem
+debugging of a program and to understand its state
+while it is still running. These two cases make debugging of core
+dumps a good diagnostic aid to postmortem and analyze production
+services. It is possible to obtain core files from Go programs and
+use delve or gdb to debug, see the
+<a href="https://golang.org/wiki/CoreDumpDebugging">core dump debugging</a>
+page for a step-by-step guide.
+</p>
+
+<h2 id="runtime">Runtime statistics and events</h2>
+
+<p>
+The runtime provides stats and reporting of internal events for
+users to diagnose performance and utilization problems at the
+runtime level.
+</p>
+
+<p>
+Users can monitor these stats to better understand the overall
+health and performance of Go programs.
+Some frequently monitored stats and states:
+</p>
+
+<ul>
+<li><code><a href="/pkg/runtime/#ReadMemStats">runtime.ReadMemStats</a></code>
+reports the metrics related to heap
+allocation and garbage collection. Memory stats are useful for
+monitoring how much memory resources a process is consuming,
+whether the process can utilize memory well, and to catch
+memory leaks.</li>
+<li><code><a href="/pkg/runtime/debug/#ReadGCStats">debug.ReadGCStats</a></code>
+reads statistics about garbage collection.
+It is useful to see how much of the resources are spent on GC pauses.
+It also reports a timeline of garbage collector pauses and pause time percentiles.</li>
+<li><code><a href="/pkg/runtime/debug/#Stack">debug.Stack</a></code>
+returns the current stack trace. Stack trace
+is useful to see how many goroutines are currently running,
+what they are doing, and whether they are blocked or not.</li>
+<li><code><a href="/pkg/runtime/debug/#WriteHeapDump">debug.WriteHeapDump</a></code>
+suspends the execution of all goroutines
+and allows you to dump the heap to a file. A heap dump is a
+snapshot of a Go process' memory at a given time. It contains all
+allocated objects as well as goroutines, finalizers, and more.</li>
+<li><code><a href="/pkg/runtime#NumGoroutine">runtime.NumGoroutine</a></code>
+returns the number of current goroutines.
+The value can be monitored to see whether enough goroutines are
+utilized, or to detect goroutine leaks.</li>
+</ul>
+
+<h3 id="execution-tracer">Execution tracer</h3>
+
+<p>Go comes with a runtime execution tracer to capture a wide range
+of runtime events. Scheduling, syscall, garbage collections,
+heap size, and other events are collected by runtime and available
+for visualization by the go tool trace. Execution tracer is a tool
+to detect latency and utilization problems. You can examine how well
+the CPU is utilized, and when networking or syscalls are a cause of
+preemption for the goroutines.</p>
+
+<p>Tracer is useful to:</p>
+<ul>
+<li>Understand how your goroutines execute.</li>
+<li>Understand some of the core runtime events such as GC runs.</li>
+<li>Identify poorly parallelized execution.</li>
+</ul>
+
+<p>However, it is not great for identifying hot spots such as
+analyzing the cause of excessive memory or CPU usage.
+Use profiling tools instead first to address them.</p>
+
+<p>
+<img width="800" src="https://storage.googleapis.com/golangorg-assets/tracer-lock.png">
+</p>
+
+<p>Above, the go tool trace visualization shows the execution started
+fine, and then it became serialized. It suggests that there might
+be lock contention for a shared resource that creates a bottleneck.</p>
+
+<p>See <a href="https://golang.org/cmd/trace/"><code>go</code> <code>tool</code> <code>trace</code></a>
+to collect and analyze runtime traces.
+</p>
+
+<h3 id="godebug">GODEBUG</h3>
+
+<p>Runtime also emits events and information if
+<a href="https://golang.org/pkg/runtime/#hdr-Environment_Variables">GODEBUG</a>
+environmental variable is set accordingly.</p>
+
+<ul>
+<li>GODEBUG=gctrace=1 prints garbage collector events at
+each collection, summarizing the amount of memory collected
+and the length of the pause.</li>
+<li>GODEBUG=inittrace=1 prints a summary of execution time and memory allocation
+information for completed package initialization work.</li>
+<li>GODEBUG=schedtrace=X prints scheduling events every X milliseconds.</li>
+</ul>
+
+<p>The GODEBUG environmental variable can be used to disable use of
+instruction set extensions in the standard library and runtime.</p>
+
+<ul>
+<li>GODEBUG=cpu.all=off disables the use of all optional
+instruction set extensions.</li>
+<li>GODEBUG=cpu.<em>extension</em>=off disables use of instructions from the
+specified instruction set extension.<br>
+<em>extension</em> is the lower case name for the instruction set extension
+such as <em>sse41</em> or <em>avx</em>.</li>
+</ul>
diff --git a/_content/doc/editors.html b/_content/doc/editors.html
new file mode 100644
index 0000000..e0d0c53
--- /dev/null
+++ b/_content/doc/editors.html
@@ -0,0 +1,33 @@
+<!--{
+	"Title": "Editor plugins and IDEs",
+	"Template": true
+}-->
+
+<h2 id="introduction">Introduction</h2>
+
+<p>
+  This document lists commonly used editor plugins and IDEs from the Go ecosystem
+  that make Go development more productive and seamless.
+  A comprehensive list of editor support and IDEs for Go development is available at
+  <a href="https://golang.org/wiki/IDEsAndTextEditorPlugins">the wiki</a>.
+</p>
+
+<h2 id="options">Options</h2>
+<p>
+The Go ecosystem provides a variety of editor plugins and IDEs to enhance your day-to-day
+editing, navigation, testing, and debugging experience.
+</p>
+
+<ul>
+<li><a href="https://marketplace.visualstudio.com/items?itemName=golang.go">Visual Studio Code</a>:
+Go extension provides support for the Go programming language</li>
+<li><a href="https://www.jetbrains.com/go">GoLand</a>: GoLand is distributed either as a standalone IDE
+or as a plugin for IntelliJ IDEA Ultimate</li>
+<li><a href="https://github.com/fatih/vim-go">vim</a>: vim-go plugin provides Go programming language support</li>
+
+<p>
+Note that these are only a few top solutions; a more comprehensive
+community-maintained list of
+<a href="https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins">IDEs and text editor plugins</a>
+is available at the Wiki.
+</p>
diff --git a/_content/doc/effective_go.html b/_content/doc/effective_go.html
new file mode 100644
index 0000000..7620402
--- /dev/null
+++ b/_content/doc/effective_go.html
@@ -0,0 +1,3673 @@
+<!--{
+	"Title": "Effective Go",
+	"Template": true
+}-->
+
+<h2 id="introduction">Introduction</h2>
+
+<p>
+Go is a new language.  Although it borrows ideas from
+existing languages,
+it has unusual properties that make effective Go programs
+different in character from programs written in its relatives.
+A straightforward translation of a C++ or Java program into Go
+is unlikely to produce a satisfactory result&mdash;Java programs
+are written in Java, not Go.
+On the other hand, thinking about the problem from a Go
+perspective could produce a successful but quite different
+program.
+In other words,
+to write Go well, it's important to understand its properties
+and idioms.
+It's also important to know the established conventions for
+programming in Go, such as naming, formatting, program
+construction, and so on, so that programs you write
+will be easy for other Go programmers to understand.
+</p>
+
+<p>
+This document gives tips for writing clear, idiomatic Go code.
+It augments the <a href="/ref/spec">language specification</a>,
+the <a href="//tour.golang.org/">Tour of Go</a>,
+and <a href="/doc/code.html">How to Write Go Code</a>,
+all of which you
+should read first.
+</p>
+
+<h3 id="examples">Examples</h3>
+
+<p>
+The <a href="/src/">Go package sources</a>
+are intended to serve not
+only as the core library but also as examples of how to
+use the language.
+Moreover, many of the packages contain working, self-contained
+executable examples you can run directly from the
+<a href="//golang.org">golang.org</a> web site, such as
+<a href="//golang.org/pkg/strings/#example_Map">this one</a> (if
+necessary, click on the word "Example" to open it up).
+If you have a question about how to approach a problem or how something
+might be implemented, the documentation, code and examples in the
+library can provide answers, ideas and
+background.
+</p>
+
+
+<h2 id="formatting">Formatting</h2>
+
+<p>
+Formatting issues are the most contentious
+but the least consequential.
+People can adapt to different formatting styles
+but it's better if they don't have to, and
+less time is devoted to the topic
+if everyone adheres to the same style.
+The problem is how to approach this Utopia without a long
+prescriptive style guide.
+</p>
+
+<p>
+With Go we take an unusual
+approach and let the machine
+take care of most formatting issues.
+The <code>gofmt</code> program
+(also available as <code>go fmt</code>, which
+operates at the package level rather than source file level)
+reads a Go program
+and emits the source in a standard style of indentation
+and vertical alignment, retaining and if necessary
+reformatting comments.
+If you want to know how to handle some new layout
+situation, run <code>gofmt</code>; if the answer doesn't
+seem right, rearrange your program (or file a bug about <code>gofmt</code>),
+don't work around it.
+</p>
+
+<p>
+As an example, there's no need to spend time lining up
+the comments on the fields of a structure.
+<code>Gofmt</code> will do that for you.  Given the
+declaration
+</p>
+
+<pre>
+type T struct {
+    name string // name of the object
+    value int // its value
+}
+</pre>
+
+<p>
+<code>gofmt</code> will line up the columns:
+</p>
+
+<pre>
+type T struct {
+    name    string // name of the object
+    value   int    // its value
+}
+</pre>
+
+<p>
+All Go code in the standard packages has been formatted with <code>gofmt</code>.
+</p>
+
+
+<p>
+Some formatting details remain.  Very briefly:
+</p>
+
+<dl>
+    <dt>Indentation</dt>
+    <dd>We use tabs for indentation and <code>gofmt</code> emits them by default.
+    Use spaces only if you must.
+    </dd>
+    <dt>Line length</dt>
+    <dd>
+    Go has no line length limit.  Don't worry about overflowing a punched card.
+    If a line feels too long, wrap it and indent with an extra tab.
+    </dd>
+    <dt>Parentheses</dt>
+    <dd>
+    Go needs fewer parentheses than C and Java: control structures (<code>if</code>,
+    <code>for</code>, <code>switch</code>) do not have parentheses in
+    their syntax.
+    Also, the operator precedence hierarchy is shorter and clearer, so
+<pre>
+x&lt;&lt;8 + y&lt;&lt;16
+</pre>
+    means what the spacing implies, unlike in the other languages.
+    </dd>
+</dl>
+
+<h2 id="commentary">Commentary</h2>
+
+<p>
+Go provides C-style <code>/* */</code> block comments
+and C++-style <code>//</code> line comments.
+Line comments are the norm;
+block comments appear mostly as package comments, but
+are useful within an expression or to disable large swaths of code.
+</p>
+
+<p>
+The program—and web server—<code>godoc</code> processes
+Go source files to extract documentation about the contents of the
+package.
+Comments that appear before top-level declarations, with no intervening newlines,
+are extracted along with the declaration to serve as explanatory text for the item.
+The nature and style of these comments determines the
+quality of the documentation <code>godoc</code> produces.
+</p>
+
+<p>
+Every package should have a <i>package comment</i>, a block
+comment preceding the package clause.
+For multi-file packages, the package comment only needs to be
+present in one file, and any one will do.
+The package comment should introduce the package and
+provide information relevant to the package as a whole.
+It will appear first on the <code>godoc</code> page and
+should set up the detailed documentation that follows.
+</p>
+
+<pre>
+/*
+Package regexp implements a simple library for regular expressions.
+
+The syntax of the regular expressions accepted is:
+
+    regexp:
+        concatenation { '|' concatenation }
+    concatenation:
+        { closure }
+    closure:
+        term [ '*' | '+' | '?' ]
+    term:
+        '^'
+        '$'
+        '.'
+        character
+        '[' [ '^' ] character-ranges ']'
+        '(' regexp ')'
+*/
+package regexp
+</pre>
+
+<p>
+If the package is simple, the package comment can be brief.
+</p>
+
+<pre>
+// Package path implements utility routines for
+// manipulating slash-separated filename paths.
+</pre>
+
+<p>
+Comments do not need extra formatting such as banners of stars.
+The generated output may not even be presented in a fixed-width font, so don't depend
+on spacing for alignment&mdash;<code>godoc</code>, like <code>gofmt</code>,
+takes care of that.
+The comments are uninterpreted plain text, so HTML and other
+annotations such as <code>_this_</code> will reproduce <i>verbatim</i> and should
+not be used.
+One adjustment <code>godoc</code> does do is to display indented
+text in a fixed-width font, suitable for program snippets.
+The package comment for the
+<a href="/pkg/fmt/"><code>fmt</code> package</a> uses this to good effect.
+</p>
+
+<p>
+Depending on the context, <code>godoc</code> might not even
+reformat comments, so make sure they look good straight up:
+use correct spelling, punctuation, and sentence structure,
+fold long lines, and so on.
+</p>
+
+<p>
+Inside a package, any comment immediately preceding a top-level declaration
+serves as a <i>doc comment</i> for that declaration.
+Every exported (capitalized) name in a program should
+have a doc comment.
+</p>
+
+<p>
+Doc comments work best as complete sentences, which allow
+a wide variety of automated presentations.
+The first sentence should be a one-sentence summary that
+starts with the name being declared.
+</p>
+
+<pre>
+// Compile parses a regular expression and returns, if successful,
+// a Regexp that can be used to match against text.
+func Compile(str string) (*Regexp, error) {
+</pre>
+
+<p>
+If every doc comment begins with the name of the item it describes,
+you can use the <a href="/cmd/go/#hdr-Show_documentation_for_package_or_symbol">doc</a>
+subcommand of the <a href="/cmd/go/">go</a> tool
+and run the output through <code>grep</code>.
+Imagine you couldn't remember the name "Compile" but were looking for
+the parsing function for regular expressions, so you ran
+the command,
+</p>
+
+<pre>
+$ go doc -all regexp | grep -i parse
+</pre>
+
+<p>
+If all the doc comments in the package began, "This function...", <code>grep</code>
+wouldn't help you remember the name. But because the package starts each
+doc comment with the name, you'd see something like this,
+which recalls the word you're looking for.
+</p>
+
+<pre>
+$ go doc -all regexp | grep -i parse
+    Compile parses a regular expression and returns, if successful, a Regexp
+    MustCompile is like Compile but panics if the expression cannot be parsed.
+    parsed. It simplifies safe initialization of global variables holding
+$
+</pre>
+
+<p>
+Go's declaration syntax allows grouping of declarations.
+A single doc comment can introduce a group of related constants or variables.
+Since the whole declaration is presented, such a comment can often be perfunctory.
+</p>
+
+<pre>
+// Error codes returned by failures to parse an expression.
+var (
+    ErrInternal      = errors.New("regexp: internal error")
+    ErrUnmatchedLpar = errors.New("regexp: unmatched '('")
+    ErrUnmatchedRpar = errors.New("regexp: unmatched ')'")
+    ...
+)
+</pre>
+
+<p>
+Grouping can also indicate relationships between items,
+such as the fact that a set of variables is protected by a mutex.
+</p>
+
+<pre>
+var (
+    countLock   sync.Mutex
+    inputCount  uint32
+    outputCount uint32
+    errorCount  uint32
+)
+</pre>
+
+<h2 id="names">Names</h2>
+
+<p>
+Names are as important in Go as in any other language.
+They even have semantic effect:
+the visibility of a name outside a package is determined by whether its
+first character is upper case.
+It's therefore worth spending a little time talking about naming conventions
+in Go programs.
+</p>
+
+
+<h3 id="package-names">Package names</h3>
+
+<p>
+When a package is imported, the package name becomes an accessor for the
+contents.  After
+</p>
+
+<pre>
+import "bytes"
+</pre>
+
+<p>
+the importing package can talk about <code>bytes.Buffer</code>.  It's
+helpful if everyone using the package can use the same name to refer to
+its contents, which implies that the package name should be good:
+short, concise, evocative.  By convention, packages are given
+lower case, single-word names; there should be no need for underscores
+or mixedCaps.
+Err on the side of brevity, since everyone using your
+package will be typing that name.
+And don't worry about collisions <i>a priori</i>.
+The package name is only the default name for imports; it need not be unique
+across all source code, and in the rare case of a collision the
+importing package can choose a different name to use locally.
+In any case, confusion is rare because the file name in the import
+determines just which package is being used.
+</p>
+
+<p>
+Another convention is that the package name is the base name of
+its source directory;
+the package in <code>src/encoding/base64</code>
+is imported as <code>"encoding/base64"</code> but has name <code>base64</code>,
+not <code>encoding_base64</code> and not <code>encodingBase64</code>.
+</p>
+
+<p>
+The importer of a package will use the name to refer to its contents,
+so exported names in the package can use that fact
+to avoid stutter.
+(Don't use the <code>import .</code> notation, which can simplify
+tests that must run outside the package they are testing, but should otherwise be avoided.)
+For instance, the buffered reader type in the <code>bufio</code> package is called <code>Reader</code>,
+not <code>BufReader</code>, because users see it as <code>bufio.Reader</code>,
+which is a clear, concise name.
+Moreover,
+because imported entities are always addressed with their package name, <code>bufio.Reader</code>
+does not conflict with <code>io.Reader</code>.
+Similarly, the function to make new instances of <code>ring.Ring</code>&mdash;which
+is the definition of a <em>constructor</em> in Go&mdash;would
+normally be called <code>NewRing</code>, but since
+<code>Ring</code> is the only type exported by the package, and since the
+package is called <code>ring</code>, it's called just <code>New</code>,
+which clients of the package see as <code>ring.New</code>.
+Use the package structure to help you choose good names.
+</p>
+
+<p>
+Another short example is <code>once.Do</code>;
+<code>once.Do(setup)</code> reads well and would not be improved by
+writing <code>once.DoOrWaitUntilDone(setup)</code>.
+Long names don't automatically make things more readable.
+A helpful doc comment can often be more valuable than an extra long name.
+</p>
+
+<h3 id="Getters">Getters</h3>
+
+<p>
+Go doesn't provide automatic support for getters and setters.
+There's nothing wrong with providing getters and setters yourself,
+and it's often appropriate to do so, but it's neither idiomatic nor necessary
+to put <code>Get</code> into the getter's name.  If you have a field called
+<code>owner</code> (lower case, unexported), the getter method should be
+called <code>Owner</code> (upper case, exported), not <code>GetOwner</code>.
+The use of upper-case names for export provides the hook to discriminate
+the field from the method.
+A setter function, if needed, will likely be called <code>SetOwner</code>.
+Both names read well in practice:
+</p>
+<pre>
+owner := obj.Owner()
+if owner != user {
+    obj.SetOwner(user)
+}
+</pre>
+
+<h3 id="interface-names">Interface names</h3>
+
+<p>
+By convention, one-method interfaces are named by
+the method name plus an -er suffix or similar modification
+to construct an agent noun: <code>Reader</code>,
+<code>Writer</code>, <code>Formatter</code>,
+<code>CloseNotifier</code> etc.
+</p>
+
+<p>
+There are a number of such names and it's productive to honor them and the function
+names they capture.
+<code>Read</code>, <code>Write</code>, <code>Close</code>, <code>Flush</code>,
+<code>String</code> and so on have
+canonical signatures and meanings.  To avoid confusion,
+don't give your method one of those names unless it
+has the same signature and meaning.
+Conversely, if your type implements a method with the
+same meaning as a method on a well-known type,
+give it the same name and signature;
+call your string-converter method <code>String</code> not <code>ToString</code>.
+</p>
+
+<h3 id="mixed-caps">MixedCaps</h3>
+
+<p>
+Finally, the convention in Go is to use <code>MixedCaps</code>
+or <code>mixedCaps</code> rather than underscores to write
+multiword names.
+</p>
+
+<h2 id="semicolons">Semicolons</h2>
+
+<p>
+Like C, Go's formal grammar uses semicolons to terminate statements,
+but unlike in C, those semicolons do not appear in the source.
+Instead the lexer uses a simple rule to insert semicolons automatically
+as it scans, so the input text is mostly free of them.
+</p>
+
+<p>
+The rule is this. If the last token before a newline is an identifier
+(which includes words like <code>int</code> and <code>float64</code>),
+a basic literal such as a number or string constant, or one of the
+tokens
+</p>
+<pre>
+break continue fallthrough return ++ -- ) }
+</pre>
+<p>
+the lexer always inserts a semicolon after the token.
+This could be summarized as, &ldquo;if the newline comes
+after a token that could end a statement, insert a semicolon&rdquo;.
+</p>
+
+<p>
+A semicolon can also be omitted immediately before a closing brace,
+so a statement such as
+</p>
+<pre>
+    go func() { for { dst &lt;- &lt;-src } }()
+</pre>
+<p>
+needs no semicolons.
+Idiomatic Go programs have semicolons only in places such as
+<code>for</code> loop clauses, to separate the initializer, condition, and
+continuation elements.  They are also necessary to separate multiple
+statements on a line, should you write code that way.
+</p>
+
+<p>
+One consequence of the semicolon insertion rules
+is that you cannot put the opening brace of a
+control structure (<code>if</code>, <code>for</code>, <code>switch</code>,
+or <code>select</code>) on the next line.  If you do, a semicolon
+will be inserted before the brace, which could cause unwanted
+effects.  Write them like this
+</p>
+
+<pre>
+if i &lt; f() {
+    g()
+}
+</pre>
+<p>
+not like this
+</p>
+<pre>
+if i &lt; f()  // wrong!
+{           // wrong!
+    g()
+}
+</pre>
+
+
+<h2 id="control-structures">Control structures</h2>
+
+<p>
+The control structures of Go are related to those of C but differ
+in important ways.
+There is no <code>do</code> or <code>while</code> loop, only a
+slightly generalized
+<code>for</code>;
+<code>switch</code> is more flexible;
+<code>if</code> and <code>switch</code> accept an optional
+initialization statement like that of <code>for</code>;
+<code>break</code> and <code>continue</code> statements
+take an optional label to identify what to break or continue;
+and there are new control structures including a type switch and a
+multiway communications multiplexer, <code>select</code>.
+The syntax is also slightly different:
+there are no parentheses
+and the bodies must always be brace-delimited.
+</p>
+
+<h3 id="if">If</h3>
+
+<p>
+In Go a simple <code>if</code> looks like this:
+</p>
+<pre>
+if x &gt; 0 {
+    return y
+}
+</pre>
+
+<p>
+Mandatory braces encourage writing simple <code>if</code> statements
+on multiple lines.  It's good style to do so anyway,
+especially when the body contains a control statement such as a
+<code>return</code> or <code>break</code>.
+</p>
+
+<p>
+Since <code>if</code> and <code>switch</code> accept an initialization
+statement, it's common to see one used to set up a local variable.
+</p>
+
+<pre>
+if err := file.Chmod(0664); err != nil {
+    log.Print(err)
+    return err
+}
+</pre>
+
+<p id="else">
+In the Go libraries, you'll find that
+when an <code>if</code> statement doesn't flow into the next statement—that is,
+the body ends in <code>break</code>, <code>continue</code>,
+<code>goto</code>, or <code>return</code>—the unnecessary
+<code>else</code> is omitted.
+</p>
+
+<pre>
+f, err := os.Open(name)
+if err != nil {
+    return err
+}
+codeUsing(f)
+</pre>
+
+<p>
+This is an example of a common situation where code must guard against a
+sequence of error conditions.  The code reads well if the
+successful flow of control runs down the page, eliminating error cases
+as they arise.  Since error cases tend to end in <code>return</code>
+statements, the resulting code needs no <code>else</code> statements.
+</p>
+
+<pre>
+f, err := os.Open(name)
+if err != nil {
+    return err
+}
+d, err := f.Stat()
+if err != nil {
+    f.Close()
+    return err
+}
+codeUsing(f, d)
+</pre>
+
+
+<h3 id="redeclaration">Redeclaration and reassignment</h3>
+
+<p>
+An aside: The last example in the previous section demonstrates a detail of how the
+<code>:=</code> short declaration form works.
+The declaration that calls <code>os.Open</code> reads,
+</p>
+
+<pre>
+f, err := os.Open(name)
+</pre>
+
+<p>
+This statement declares two variables, <code>f</code> and <code>err</code>.
+A few lines later, the call to <code>f.Stat</code> reads,
+</p>
+
+<pre>
+d, err := f.Stat()
+</pre>
+
+<p>
+which looks as if it declares <code>d</code> and <code>err</code>.
+Notice, though, that <code>err</code> appears in both statements.
+This duplication is legal: <code>err</code> is declared by the first statement,
+but only <em>re-assigned</em> in the second.
+This means that the call to <code>f.Stat</code> uses the existing
+<code>err</code> variable declared above, and just gives it a new value.
+</p>
+
+<p>
+In a <code>:=</code> declaration a variable <code>v</code> may appear even
+if it has already been declared, provided:
+</p>
+
+<ul>
+<li>this declaration is in the same scope as the existing declaration of <code>v</code>
+(if <code>v</code> is already declared in an outer scope, the declaration will create a new variable §),</li>
+<li>the corresponding value in the initialization is assignable to <code>v</code>, and</li>
+<li>there is at least one other variable that is created by the declaration.</li>
+</ul>
+
+<p>
+This unusual property is pure pragmatism,
+making it easy to use a single <code>err</code> value, for example,
+in a long <code>if-else</code> chain.
+You'll see it used often.
+</p>
+
+<p>
+§ It's worth noting here that in Go the scope of function parameters and return values
+is the same as the function body, even though they appear lexically outside the braces
+that enclose the body.
+</p>
+
+<h3 id="for">For</h3>
+
+<p>
+The Go <code>for</code> loop is similar to&mdash;but not the same as&mdash;C's.
+It unifies <code>for</code>
+and <code>while</code> and there is no <code>do-while</code>.
+There are three forms, only one of which has semicolons.
+</p>
+<pre>
+// Like a C for
+for init; condition; post { }
+
+// Like a C while
+for condition { }
+
+// Like a C for(;;)
+for { }
+</pre>
+
+<p>
+Short declarations make it easy to declare the index variable right in the loop.
+</p>
+<pre>
+sum := 0
+for i := 0; i &lt; 10; i++ {
+    sum += i
+}
+</pre>
+
+<p>
+If you're looping over an array, slice, string, or map,
+or reading from a channel, a <code>range</code> clause can
+manage the loop.
+</p>
+<pre>
+for key, value := range oldMap {
+    newMap[key] = value
+}
+</pre>
+
+<p>
+If you only need the first item in the range (the key or index), drop the second:
+</p>
+<pre>
+for key := range m {
+    if key.expired() {
+        delete(m, key)
+    }
+}
+</pre>
+
+<p>
+If you only need the second item in the range (the value), use the <em>blank identifier</em>, an underscore, to discard the first:
+</p>
+<pre>
+sum := 0
+for _, value := range array {
+    sum += value
+}
+</pre>
+
+<p>
+The blank identifier has many uses, as described in <a href="#blank">a later section</a>.
+</p>
+
+<p>
+For strings, the <code>range</code> does more work for you, breaking out individual
+Unicode code points by parsing the UTF-8.
+Erroneous encodings consume one byte and produce the
+replacement rune U+FFFD.
+(The name (with associated builtin type) <code>rune</code> is Go terminology for a
+single Unicode code point.
+See <a href="/ref/spec#Rune_literals">the language specification</a>
+for details.)
+The loop
+</p>
+<pre>
+for pos, char := range "日本\x80語" { // \x80 is an illegal UTF-8 encoding
+    fmt.Printf("character %#U starts at byte position %d\n", char, pos)
+}
+</pre>
+<p>
+prints
+</p>
+<pre>
+character U+65E5 '日' starts at byte position 0
+character U+672C '本' starts at byte position 3
+character U+FFFD '�' starts at byte position 6
+character U+8A9E '語' starts at byte position 7
+</pre>
+
+<p>
+Finally, Go has no comma operator and <code>++</code> and <code>--</code>
+are statements not expressions.
+Thus if you want to run multiple variables in a <code>for</code>
+you should use parallel assignment (although that precludes <code>++</code> and <code>--</code>).
+</p>
+<pre>
+// Reverse a
+for i, j := 0, len(a)-1; i &lt; j; i, j = i+1, j-1 {
+    a[i], a[j] = a[j], a[i]
+}
+</pre>
+
+<h3 id="switch">Switch</h3>
+
+<p>
+Go's <code>switch</code> is more general than C's.
+The expressions need not be constants or even integers,
+the cases are evaluated top to bottom until a match is found,
+and if the <code>switch</code> has no expression it switches on
+<code>true</code>.
+It's therefore possible&mdash;and idiomatic&mdash;to write an
+<code>if</code>-<code>else</code>-<code>if</code>-<code>else</code>
+chain as a <code>switch</code>.
+</p>
+
+<pre>
+func unhex(c byte) byte {
+    switch {
+    case '0' &lt;= c &amp;&amp; c &lt;= '9':
+        return c - '0'
+    case 'a' &lt;= c &amp;&amp; c &lt;= 'f':
+        return c - 'a' + 10
+    case 'A' &lt;= c &amp;&amp; c &lt;= 'F':
+        return c - 'A' + 10
+    }
+    return 0
+}
+</pre>
+
+<p>
+There is no automatic fall through, but cases can be presented
+in comma-separated lists.
+</p>
+<pre>
+func shouldEscape(c byte) bool {
+    switch c {
+    case ' ', '?', '&amp;', '=', '#', '+', '%':
+        return true
+    }
+    return false
+}
+</pre>
+
+<p>
+Although they are not nearly as common in Go as some other C-like
+languages, <code>break</code> statements can be used to terminate
+a <code>switch</code> early.
+Sometimes, though, it's necessary to break out of a surrounding loop,
+not the switch, and in Go that can be accomplished by putting a label
+on the loop and "breaking" to that label.
+This example shows both uses.
+</p>
+
+<pre>
+Loop:
+	for n := 0; n &lt; len(src); n += size {
+		switch {
+		case src[n] &lt; sizeOne:
+			if validateOnly {
+				break
+			}
+			size = 1
+			update(src[n])
+
+		case src[n] &lt; sizeTwo:
+			if n+1 &gt;= len(src) {
+				err = errShortInput
+				break Loop
+			}
+			if validateOnly {
+				break
+			}
+			size = 2
+			update(src[n] + src[n+1]&lt;&lt;shift)
+		}
+	}
+</pre>
+
+<p>
+Of course, the <code>continue</code> statement also accepts an optional label
+but it applies only to loops.
+</p>
+
+<p>
+To close this section, here's a comparison routine for byte slices that uses two
+<code>switch</code> statements:
+</p>
+<pre>
+// Compare returns an integer comparing the two byte slices,
+// lexicographically.
+// The result will be 0 if a == b, -1 if a &lt; b, and +1 if a &gt; b
+func Compare(a, b []byte) int {
+    for i := 0; i &lt; len(a) &amp;&amp; i &lt; len(b); i++ {
+        switch {
+        case a[i] &gt; b[i]:
+            return 1
+        case a[i] &lt; b[i]:
+            return -1
+        }
+    }
+    switch {
+    case len(a) &gt; len(b):
+        return 1
+    case len(a) &lt; len(b):
+        return -1
+    }
+    return 0
+}
+</pre>
+
+<h3 id="type_switch">Type switch</h3>
+
+<p>
+A switch can also be used to discover the dynamic type of an interface
+variable.  Such a <em>type switch</em> uses the syntax of a type
+assertion with the keyword <code>type</code> inside the parentheses.
+If the switch declares a variable in the expression, the variable will
+have the corresponding type in each clause.
+It's also idiomatic to reuse the name in such cases, in effect declaring
+a new variable with the same name but a different type in each case.
+</p>
+<pre>
+var t interface{}
+t = functionOfSomeType()
+switch t := t.(type) {
+default:
+    fmt.Printf("unexpected type %T\n", t)     // %T prints whatever type t has
+case bool:
+    fmt.Printf("boolean %t\n", t)             // t has type bool
+case int:
+    fmt.Printf("integer %d\n", t)             // t has type int
+case *bool:
+    fmt.Printf("pointer to boolean %t\n", *t) // t has type *bool
+case *int:
+    fmt.Printf("pointer to integer %d\n", *t) // t has type *int
+}
+</pre>
+
+<h2 id="functions">Functions</h2>
+
+<h3 id="multiple-returns">Multiple return values</h3>
+
+<p>
+One of Go's unusual features is that functions and methods
+can return multiple values.  This form can be used to
+improve on a couple of clumsy idioms in C programs: in-band
+error returns such as <code>-1</code> for <code>EOF</code>
+and modifying an argument passed by address.
+</p>
+
+<p>
+In C, a write error is signaled by a negative count with the
+error code secreted away in a volatile location.
+In Go, <code>Write</code>
+can return a count <i>and</i> an error: &ldquo;Yes, you wrote some
+bytes but not all of them because you filled the device&rdquo;.
+The signature of the <code>Write</code> method on files from
+package <code>os</code> is:
+</p>
+
+<pre>
+func (file *File) Write(b []byte) (n int, err error)
+</pre>
+
+<p>
+and as the documentation says, it returns the number of bytes
+written and a non-nil <code>error</code> when <code>n</code>
+<code>!=</code> <code>len(b)</code>.
+This is a common style; see the section on error handling for more examples.
+</p>
+
+<p>
+A similar approach obviates the need to pass a pointer to a return
+value to simulate a reference parameter.
+Here's a simple-minded function to
+grab a number from a position in a byte slice, returning the number
+and the next position.
+</p>
+
+<pre>
+func nextInt(b []byte, i int) (int, int) {
+    for ; i &lt; len(b) &amp;&amp; !isDigit(b[i]); i++ {
+    }
+    x := 0
+    for ; i &lt; len(b) &amp;&amp; isDigit(b[i]); i++ {
+        x = x*10 + int(b[i]) - '0'
+    }
+    return x, i
+}
+</pre>
+
+<p>
+You could use it to scan the numbers in an input slice <code>b</code> like this:
+</p>
+
+<pre>
+    for i := 0; i &lt; len(b); {
+        x, i = nextInt(b, i)
+        fmt.Println(x)
+    }
+</pre>
+
+<h3 id="named-results">Named result parameters</h3>
+
+<p>
+The return or result "parameters" of a Go function can be given names and
+used as regular variables, just like the incoming parameters.
+When named, they are initialized to the zero values for their types when
+the function begins; if the function executes a <code>return</code> statement
+with no arguments, the current values of the result parameters are
+used as the returned values.
+</p>
+
+<p>
+The names are not mandatory but they can make code shorter and clearer:
+they're documentation.
+If we name the results of <code>nextInt</code> it becomes
+obvious which returned <code>int</code>
+is which.
+</p>
+
+<pre>
+func nextInt(b []byte, pos int) (value, nextPos int) {
+</pre>
+
+<p>
+Because named results are initialized and tied to an unadorned return, they can simplify
+as well as clarify.  Here's a version
+of <code>io.ReadFull</code> that uses them well:
+</p>
+
+<pre>
+func ReadFull(r Reader, buf []byte) (n int, err error) {
+    for len(buf) &gt; 0 &amp;&amp; err == nil {
+        var nr int
+        nr, err = r.Read(buf)
+        n += nr
+        buf = buf[nr:]
+    }
+    return
+}
+</pre>
+
+<h3 id="defer">Defer</h3>
+
+<p>
+Go's <code>defer</code> statement schedules a function call (the
+<i>deferred</i> function) to be run immediately before the function
+executing the <code>defer</code> returns.  It's an unusual but
+effective way to deal with situations such as resources that must be
+released regardless of which path a function takes to return.  The
+canonical examples are unlocking a mutex or closing a file.
+</p>
+
+<pre>
+// Contents returns the file's contents as a string.
+func Contents(filename string) (string, error) {
+    f, err := os.Open(filename)
+    if err != nil {
+        return "", err
+    }
+    defer f.Close()  // f.Close will run when we're finished.
+
+    var result []byte
+    buf := make([]byte, 100)
+    for {
+        n, err := f.Read(buf[0:])
+        result = append(result, buf[0:n]...) // append is discussed later.
+        if err != nil {
+            if err == io.EOF {
+                break
+            }
+            return "", err  // f will be closed if we return here.
+        }
+    }
+    return string(result), nil // f will be closed if we return here.
+}
+</pre>
+
+<p>
+Deferring a call to a function such as <code>Close</code> has two advantages.  First, it
+guarantees that you will never forget to close the file, a mistake
+that's easy to make if you later edit the function to add a new return
+path.  Second, it means that the close sits near the open,
+which is much clearer than placing it at the end of the function.
+</p>
+
+<p>
+The arguments to the deferred function (which include the receiver if
+the function is a method) are evaluated when the <i>defer</i>
+executes, not when the <i>call</i> executes.  Besides avoiding worries
+about variables changing values as the function executes, this means
+that a single deferred call site can defer multiple function
+executions.  Here's a silly example.
+</p>
+
+<pre>
+for i := 0; i &lt; 5; i++ {
+    defer fmt.Printf("%d ", i)
+}
+</pre>
+
+<p>
+Deferred functions are executed in LIFO order, so this code will cause
+<code>4 3 2 1 0</code> to be printed when the function returns.  A
+more plausible example is a simple way to trace function execution
+through the program.  We could write a couple of simple tracing
+routines like this:
+</p>
+
+<pre>
+func trace(s string)   { fmt.Println("entering:", s) }
+func untrace(s string) { fmt.Println("leaving:", s) }
+
+// Use them like this:
+func a() {
+    trace("a")
+    defer untrace("a")
+    // do something....
+}
+</pre>
+
+<p>
+We can do better by exploiting the fact that arguments to deferred
+functions are evaluated when the <code>defer</code> executes.  The
+tracing routine can set up the argument to the untracing routine.
+This example:
+</p>
+
+<pre>
+func trace(s string) string {
+    fmt.Println("entering:", s)
+    return s
+}
+
+func un(s string) {
+    fmt.Println("leaving:", s)
+}
+
+func a() {
+    defer un(trace("a"))
+    fmt.Println("in a")
+}
+
+func b() {
+    defer un(trace("b"))
+    fmt.Println("in b")
+    a()
+}
+
+func main() {
+    b()
+}
+</pre>
+
+<p>
+prints
+</p>
+
+<pre>
+entering: b
+in b
+entering: a
+in a
+leaving: a
+leaving: b
+</pre>
+
+<p>
+For programmers accustomed to block-level resource management from
+other languages, <code>defer</code> may seem peculiar, but its most
+interesting and powerful applications come precisely from the fact
+that it's not block-based but function-based.  In the section on
+<code>panic</code> and <code>recover</code> we'll see another
+example of its possibilities.
+</p>
+
+<h2 id="data">Data</h2>
+
+<h3 id="allocation_new">Allocation with <code>new</code></h3>
+
+<p>
+Go has two allocation primitives, the built-in functions
+<code>new</code> and <code>make</code>.
+They do different things and apply to different types, which can be confusing,
+but the rules are simple.
+Let's talk about <code>new</code> first.
+It's a built-in function that allocates memory, but unlike its namesakes
+in some other languages it does not <em>initialize</em> the memory,
+it only <em>zeros</em> it.
+That is,
+<code>new(T)</code> allocates zeroed storage for a new item of type
+<code>T</code> and returns its address, a value of type <code>*T</code>.
+In Go terminology, it returns a pointer to a newly allocated zero value of type
+<code>T</code>.
+</p>
+
+<p>
+Since the memory returned by <code>new</code> is zeroed, it's helpful to arrange
+when designing your data structures that the
+zero value of each type can be used without further initialization.  This means a user of
+the data structure can create one with <code>new</code> and get right to
+work.
+For example, the documentation for <code>bytes.Buffer</code> states that
+"the zero value for <code>Buffer</code> is an empty buffer ready to use."
+Similarly, <code>sync.Mutex</code> does not
+have an explicit constructor or <code>Init</code> method.
+Instead, the zero value for a <code>sync.Mutex</code>
+is defined to be an unlocked mutex.
+</p>
+
+<p>
+The zero-value-is-useful property works transitively. Consider this type declaration.
+</p>
+
+<pre>
+type SyncedBuffer struct {
+    lock    sync.Mutex
+    buffer  bytes.Buffer
+}
+</pre>
+
+<p>
+Values of type <code>SyncedBuffer</code> are also ready to use immediately upon allocation
+or just declaration.  In the next snippet, both <code>p</code> and <code>v</code> will work
+correctly without further arrangement.
+</p>
+
+<pre>
+p := new(SyncedBuffer)  // type *SyncedBuffer
+var v SyncedBuffer      // type  SyncedBuffer
+</pre>
+
+<h3 id="composite_literals">Constructors and composite literals</h3>
+
+<p>
+Sometimes the zero value isn't good enough and an initializing
+constructor is necessary, as in this example derived from
+package <code>os</code>.
+</p>
+
+<pre>
+func NewFile(fd int, name string) *File {
+    if fd &lt; 0 {
+        return nil
+    }
+    f := new(File)
+    f.fd = fd
+    f.name = name
+    f.dirinfo = nil
+    f.nepipe = 0
+    return f
+}
+</pre>
+
+<p>
+There's a lot of boiler plate in there.  We can simplify it
+using a <i>composite literal</i>, which is
+an expression that creates a
+new instance each time it is evaluated.
+</p>
+
+<pre>
+func NewFile(fd int, name string) *File {
+    if fd &lt; 0 {
+        return nil
+    }
+    f := File{fd, name, nil, 0}
+    return &amp;f
+}
+</pre>
+
+<p>
+Note that, unlike in C, it's perfectly OK to return the address of a local variable;
+the storage associated with the variable survives after the function
+returns.
+In fact, taking the address of a composite literal
+allocates a fresh instance each time it is evaluated,
+so we can combine these last two lines.
+</p>
+
+<pre>
+    return &amp;File{fd, name, nil, 0}
+</pre>
+
+<p>
+The fields of a composite literal are laid out in order and must all be present.
+However, by labeling the elements explicitly as <i>field</i><code>:</code><i>value</i>
+pairs, the initializers can appear in any
+order, with the missing ones left as their respective zero values.  Thus we could say
+</p>
+
+<pre>
+    return &amp;File{fd: fd, name: name}
+</pre>
+
+<p>
+As a limiting case, if a composite literal contains no fields at all, it creates
+a zero value for the type.  The expressions <code>new(File)</code> and <code>&amp;File{}</code> are equivalent.
+</p>
+
+<p>
+Composite literals can also be created for arrays, slices, and maps,
+with the field labels being indices or map keys as appropriate.
+In these examples, the initializations work regardless of the values of <code>Enone</code>,
+<code>Eio</code>, and <code>Einval</code>, as long as they are distinct.
+</p>
+
+<pre>
+a := [...]string   {Enone: "no error", Eio: "Eio", Einval: "invalid argument"}
+s := []string      {Enone: "no error", Eio: "Eio", Einval: "invalid argument"}
+m := map[int]string{Enone: "no error", Eio: "Eio", Einval: "invalid argument"}
+</pre>
+
+<h3 id="allocation_make">Allocation with <code>make</code></h3>
+
+<p>
+Back to allocation.
+The built-in function <code>make(T, </code><i>args</i><code>)</code> serves
+a purpose different from <code>new(T)</code>.
+It creates slices, maps, and channels only, and it returns an <em>initialized</em>
+(not <em>zeroed</em>)
+value of type <code>T</code> (not <code>*T</code>).
+The reason for the distinction
+is that these three types represent, under the covers, references to data structures that
+must be initialized before use.
+A slice, for example, is a three-item descriptor
+containing a pointer to the data (inside an array), the length, and the
+capacity, and until those items are initialized, the slice is <code>nil</code>.
+For slices, maps, and channels,
+<code>make</code> initializes the internal data structure and prepares
+the value for use.
+For instance,
+</p>
+
+<pre>
+make([]int, 10, 100)
+</pre>
+
+<p>
+allocates an array of 100 ints and then creates a slice
+structure with length 10 and a capacity of 100 pointing at the first
+10 elements of the array.
+(When making a slice, the capacity can be omitted; see the section on slices
+for more information.)
+In contrast, <code>new([]int)</code> returns a pointer to a newly allocated, zeroed slice
+structure, that is, a pointer to a <code>nil</code> slice value.
+</p>
+
+<p>
+These examples illustrate the difference between <code>new</code> and
+<code>make</code>.
+</p>
+
+<pre>
+var p *[]int = new([]int)       // allocates slice structure; *p == nil; rarely useful
+var v  []int = make([]int, 100) // the slice v now refers to a new array of 100 ints
+
+// Unnecessarily complex:
+var p *[]int = new([]int)
+*p = make([]int, 100, 100)
+
+// Idiomatic:
+v := make([]int, 100)
+</pre>
+
+<p>
+Remember that <code>make</code> applies only to maps, slices and channels
+and does not return a pointer.
+To obtain an explicit pointer allocate with <code>new</code> or take the address
+of a variable explicitly.
+</p>
+
+<h3 id="arrays">Arrays</h3>
+
+<p>
+Arrays are useful when planning the detailed layout of memory and sometimes
+can help avoid allocation, but primarily
+they are a building block for slices, the subject of the next section.
+To lay the foundation for that topic, here are a few words about arrays.
+</p>
+
+<p>
+There are major differences between the ways arrays work in Go and C.
+In Go,
+</p>
+<ul>
+<li>
+Arrays are values. Assigning one array to another copies all the elements.
+</li>
+<li>
+In particular, if you pass an array to a function, it
+will receive a <i>copy</i> of the array, not a pointer to it.
+<li>
+The size of an array is part of its type.  The types <code>[10]int</code>
+and <code>[20]int</code> are distinct.
+</li>
+</ul>
+
+<p>
+The value property can be useful but also expensive; if you want C-like behavior and efficiency,
+you can pass a pointer to the array.
+</p>
+
+<pre>
+func Sum(a *[3]float64) (sum float64) {
+    for _, v := range *a {
+        sum += v
+    }
+    return
+}
+
+array := [...]float64{7.0, 8.5, 9.1}
+x := Sum(&amp;array)  // Note the explicit address-of operator
+</pre>
+
+<p>
+But even this style isn't idiomatic Go.
+Use slices instead.
+</p>
+
+<h3 id="slices">Slices</h3>
+
+<p>
+Slices wrap arrays to give a more general, powerful, and convenient
+interface to sequences of data.  Except for items with explicit
+dimension such as transformation matrices, most array programming in
+Go is done with slices rather than simple arrays.
+</p>
+<p>
+Slices hold references to an underlying array, and if you assign one
+slice to another, both refer to the same array.
+If a function takes a slice argument, changes it makes to
+the elements of the slice will be visible to the caller, analogous to
+passing a pointer to the underlying array.  A <code>Read</code>
+function can therefore accept a slice argument rather than a pointer
+and a count; the length within the slice sets an upper
+limit of how much data to read.  Here is the signature of the
+<code>Read</code> method of the <code>File</code> type in package
+<code>os</code>:
+</p>
+<pre>
+func (f *File) Read(buf []byte) (n int, err error)
+</pre>
+<p>
+The method returns the number of bytes read and an error value, if
+any.
+To read into the first 32 bytes of a larger buffer
+<code>buf</code>, <i>slice</i> (here used as a verb) the buffer.
+</p>
+<pre>
+    n, err := f.Read(buf[0:32])
+</pre>
+<p>
+Such slicing is common and efficient.  In fact, leaving efficiency aside for
+the moment, the following snippet would also read the first 32 bytes of the buffer.
+</p>
+<pre>
+    var n int
+    var err error
+    for i := 0; i &lt; 32; i++ {
+        nbytes, e := f.Read(buf[i:i+1])  // Read one byte.
+        n += nbytes
+        if nbytes == 0 || e != nil {
+            err = e
+            break
+        }
+    }
+</pre>
+<p>
+The length of a slice may be changed as long as it still fits within
+the limits of the underlying array; just assign it to a slice of
+itself.  The <i>capacity</i> of a slice, accessible by the built-in
+function <code>cap</code>, reports the maximum length the slice may
+assume.  Here is a function to append data to a slice.  If the data
+exceeds the capacity, the slice is reallocated.  The
+resulting slice is returned.  The function uses the fact that
+<code>len</code> and <code>cap</code> are legal when applied to the
+<code>nil</code> slice, and return 0.
+</p>
+<pre>
+func Append(slice, data []byte) []byte {
+    l := len(slice)
+    if l + len(data) &gt; cap(slice) {  // reallocate
+        // Allocate double what's needed, for future growth.
+        newSlice := make([]byte, (l+len(data))*2)
+        // The copy function is predeclared and works for any slice type.
+        copy(newSlice, slice)
+        slice = newSlice
+    }
+    slice = slice[0:l+len(data)]
+    copy(slice[l:], data)
+    return slice
+}
+</pre>
+<p>
+We must return the slice afterwards because, although <code>Append</code>
+can modify the elements of <code>slice</code>, the slice itself (the run-time data
+structure holding the pointer, length, and capacity) is passed by value.
+</p>
+
+<p>
+The idea of appending to a slice is so useful it's captured by the
+<code>append</code> built-in function.  To understand that function's
+design, though, we need a little more information, so we'll return
+to it later.
+</p>
+
+<h3 id="two_dimensional_slices">Two-dimensional slices</h3>
+
+<p>
+Go's arrays and slices are one-dimensional.
+To create the equivalent of a 2D array or slice, it is necessary to define an array-of-arrays
+or slice-of-slices, like this:
+</p>
+
+<pre>
+type Transform [3][3]float64  // A 3x3 array, really an array of arrays.
+type LinesOfText [][]byte     // A slice of byte slices.
+</pre>
+
+<p>
+Because slices are variable-length, it is possible to have each inner
+slice be a different length.
+That can be a common situation, as in our <code>LinesOfText</code>
+example: each line has an independent length.
+</p>
+
+<pre>
+text := LinesOfText{
+	[]byte("Now is the time"),
+	[]byte("for all good gophers"),
+	[]byte("to bring some fun to the party."),
+}
+</pre>
+
+<p>
+Sometimes it's necessary to allocate a 2D slice, a situation that can arise when
+processing scan lines of pixels, for instance.
+There are two ways to achieve this.
+One is to allocate each slice independently; the other
+is to allocate a single array and point the individual slices into it.
+Which to use depends on your application.
+If the slices might grow or shrink, they should be allocated independently
+to avoid overwriting the next line; if not, it can be more efficient to construct
+the object with a single allocation.
+For reference, here are sketches of the two methods.
+First, a line at a time:
+</p>
+
+<pre>
+// Allocate the top-level slice.
+picture := make([][]uint8, YSize) // One row per unit of y.
+// Loop over the rows, allocating the slice for each row.
+for i := range picture {
+	picture[i] = make([]uint8, XSize)
+}
+</pre>
+
+<p>
+And now as one allocation, sliced into lines:
+</p>
+
+<pre>
+// Allocate the top-level slice, the same as before.
+picture := make([][]uint8, YSize) // One row per unit of y.
+// Allocate one large slice to hold all the pixels.
+pixels := make([]uint8, XSize*YSize) // Has type []uint8 even though picture is [][]uint8.
+// Loop over the rows, slicing each row from the front of the remaining pixels slice.
+for i := range picture {
+	picture[i], pixels = pixels[:XSize], pixels[XSize:]
+}
+</pre>
+
+<h3 id="maps">Maps</h3>
+
+<p>
+Maps are a convenient and powerful built-in data structure that associate
+values of one type (the <em>key</em>) with values of another type
+(the <em>element</em> or <em>value</em>).
+The key can be of any type for which the equality operator is defined,
+such as integers,
+floating point and complex numbers,
+strings, pointers, interfaces (as long as the dynamic type
+supports equality), structs and arrays.
+Slices cannot be used as map keys,
+because equality is not defined on them.
+Like slices, maps hold references to an underlying data structure.
+If you pass a map to a function
+that changes the contents of the map, the changes will be visible
+in the caller.
+</p>
+<p>
+Maps can be constructed using the usual composite literal syntax
+with colon-separated key-value pairs,
+so it's easy to build them during initialization.
+</p>
+<pre>
+var timeZone = map[string]int{
+    "UTC":  0*60*60,
+    "EST": -5*60*60,
+    "CST": -6*60*60,
+    "MST": -7*60*60,
+    "PST": -8*60*60,
+}
+</pre>
+<p>
+Assigning and fetching map values looks syntactically just like
+doing the same for arrays and slices except that the index doesn't
+need to be an integer.
+</p>
+<pre>
+offset := timeZone["EST"]
+</pre>
+<p>
+An attempt to fetch a map value with a key that
+is not present in the map will return the zero value for the type
+of the entries
+in the map.  For instance, if the map contains integers, looking
+up a non-existent key will return <code>0</code>.
+A set can be implemented as a map with value type <code>bool</code>.
+Set the map entry to <code>true</code> to put the value in the set, and then
+test it by simple indexing.
+</p>
+<pre>
+attended := map[string]bool{
+    "Ann": true,
+    "Joe": true,
+    ...
+}
+
+if attended[person] { // will be false if person is not in the map
+    fmt.Println(person, "was at the meeting")
+}
+</pre>
+<p>
+Sometimes you need to distinguish a missing entry from
+a zero value.  Is there an entry for <code>"UTC"</code>
+or is that 0 because it's not in the map at all?
+You can discriminate with a form of multiple assignment.
+</p>
+<pre>
+var seconds int
+var ok bool
+seconds, ok = timeZone[tz]
+</pre>
+<p>
+For obvious reasons this is called the &ldquo;comma ok&rdquo; idiom.
+In this example, if <code>tz</code> is present, <code>seconds</code>
+will be set appropriately and <code>ok</code> will be true; if not,
+<code>seconds</code> will be set to zero and <code>ok</code> will
+be false.
+Here's a function that puts it together with a nice error report:
+</p>
+<pre>
+func offset(tz string) int {
+    if seconds, ok := timeZone[tz]; ok {
+        return seconds
+    }
+    log.Println("unknown time zone:", tz)
+    return 0
+}
+</pre>
+<p>
+To test for presence in the map without worrying about the actual value,
+you can use the <a href="#blank">blank identifier</a> (<code>_</code>)
+in place of the usual variable for the value.
+</p>
+<pre>
+_, present := timeZone[tz]
+</pre>
+<p>
+To delete a map entry, use the <code>delete</code>
+built-in function, whose arguments are the map and the key to be deleted.
+It's safe to do this even if the key is already absent
+from the map.
+</p>
+<pre>
+delete(timeZone, "PDT")  // Now on Standard Time
+</pre>
+
+<h3 id="printing">Printing</h3>
+
+<p>
+Formatted printing in Go uses a style similar to C's <code>printf</code>
+family but is richer and more general. The functions live in the <code>fmt</code>
+package and have capitalized names: <code>fmt.Printf</code>, <code>fmt.Fprintf</code>,
+<code>fmt.Sprintf</code> and so on.  The string functions (<code>Sprintf</code> etc.)
+return a string rather than filling in a provided buffer.
+</p>
+<p>
+You don't need to provide a format string.  For each of <code>Printf</code>,
+<code>Fprintf</code> and <code>Sprintf</code> there is another pair
+of functions, for instance <code>Print</code> and <code>Println</code>.
+These functions do not take a format string but instead generate a default
+format for each argument. The <code>Println</code> versions also insert a blank
+between arguments and append a newline to the output while
+the <code>Print</code> versions add blanks only if the operand on neither side is a string.
+In this example each line produces the same output.
+</p>
+<pre>
+fmt.Printf("Hello %d\n", 23)
+fmt.Fprint(os.Stdout, "Hello ", 23, "\n")
+fmt.Println("Hello", 23)
+fmt.Println(fmt.Sprint("Hello ", 23))
+</pre>
+<p>
+The formatted print functions <code>fmt.Fprint</code>
+and friends take as a first argument any object
+that implements the <code>io.Writer</code> interface; the variables <code>os.Stdout</code>
+and <code>os.Stderr</code> are familiar instances.
+</p>
+<p>
+Here things start to diverge from C.  First, the numeric formats such as <code>%d</code>
+do not take flags for signedness or size; instead, the printing routines use the
+type of the argument to decide these properties.
+</p>
+<pre>
+var x uint64 = 1&lt;&lt;64 - 1
+fmt.Printf("%d %x; %d %x\n", x, x, int64(x), int64(x))
+</pre>
+<p>
+prints
+</p>
+<pre>
+18446744073709551615 ffffffffffffffff; -1 -1
+</pre>
+<p>
+If you just want the default conversion, such as decimal for integers, you can use
+the catchall format <code>%v</code> (for &ldquo;value&rdquo;); the result is exactly
+what <code>Print</code> and <code>Println</code> would produce.
+Moreover, that format can print <em>any</em> value, even arrays, slices, structs, and
+maps.  Here is a print statement for the time zone map defined in the previous section.
+</p>
+<pre>
+fmt.Printf("%v\n", timeZone)  // or just fmt.Println(timeZone)
+</pre>
+<p>
+which gives output:
+</p>
+<pre>
+map[CST:-21600 EST:-18000 MST:-25200 PST:-28800 UTC:0]
+</pre>
+<p>
+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.
+</p>
+<pre>
+type T struct {
+    a int
+    b float64
+    c string
+}
+t := &amp;T{ 7, -2.35, "abc\tdef" }
+fmt.Printf("%v\n", t)
+fmt.Printf("%+v\n", t)
+fmt.Printf("%#v\n", t)
+fmt.Printf("%#v\n", timeZone)
+</pre>
+<p>
+prints
+</p>
+<pre>
+&amp;{7 -2.35 abc   def}
+&amp;{a:7 b:-2.35 c:abc     def}
+&amp;main.T{a:7, b:-2.35, c:"abc\tdef"}
+map[string]int{"CST":-21600, "EST":-18000, "MST":-25200, "PST":-28800, "UTC":0}
+</pre>
+<p>
+(Note the ampersands.)
+That quoted string format is also available through <code>%q</code> when
+applied to a value of type <code>string</code> or <code>[]byte</code>.
+The alternate format <code>%#q</code> will use backquotes instead if possible.
+(The <code>%q</code> format also applies to integers and runes, producing a
+single-quoted rune constant.)
+Also, <code>%x</code> works on strings, byte arrays and byte slices as well as
+on integers, generating a long hexadecimal string, and with
+a space in the format (<code>%&nbsp;x</code>) it puts spaces between the bytes.
+</p>
+<p>
+Another handy format is <code>%T</code>, which prints the <em>type</em> of a value.
+</p>
+<pre>
+fmt.Printf(&quot;%T\n&quot;, timeZone)
+</pre>
+<p>
+prints
+</p>
+<pre>
+map[string]int
+</pre>
+<p>
+If you want to control the default format for a custom type, all that's required is to define
+a method with the signature <code>String() string</code> on the type.
+For our simple type <code>T</code>, that might look like this.
+</p>
+<pre>
+func (t *T) String() string {
+    return fmt.Sprintf("%d/%g/%q", t.a, t.b, t.c)
+}
+fmt.Printf("%v\n", t)
+</pre>
+<p>
+to print in the format
+</p>
+<pre>
+7/-2.35/"abc\tdef"
+</pre>
+<p>
+(If you need to print <em>values</em> of type <code>T</code> as well as pointers to <code>T</code>,
+the receiver for <code>String</code> must be of value type; this example used a pointer because
+that's more efficient and idiomatic for struct types.
+See the section below on <a href="#pointers_vs_values">pointers vs. value receivers</a> for more information.)
+</p>
+
+<p>
+Our <code>String</code> method is able to call <code>Sprintf</code> because the
+print routines are fully reentrant and can be wrapped this way.
+There is one important detail to understand about this approach,
+however: don't construct a <code>String</code> method by calling
+<code>Sprintf</code> in a way that will recur into your <code>String</code>
+method indefinitely.  This can happen if the <code>Sprintf</code>
+call attempts to print the receiver directly as a string, which in
+turn will invoke the method again.  It's a common and easy mistake
+to make, as this example shows.
+</p>
+
+<pre>
+type MyString string
+
+func (m MyString) String() string {
+    return fmt.Sprintf("MyString=%s", m) // Error: will recur forever.
+}
+</pre>
+
+<p>
+It's also easy to fix: convert the argument to the basic string type, which does not have the
+method.
+</p>
+
+<pre>
+type MyString string
+func (m MyString) String() string {
+    return fmt.Sprintf("MyString=%s", string(m)) // OK: note conversion.
+}
+</pre>
+
+<p>
+In the <a href="#initialization">initialization section</a> we'll see another technique that avoids this recursion.
+</p>
+
+<p>
+Another printing technique is to pass a print routine's arguments directly to another such routine.
+The signature of <code>Printf</code> uses the type <code>...interface{}</code>
+for its final argument to specify that an arbitrary number of parameters (of arbitrary type)
+can appear after the format.
+</p>
+<pre>
+func Printf(format string, v ...interface{}) (n int, err error) {
+</pre>
+<p>
+Within the function <code>Printf</code>, <code>v</code> acts like a variable of type
+<code>[]interface{}</code> but if it is passed to another variadic function, it acts like
+a regular list of arguments.
+Here is the implementation of the
+function <code>log.Println</code> we used above. It passes its arguments directly to
+<code>fmt.Sprintln</code> for the actual formatting.
+</p>
+<pre>
+// Println prints to the standard logger in the manner of fmt.Println.
+func Println(v ...interface{}) {
+    std.Output(2, fmt.Sprintln(v...))  // Output takes parameters (int, string)
+}
+</pre>
+<p>
+We write <code>...</code> after <code>v</code> in the nested call to <code>Sprintln</code> to tell the
+compiler to treat <code>v</code> as a list of arguments; otherwise it would just pass
+<code>v</code> as a single slice argument.
+</p>
+<p>
+There's even more to printing than we've covered here.  See the <code>godoc</code> documentation
+for package <code>fmt</code> for the details.
+</p>
+<p>
+By the way, a <code>...</code> parameter can be of a specific type, for instance <code>...int</code>
+for a min function that chooses the least of a list of integers:
+</p>
+<pre>
+func Min(a ...int) int {
+    min := int(^uint(0) &gt;&gt; 1)  // largest int
+    for _, i := range a {
+        if i &lt; min {
+            min = i
+        }
+    }
+    return min
+}
+</pre>
+
+<h3 id="append">Append</h3>
+<p>
+Now we have the missing piece we needed to explain the design of
+the <code>append</code> built-in function.  The signature of <code>append</code>
+is different from our custom <code>Append</code> function above.
+Schematically, it's like this:
+</p>
+<pre>
+func append(slice []<i>T</i>, elements ...<i>T</i>) []<i>T</i>
+</pre>
+<p>
+where <i>T</i> is a placeholder for any given type.  You can't
+actually write a function in Go where the type <code>T</code>
+is determined by the caller.
+That's why <code>append</code> is built in: it needs support from the
+compiler.
+</p>
+<p>
+What <code>append</code> does is append the elements to the end of
+the slice and return the result.  The result needs to be returned
+because, as with our hand-written <code>Append</code>, the underlying
+array may change.  This simple example
+</p>
+<pre>
+x := []int{1,2,3}
+x = append(x, 4, 5, 6)
+fmt.Println(x)
+</pre>
+<p>
+prints <code>[1 2 3 4 5 6]</code>.  So <code>append</code> works a
+little like <code>Printf</code>, collecting an arbitrary number of
+arguments.
+</p>
+<p>
+But what if we wanted to do what our <code>Append</code> does and
+append a slice to a slice?  Easy: use <code>...</code> at the call
+site, just as we did in the call to <code>Output</code> above.  This
+snippet produces identical output to the one above.
+</p>
+<pre>
+x := []int{1,2,3}
+y := []int{4,5,6}
+x = append(x, y...)
+fmt.Println(x)
+</pre>
+<p>
+Without that <code>...</code>, it wouldn't compile because the types
+would be wrong; <code>y</code> is not of type <code>int</code>.
+</p>
+
+<h2 id="initialization">Initialization</h2>
+
+<p>
+Although it doesn't look superficially very different from
+initialization in C or C++, initialization in Go is more powerful.
+Complex structures can be built during initialization and the ordering
+issues among initialized objects, even among different packages, are handled
+correctly.
+</p>
+
+<h3 id="constants">Constants</h3>
+
+<p>
+Constants in Go are just that&mdash;constant.
+They are created at compile time, even when defined as
+locals in functions,
+and can only be numbers, characters (runes), strings or booleans.
+Because of the compile-time restriction, the expressions
+that define them must be constant expressions,
+evaluatable by the compiler.  For instance,
+<code>1&lt;&lt;3</code> is a constant expression, while
+<code>math.Sin(math.Pi/4)</code> is not because
+the function call to <code>math.Sin</code> needs
+to happen at run time.
+</p>
+
+<p>
+In Go, enumerated constants are created using the <code>iota</code>
+enumerator.  Since <code>iota</code> can be part of an expression and
+expressions can be implicitly repeated, it is easy to build intricate
+sets of values.
+</p>
+{{code "/doc/progs/eff_bytesize.go" `/^type ByteSize/` `/^\)/`}}
+<p>
+The ability to attach a method such as <code>String</code> to any
+user-defined type makes it possible for arbitrary values to format themselves
+automatically for printing.
+Although you'll see it most often applied to structs, this technique is also useful for
+scalar types such as floating-point types like <code>ByteSize</code>.
+</p>
+{{code "/doc/progs/eff_bytesize.go" `/^func.*ByteSize.*String/` `/^}/`}}
+<p>
+The expression <code>YB</code> prints as <code>1.00YB</code>,
+while <code>ByteSize(1e13)</code> prints as <code>9.09TB</code>.
+</p>
+
+<p>
+The use here of <code>Sprintf</code>
+to implement <code>ByteSize</code>'s <code>String</code> method is safe
+(avoids recurring indefinitely) not because of a conversion but
+because it calls <code>Sprintf</code> with <code>%f</code>,
+which is not a string format: <code>Sprintf</code> will only call
+the <code>String</code> method when it wants a string, and <code>%f</code>
+wants a floating-point value.
+</p>
+
+<h3 id="variables">Variables</h3>
+
+<p>
+Variables can be initialized just like constants but the
+initializer can be a general expression computed at run time.
+</p>
+<pre>
+var (
+    home   = os.Getenv("HOME")
+    user   = os.Getenv("USER")
+    gopath = os.Getenv("GOPATH")
+)
+</pre>
+
+<h3 id="init">The init function</h3>
+
+<p>
+Finally, each source file can define its own niladic <code>init</code> function to
+set up whatever state is required.  (Actually each file can have multiple
+<code>init</code> functions.)
+And finally means finally: <code>init</code> is called after all the
+variable declarations in the package have evaluated their initializers,
+and those are evaluated only after all the imported packages have been
+initialized.
+</p>
+<p>
+Besides initializations that cannot be expressed as declarations,
+a common use of <code>init</code> functions is to verify or repair
+correctness of the program state before real execution begins.
+</p>
+
+<pre>
+func init() {
+    if user == "" {
+        log.Fatal("$USER not set")
+    }
+    if home == "" {
+        home = "/home/" + user
+    }
+    if gopath == "" {
+        gopath = home + "/go"
+    }
+    // gopath may be overridden by --gopath flag on command line.
+    flag.StringVar(&amp;gopath, "gopath", gopath, "override default GOPATH")
+}
+</pre>
+
+<h2 id="methods">Methods</h2>
+
+<h3 id="pointers_vs_values">Pointers vs. Values</h3>
+<p>
+As we saw with <code>ByteSize</code>,
+methods can be defined for any named type (except a pointer or an interface);
+the receiver does not have to be a struct.
+</p>
+<p>
+In the discussion of slices above, we wrote an <code>Append</code>
+function.  We can define it as a method on slices instead.  To do
+this, we first declare a named type to which we can bind the method, and
+then make the receiver for the method a value of that type.
+</p>
+<pre>
+type ByteSlice []byte
+
+func (slice ByteSlice) Append(data []byte) []byte {
+    // Body exactly the same as the Append function defined above.
+}
+</pre>
+<p>
+This still requires the method to return the updated slice.  We can
+eliminate that clumsiness by redefining the method to take a
+<i>pointer</i> to a <code>ByteSlice</code> as its receiver, so the
+method can overwrite the caller's slice.
+</p>
+<pre>
+func (p *ByteSlice) Append(data []byte) {
+    slice := *p
+    // Body as above, without the return.
+    *p = slice
+}
+</pre>
+<p>
+In fact, we can do even better.  If we modify our function so it looks
+like a standard <code>Write</code> method, like this,
+</p>
+<pre>
+func (p *ByteSlice) Write(data []byte) (n int, err error) {
+    slice := *p
+    // Again as above.
+    *p = slice
+    return len(data), nil
+}
+</pre>
+<p>
+then the type <code>*ByteSlice</code> satisfies the standard interface
+<code>io.Writer</code>, which is handy.  For instance, we can
+print into one.
+</p>
+<pre>
+    var b ByteSlice
+    fmt.Fprintf(&amp;b, "This hour has %d days\n", 7)
+</pre>
+<p>
+We pass the address of a <code>ByteSlice</code>
+because only <code>*ByteSlice</code> satisfies <code>io.Writer</code>.
+The rule about pointers vs. values for receivers is that value methods
+can be invoked on pointers and values, but pointer methods can only be
+invoked on pointers.
+</p>
+
+<p>
+This rule arises because pointer methods can modify the receiver; invoking
+them on a value would cause the method to receive a copy of the value, so
+any modifications would be discarded.
+The language therefore disallows this mistake.
+There is a handy exception, though. When the value is addressable, the
+language takes care of the common case of invoking a pointer method on a
+value by inserting the address operator automatically.
+In our example, the variable <code>b</code> is addressable, so we can call
+its <code>Write</code> method with just <code>b.Write</code>. The compiler
+will rewrite that to <code>(&amp;b).Write</code> for us.
+</p>
+
+<p>
+By the way, the idea of using <code>Write</code> on a slice of bytes
+is central to the implementation of <code>bytes.Buffer</code>.
+</p>
+
+<h2 id="interfaces_and_types">Interfaces and other types</h2>
+
+<h3 id="interfaces">Interfaces</h3>
+<p>
+Interfaces in Go provide a way to specify the behavior of an
+object: if something can do <em>this</em>, then it can be used
+<em>here</em>.  We've seen a couple of simple examples already;
+custom printers can be implemented by a <code>String</code> method
+while <code>Fprintf</code> can generate output to anything
+with a <code>Write</code> method.
+Interfaces with only one or two methods are common in Go code, and are
+usually given a name derived from the method, such as <code>io.Writer</code>
+for something that implements <code>Write</code>.
+</p>
+<p>
+A type can implement multiple interfaces.
+For instance, a collection can be sorted
+by the routines in package <code>sort</code> if it implements
+<code>sort.Interface</code>, which contains <code>Len()</code>,
+<code>Less(i, j int) bool</code>, and <code>Swap(i, j int)</code>,
+and it could also have a custom formatter.
+In this contrived example <code>Sequence</code> satisfies both.
+</p>
+{{code "/doc/progs/eff_sequence.go" `/^type/` "$"}}
+
+<h3 id="conversions">Conversions</h3>
+
+<p>
+The <code>String</code> method of <code>Sequence</code> is recreating the
+work that <code>Sprint</code> already does for slices.
+(It also has complexity O(N²), which is poor.) We can share the
+effort (and also speed it up) if we convert the <code>Sequence</code> to a plain
+<code>[]int</code> before calling <code>Sprint</code>.
+</p>
+<pre>
+func (s Sequence) String() string {
+    s = s.Copy()
+    sort.Sort(s)
+    return fmt.Sprint([]int(s))
+}
+</pre>
+<p>
+This method is another example of the conversion technique for calling
+<code>Sprintf</code> safely from a <code>String</code> method.
+Because the two types (<code>Sequence</code> and <code>[]int</code>)
+are the same if we ignore the type name, it's legal to convert between them.
+The conversion doesn't create a new value, it just temporarily acts
+as though the existing value has a new type.
+(There are other legal conversions, such as from integer to floating point, that
+do create a new value.)
+</p>
+<p>
+It's an idiom in Go programs to convert the
+type of an expression to access a different
+set of methods. As an example, we could use the existing
+type <code>sort.IntSlice</code> to reduce the entire example
+to this:
+</p>
+<pre>
+type Sequence []int
+
+// Method for printing - sorts the elements before printing
+func (s Sequence) String() string {
+    s = s.Copy()
+    sort.IntSlice(s).Sort()
+    return fmt.Sprint([]int(s))
+}
+</pre>
+<p>
+Now, instead of having <code>Sequence</code> implement multiple
+interfaces (sorting and printing), we're using the ability of a data item to be
+converted to multiple types (<code>Sequence</code>, <code>sort.IntSlice</code>
+and <code>[]int</code>), each of which does some part of the job.
+That's more unusual in practice but can be effective.
+</p>
+
+<h3 id="interface_conversions">Interface conversions and type assertions</h3>
+
+<p>
+<a href="#type_switch">Type switches</a> are a form of conversion: they take an interface and, for
+each case in the switch, in a sense convert it to the type of that case.
+Here's a simplified version of how the code under <code>fmt.Printf</code> turns a value into
+a string using a type switch.
+If it's already a string, we want the actual string value held by the interface, while if it has a
+<code>String</code> method we want the result of calling the method.
+</p>
+
+<pre>
+type Stringer interface {
+    String() string
+}
+
+var value interface{} // Value provided by caller.
+switch str := value.(type) {
+case string:
+    return str
+case Stringer:
+    return str.String()
+}
+</pre>
+
+<p>
+The first case finds a concrete value; the second converts the interface into another interface.
+It's perfectly fine to mix types this way.
+</p>
+
+<p>
+What if there's only one type we care about? If we know the value holds a <code>string</code>
+and we just want to extract it?
+A one-case type switch would do, but so would a <em>type assertion</em>.
+A type assertion takes an interface value and extracts from it a value of the specified explicit type.
+The syntax borrows from the clause opening a type switch, but with an explicit
+type rather than the <code>type</code> keyword:
+</p>
+
+<pre>
+value.(typeName)
+</pre>
+
+<p>
+and the result is a new value with the static type <code>typeName</code>.
+That type must either be the concrete type held by the interface, or a second interface
+type that the value can be converted to.
+To extract the string we know is in the value, we could write:
+</p>
+
+<pre>
+str := value.(string)
+</pre>
+
+<p>
+But if it turns out that the value does not contain a string, the program will crash with a run-time error.
+To guard against that, use the "comma, ok" idiom to test, safely, whether the value is a string:
+</p>
+
+<pre>
+str, ok := value.(string)
+if ok {
+    fmt.Printf("string value is: %q\n", str)
+} else {
+    fmt.Printf("value is not a string\n")
+}
+</pre>
+
+<p>
+If the type assertion fails, <code>str</code> will still exist and be of type string, but it will have
+the zero value, an empty string.
+</p>
+
+<p>
+As an illustration of the capability, here's an <code>if</code>-<code>else</code>
+statement that's equivalent to the type switch that opened this section.
+</p>
+
+<pre>
+if str, ok := value.(string); ok {
+    return str
+} else if str, ok := value.(Stringer); ok {
+    return str.String()
+}
+</pre>
+
+<h3 id="generality">Generality</h3>
+<p>
+If a type exists only to implement an interface and will
+never have exported methods beyond that interface, there is
+no need to export the type itself.
+Exporting just the interface makes it clear the value has no
+interesting behavior beyond what is described in the
+interface.
+It also avoids the need to repeat the documentation
+on every instance of a common method.
+</p>
+<p>
+In such cases, the constructor should return an interface value
+rather than the implementing type.
+As an example, in the hash libraries
+both <code>crc32.NewIEEE</code> and <code>adler32.New</code>
+return the interface type <code>hash.Hash32</code>.
+Substituting the CRC-32 algorithm for Adler-32 in a Go program
+requires only changing the constructor call;
+the rest of the code is unaffected by the change of algorithm.
+</p>
+<p>
+A similar approach allows the streaming cipher algorithms
+in the various <code>crypto</code> packages to be
+separated from the block ciphers they chain together.
+The <code>Block</code> interface
+in the <code>crypto/cipher</code> package specifies the
+behavior of a block cipher, which provides encryption
+of a single block of data.
+Then, by analogy with the <code>bufio</code> package,
+cipher packages that implement this interface
+can be used to construct streaming ciphers, represented
+by the <code>Stream</code> interface, without
+knowing the details of the block encryption.
+</p>
+<p>
+The  <code>crypto/cipher</code> interfaces look like this:
+</p>
+<pre>
+type Block interface {
+    BlockSize() int
+    Encrypt(dst, src []byte)
+    Decrypt(dst, src []byte)
+}
+
+type Stream interface {
+    XORKeyStream(dst, src []byte)
+}
+</pre>
+
+<p>
+Here's the definition of the counter mode (CTR) stream,
+which turns a block cipher into a streaming cipher; notice
+that the block cipher's details are abstracted away:
+</p>
+
+<pre>
+// NewCTR returns a Stream that encrypts/decrypts using the given Block in
+// counter mode. The length of iv must be the same as the Block's block size.
+func NewCTR(block Block, iv []byte) Stream
+</pre>
+<p>
+<code>NewCTR</code> applies not
+just to one specific encryption algorithm and data source but to any
+implementation of the <code>Block</code> interface and any
+<code>Stream</code>.  Because they return
+interface values, replacing CTR
+encryption with other encryption modes is a localized change.  The constructor
+calls must be edited, but because the surrounding code must treat the result only
+as a <code>Stream</code>, it won't notice the difference.
+</p>
+
+<h3 id="interface_methods">Interfaces and methods</h3>
+<p>
+Since almost anything can have methods attached, almost anything can
+satisfy an interface.  One illustrative example is in the <code>http</code>
+package, which defines the <code>Handler</code> interface.  Any object
+that implements <code>Handler</code> can serve HTTP requests.
+</p>
+<pre>
+type Handler interface {
+    ServeHTTP(ResponseWriter, *Request)
+}
+</pre>
+<p>
+<code>ResponseWriter</code> is itself an interface that provides access
+to the methods needed to return the response to the client.
+Those methods include the standard <code>Write</code> method, so an
+<code>http.ResponseWriter</code> can be used wherever an <code>io.Writer</code>
+can be used.
+<code>Request</code> is a struct containing a parsed representation
+of the request from the client.
+</p>
+<p>
+For brevity, let's ignore POSTs and assume HTTP requests are always
+GETs; that simplification does not affect the way the handlers are set up.
+Here's a trivial implementation of a handler to count the number of times
+the page is visited.
+</p>
+<pre>
+// Simple counter server.
+type Counter struct {
+    n int
+}
+
+func (ctr *Counter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
+    ctr.n++
+    fmt.Fprintf(w, "counter = %d\n", ctr.n)
+}
+</pre>
+<p>
+(Keeping with our theme, note how <code>Fprintf</code> can print to an
+<code>http.ResponseWriter</code>.)
+In a real server, access to <code>ctr.n</code> would need protection from
+concurrent access.
+See the <code>sync</code> and <code>atomic</code> packages for suggestions.
+</p>
+<p>
+For reference, here's how to attach such a server to a node on the URL tree.
+</p>
+<pre>
+import "net/http"
+...
+ctr := new(Counter)
+http.Handle("/counter", ctr)
+</pre>
+<p>
+But why make <code>Counter</code> a struct?  An integer is all that's needed.
+(The receiver needs to be a pointer so the increment is visible to the caller.)
+</p>
+<pre>
+// Simpler counter server.
+type Counter int
+
+func (ctr *Counter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
+    *ctr++
+    fmt.Fprintf(w, "counter = %d\n", *ctr)
+}
+</pre>
+<p>
+What if your program has some internal state that needs to be notified that a page
+has been visited?  Tie a channel to the web page.
+</p>
+<pre>
+// A channel that sends a notification on each visit.
+// (Probably want the channel to be buffered.)
+type Chan chan *http.Request
+
+func (ch Chan) ServeHTTP(w http.ResponseWriter, req *http.Request) {
+    ch &lt;- req
+    fmt.Fprint(w, "notification sent")
+}
+</pre>
+<p>
+Finally, let's say we wanted to present on <code>/args</code> the arguments
+used when invoking the server binary.
+It's easy to write a function to print the arguments.
+</p>
+<pre>
+func ArgServer() {
+    fmt.Println(os.Args)
+}
+</pre>
+<p>
+How do we turn that into an HTTP server?  We could make <code>ArgServer</code>
+a method of some type whose value we ignore, but there's a cleaner way.
+Since we can define a method for any type except pointers and interfaces,
+we can write a method for a function.
+The <code>http</code> package contains this code:
+</p>
+<pre>
+// The HandlerFunc type is an adapter to allow the use of
+// ordinary functions as HTTP handlers.  If f is a function
+// with the appropriate signature, HandlerFunc(f) is a
+// Handler object that calls f.
+type HandlerFunc func(ResponseWriter, *Request)
+
+// ServeHTTP calls f(w, req).
+func (f HandlerFunc) ServeHTTP(w ResponseWriter, req *Request) {
+    f(w, req)
+}
+</pre>
+<p>
+<code>HandlerFunc</code> is a type with a method, <code>ServeHTTP</code>,
+so values of that type can serve HTTP requests.  Look at the implementation
+of the method: the receiver is a function, <code>f</code>, and the method
+calls <code>f</code>.  That may seem odd but it's not that different from, say,
+the receiver being a channel and the method sending on the channel.
+</p>
+<p>
+To make <code>ArgServer</code> into an HTTP server, we first modify it
+to have the right signature.
+</p>
+<pre>
+// Argument server.
+func ArgServer(w http.ResponseWriter, req *http.Request) {
+    fmt.Fprintln(w, os.Args)
+}
+</pre>
+<p>
+<code>ArgServer</code> now has same signature as <code>HandlerFunc</code>,
+so it can be converted to that type to access its methods,
+just as we converted <code>Sequence</code> to <code>IntSlice</code>
+to access <code>IntSlice.Sort</code>.
+The code to set it up is concise:
+</p>
+<pre>
+http.Handle("/args", http.HandlerFunc(ArgServer))
+</pre>
+<p>
+When someone visits the page <code>/args</code>,
+the handler installed at that page has value <code>ArgServer</code>
+and type <code>HandlerFunc</code>.
+The HTTP server will invoke the method <code>ServeHTTP</code>
+of that type, with <code>ArgServer</code> as the receiver, which will in turn call
+<code>ArgServer</code> (via the invocation <code>f(w, req)</code>
+inside <code>HandlerFunc.ServeHTTP</code>).
+The arguments will then be displayed.
+</p>
+<p>
+In this section we have made an HTTP server from a struct, an integer,
+a channel, and a function, all because interfaces are just sets of
+methods, which can be defined for (almost) any type.
+</p>
+
+<h2 id="blank">The blank identifier</h2>
+
+<p>
+We've mentioned the blank identifier a couple of times now, in the context of
+<a href="#for"><code>for</code> <code>range</code> loops</a>
+and <a href="#maps">maps</a>.
+The blank identifier can be assigned or declared with any value of any type, with the
+value discarded harmlessly.
+It's a bit like writing to the Unix <code>/dev/null</code> file:
+it represents a write-only value
+to be used as a place-holder
+where a variable is needed but the actual value is irrelevant.
+It has uses beyond those we've seen already.
+</p>
+
+<h3 id="blank_assign">The blank identifier in multiple assignment</h3>
+
+<p>
+The use of a blank identifier in a <code>for</code> <code>range</code> loop is a
+special case of a general situation: multiple assignment.
+</p>
+
+<p>
+If an assignment requires multiple values on the left side,
+but one of the values will not be used by the program,
+a blank identifier on the left-hand-side of
+the assignment avoids the need
+to create a dummy variable and makes it clear that the
+value is to be discarded.
+For instance, when calling a function that returns
+a value and an error, but only the error is important,
+use the blank identifier to discard the irrelevant value.
+</p>
+
+<pre>
+if _, err := os.Stat(path); os.IsNotExist(err) {
+	fmt.Printf("%s does not exist\n", path)
+}
+</pre>
+
+<p>
+Occasionally you'll see code that discards the error value in order
+to ignore the error; this is terrible practice. Always check error returns;
+they're provided for a reason.
+</p>
+
+<pre>
+// Bad! This code will crash if path does not exist.
+fi, _ := os.Stat(path)
+if fi.IsDir() {
+    fmt.Printf("%s is a directory\n", path)
+}
+</pre>
+
+<h3 id="blank_unused">Unused imports and variables</h3>
+
+<p>
+It is an error to import a package or to declare a variable without using it.
+Unused imports bloat the program and slow compilation,
+while a variable that is initialized but not used is at least
+a wasted computation and perhaps indicative of a
+larger bug.
+When a program is under active development, however,
+unused imports and variables often arise and it can
+be annoying to delete them just to have the compilation proceed,
+only to have them be needed again later.
+The blank identifier provides a workaround.
+</p>
+<p>
+This half-written program has two unused imports
+(<code>fmt</code> and <code>io</code>)
+and an unused variable (<code>fd</code>),
+so it will not compile, but it would be nice to see if the
+code so far is correct.
+</p>
+{{code "/doc/progs/eff_unused1.go" `/package/` `$`}}
+<p>
+To silence complaints about the unused imports, use a
+blank identifier to refer to a symbol from the imported package.
+Similarly, assigning the unused variable <code>fd</code>
+to the blank identifier will silence the unused variable error.
+This version of the program does compile.
+</p>
+{{code "/doc/progs/eff_unused2.go" `/package/` `$`}}
+
+<p>
+By convention, the global declarations to silence import errors
+should come right after the imports and be commented,
+both to make them easy to find and as a reminder to clean things up later.
+</p>
+
+<h3 id="blank_import">Import for side effect</h3>
+
+<p>
+An unused import like <code>fmt</code> or <code>io</code> in the
+previous example should eventually be used or removed:
+blank assignments identify code as a work in progress.
+But sometimes it is useful to import a package only for its
+side effects, without any explicit use.
+For example, during its <code>init</code> function,
+the <code><a href="/pkg/net/http/pprof/">net/http/pprof</a></code>
+package registers HTTP handlers that provide
+debugging information. It has an exported API, but
+most clients need only the handler registration and
+access the data through a web page.
+To import the package only for its side effects, rename the package
+to the blank identifier:
+</p>
+<pre>
+import _ "net/http/pprof"
+</pre>
+<p>
+This form of import makes clear that the package is being
+imported for its side effects, because there is no other possible
+use of the package: in this file, it doesn't have a name.
+(If it did, and we didn't use that name, the compiler would reject the program.)
+</p>
+
+<h3 id="blank_implements">Interface checks</h3>
+
+<p>
+As we saw in the discussion of <a href="#interfaces_and_types">interfaces</a> above,
+a type need not declare explicitly that it implements an interface.
+Instead, a type implements the interface just by implementing the interface's methods.
+In practice, most interface conversions are static and therefore checked at compile time.
+For example, passing an <code>*os.File</code> to a function
+expecting an <code>io.Reader</code> will not compile unless
+<code>*os.File</code> implements the <code>io.Reader</code> interface.
+</p>
+
+<p>
+Some interface checks do happen at run-time, though.
+One instance is in the <code><a href="/pkg/encoding/json/">encoding/json</a></code>
+package, which defines a <code><a href="/pkg/encoding/json/#Marshaler">Marshaler</a></code>
+interface. When the JSON encoder receives a value that implements that interface,
+the encoder invokes the value's marshaling method to convert it to JSON
+instead of doing the standard conversion.
+The encoder checks this property at run time with a <a href="#interface_conversions">type assertion</a> like:
+</p>
+
+<pre>
+m, ok := val.(json.Marshaler)
+</pre>
+
+<p>
+If it's necessary only to ask whether a type implements an interface, without
+actually using the interface itself, perhaps as part of an error check, use the blank
+identifier to ignore the type-asserted value:
+</p>
+
+<pre>
+if _, ok := val.(json.Marshaler); ok {
+    fmt.Printf("value %v of type %T implements json.Marshaler\n", val, val)
+}
+</pre>
+
+<p>
+One place this situation arises is when it is necessary to guarantee within the package implementing the type that
+it actually satisfies the interface.
+If a type—for example,
+<code><a href="/pkg/encoding/json/#RawMessage">json.RawMessage</a></code>—needs
+a custom JSON representation, it should implement
+<code>json.Marshaler</code>, but there are no static conversions that would
+cause the compiler to verify this automatically.
+If the type inadvertently fails to satisfy the interface, the JSON encoder will still work,
+but will not use the custom implementation.
+To guarantee that the implementation is correct,
+a global declaration using the blank identifier can be used in the package:
+</p>
+<pre>
+var _ json.Marshaler = (*RawMessage)(nil)
+</pre>
+<p>
+In this declaration, the assignment involving a conversion of a
+<code>*RawMessage</code> to a <code>Marshaler</code>
+requires that <code>*RawMessage</code> implements <code>Marshaler</code>,
+and that property will be checked at compile time.
+Should the <code>json.Marshaler</code> interface change, this package
+will no longer compile and we will be on notice that it needs to be updated.
+</p>
+
+<p>
+The appearance of the blank identifier in this construct indicates that
+the declaration exists only for the type checking,
+not to create a variable.
+Don't do this for every type that satisfies an interface, though.
+By convention, such declarations are only used
+when there are no static conversions already present in the code,
+which is a rare event.
+</p>
+
+
+<h2 id="embedding">Embedding</h2>
+
+<p>
+Go does not provide the typical, type-driven notion of subclassing,
+but it does have the ability to &ldquo;borrow&rdquo; pieces of an
+implementation by <em>embedding</em> types within a struct or
+interface.
+</p>
+<p>
+Interface embedding is very simple.
+We've mentioned the <code>io.Reader</code> and <code>io.Writer</code> interfaces before;
+here are their definitions.
+</p>
+<pre>
+type Reader interface {
+    Read(p []byte) (n int, err error)
+}
+
+type Writer interface {
+    Write(p []byte) (n int, err error)
+}
+</pre>
+<p>
+The <code>io</code> package also exports several other interfaces
+that specify objects that can implement several such methods.
+For instance, there is <code>io.ReadWriter</code>, an interface
+containing both <code>Read</code> and <code>Write</code>.
+We could specify <code>io.ReadWriter</code> by listing the
+two methods explicitly, but it's easier and more evocative
+to embed the two interfaces to form the new one, like this:
+</p>
+<pre>
+// ReadWriter is the interface that combines the Reader and Writer interfaces.
+type ReadWriter interface {
+    Reader
+    Writer
+}
+</pre>
+<p>
+This says just what it looks like: A <code>ReadWriter</code> can do
+what a <code>Reader</code> does <em>and</em> what a <code>Writer</code>
+does; it is a union of the embedded interfaces.
+Only interfaces can be embedded within interfaces.
+</p>
+<p>
+The same basic idea applies to structs, but with more far-reaching
+implications.  The <code>bufio</code> package has two struct types,
+<code>bufio.Reader</code> and <code>bufio.Writer</code>, each of
+which of course implements the analogous interfaces from package
+<code>io</code>.
+And <code>bufio</code> also implements a buffered reader/writer,
+which it does by combining a reader and a writer into one struct
+using embedding: it lists the types within the struct
+but does not give them field names.
+</p>
+<pre>
+// ReadWriter stores pointers to a Reader and a Writer.
+// It implements io.ReadWriter.
+type ReadWriter struct {
+    *Reader  // *bufio.Reader
+    *Writer  // *bufio.Writer
+}
+</pre>
+<p>
+The embedded elements are pointers to structs and of course
+must be initialized to point to valid structs before they
+can be used.
+The <code>ReadWriter</code> struct could be written as
+</p>
+<pre>
+type ReadWriter struct {
+    reader *Reader
+    writer *Writer
+}
+</pre>
+<p>
+but then to promote the methods of the fields and to
+satisfy the <code>io</code> interfaces, we would also need
+to provide forwarding methods, like this:
+</p>
+<pre>
+func (rw *ReadWriter) Read(p []byte) (n int, err error) {
+    return rw.reader.Read(p)
+}
+</pre>
+<p>
+By embedding the structs directly, we avoid this bookkeeping.
+The methods of embedded types come along for free, which means that <code>bufio.ReadWriter</code>
+not only has the methods of <code>bufio.Reader</code> and <code>bufio.Writer</code>,
+it also satisfies all three interfaces:
+<code>io.Reader</code>,
+<code>io.Writer</code>, and
+<code>io.ReadWriter</code>.
+</p>
+<p>
+There's an important way in which embedding differs from subclassing.  When we embed a type,
+the methods of that type become methods of the outer type,
+but when they are invoked the receiver of the method is the inner type, not the outer one.
+In our example, when the <code>Read</code> method of a <code>bufio.ReadWriter</code> is
+invoked, it has exactly the same effect as the forwarding method written out above;
+the receiver is the <code>reader</code> field of the <code>ReadWriter</code>, not the
+<code>ReadWriter</code> itself.
+</p>
+<p>
+Embedding can also be a simple convenience.
+This example shows an embedded field alongside a regular, named field.
+</p>
+<pre>
+type Job struct {
+    Command string
+    *log.Logger
+}
+</pre>
+<p>
+The <code>Job</code> type now has the <code>Print</code>, <code>Printf</code>, <code>Println</code>
+and other
+methods of <code>*log.Logger</code>.  We could have given the <code>Logger</code>
+a field name, of course, but it's not necessary to do so.  And now, once
+initialized, we can
+log to the <code>Job</code>:
+</p>
+<pre>
+job.Println("starting now...")
+</pre>
+<p>
+The <code>Logger</code> is a regular field of the <code>Job</code> struct,
+so we can initialize it in the usual way inside the constructor for <code>Job</code>, like this,
+</p>
+<pre>
+func NewJob(command string, logger *log.Logger) *Job {
+    return &amp;Job{command, logger}
+}
+</pre>
+<p>
+or with a composite literal,
+</p>
+<pre>
+job := &amp;Job{command, log.New(os.Stderr, "Job: ", log.Ldate)}
+</pre>
+<p>
+If we need to refer to an embedded field directly, the type name of the field,
+ignoring the package qualifier, serves as a field name, as it did
+in the <code>Read</code> method of our <code>ReadWriter</code> struct.
+Here, if we needed to access the
+<code>*log.Logger</code> of a <code>Job</code> variable <code>job</code>,
+we would write <code>job.Logger</code>,
+which would be useful if we wanted to refine the methods of <code>Logger</code>.
+</p>
+<pre>
+func (job *Job) Printf(format string, args ...interface{}) {
+    job.Logger.Printf("%q: %s", job.Command, fmt.Sprintf(format, args...))
+}
+</pre>
+<p>
+Embedding types introduces the problem of name conflicts but the rules to resolve
+them are simple.
+First, a field or method <code>X</code> hides any other item <code>X</code> in a more deeply
+nested part of the type.
+If <code>log.Logger</code> contained a field or method called <code>Command</code>, the <code>Command</code> field
+of <code>Job</code> would dominate it.
+</p>
+<p>
+Second, if the same name appears at the same nesting level, it is usually an error;
+it would be erroneous to embed <code>log.Logger</code> if the <code>Job</code> struct
+contained another field or method called <code>Logger</code>.
+However, if the duplicate name is never mentioned in the program outside the type definition, it is OK.
+This qualification provides some protection against changes made to types embedded from outside; there
+is no problem if a field is added that conflicts with another field in another subtype if neither field
+is ever used.
+</p>
+
+
+<h2 id="concurrency">Concurrency</h2>
+
+<h3 id="sharing">Share by communicating</h3>
+
+<p>
+Concurrent programming is a large topic and there is space only for some
+Go-specific highlights here.
+</p>
+<p>
+Concurrent programming in many environments is made difficult by the
+subtleties required to implement correct access to shared variables.  Go encourages
+a different approach in which shared values are passed around on channels
+and, in fact, never actively shared by separate threads of execution.
+Only one goroutine has access to the value at any given time.
+Data races cannot occur, by design.
+To encourage this way of thinking we have reduced it to a slogan:
+</p>
+<blockquote>
+Do not communicate by sharing memory;
+instead, share memory by communicating.
+</blockquote>
+<p>
+This approach can be taken too far.  Reference counts may be best done
+by putting a mutex around an integer variable, for instance.  But as a
+high-level approach, using channels to control access makes it easier
+to write clear, correct programs.
+</p>
+<p>
+One way to think about this model is to consider a typical single-threaded
+program running on one CPU. It has no need for synchronization primitives.
+Now run another such instance; it too needs no synchronization.  Now let those
+two communicate; if the communication is the synchronizer, there's still no need
+for other synchronization.  Unix pipelines, for example, fit this model
+perfectly.  Although Go's approach to concurrency originates in Hoare's
+Communicating Sequential Processes (CSP),
+it can also be seen as a type-safe generalization of Unix pipes.
+</p>
+
+<h3 id="goroutines">Goroutines</h3>
+
+<p>
+They're called <em>goroutines</em> because the existing
+terms&mdash;threads, coroutines, processes, and so on&mdash;convey
+inaccurate connotations.  A goroutine has a simple model: it is a
+function executing concurrently with other goroutines in the same
+address space.  It is lightweight, costing little more than the
+allocation of stack space.
+And the stacks start small, so they are cheap, and grow
+by allocating (and freeing) heap storage as required.
+</p>
+<p>
+Goroutines are multiplexed onto multiple OS threads so if one should
+block, such as while waiting for I/O, others continue to run.  Their
+design hides many of the complexities of thread creation and
+management.
+</p>
+<p>
+Prefix a function or method call with the <code>go</code>
+keyword to run the call in a new goroutine.
+When the call completes, the goroutine
+exits, silently.  (The effect is similar to the Unix shell's
+<code>&amp;</code> notation for running a command in the
+background.)
+</p>
+<pre>
+go list.Sort()  // run list.Sort concurrently; don't wait for it.
+</pre>
+<p>
+A function literal can be handy in a goroutine invocation.
+</p>
+<pre>
+func Announce(message string, delay time.Duration) {
+    go func() {
+        time.Sleep(delay)
+        fmt.Println(message)
+    }()  // Note the parentheses - must call the function.
+}
+</pre>
+<p>
+In Go, function literals are closures: the implementation makes
+sure the variables referred to by the function survive as long as they are active.
+</p>
+<p>
+These examples aren't too practical because the functions have no way of signaling
+completion.  For that, we need channels.
+</p>
+
+<h3 id="channels">Channels</h3>
+
+<p>
+Like maps, channels are allocated with <code>make</code>, and
+the resulting value acts as a reference to an underlying data structure.
+If an optional integer parameter is provided, it sets the buffer size for the channel.
+The default is zero, for an unbuffered or synchronous channel.
+</p>
+<pre>
+ci := make(chan int)            // unbuffered channel of integers
+cj := make(chan int, 0)         // unbuffered channel of integers
+cs := make(chan *os.File, 100)  // buffered channel of pointers to Files
+</pre>
+<p>
+Unbuffered channels combine communication&mdash;the exchange of a value&mdash;with
+synchronization&mdash;guaranteeing that two calculations (goroutines) are in
+a known state.
+</p>
+<p>
+There are lots of nice idioms using channels.  Here's one to get us started.
+In the previous section we launched a sort in the background. A channel
+can allow the launching goroutine to wait for the sort to complete.
+</p>
+<pre>
+c := make(chan int)  // Allocate a channel.
+// Start the sort in a goroutine; when it completes, signal on the channel.
+go func() {
+    list.Sort()
+    c &lt;- 1  // Send a signal; value does not matter.
+}()
+doSomethingForAWhile()
+&lt;-c   // Wait for sort to finish; discard sent value.
+</pre>
+<p>
+Receivers always block until there is data to receive.
+If the channel is unbuffered, the sender blocks until the receiver has
+received the value.
+If the channel has a buffer, the sender blocks only until the
+value has been copied to the buffer; if the buffer is full, this
+means waiting until some receiver has retrieved a value.
+</p>
+<p>
+A buffered channel can be used like a semaphore, for instance to
+limit throughput.  In this example, incoming requests are passed
+to <code>handle</code>, which sends a value into the channel, processes
+the request, and then receives a value from the channel
+to ready the &ldquo;semaphore&rdquo; for the next consumer.
+The capacity of the channel buffer limits the number of
+simultaneous calls to <code>process</code>.
+</p>
+<pre>
+var sem = make(chan int, MaxOutstanding)
+
+func handle(r *Request) {
+    sem &lt;- 1    // Wait for active queue to drain.
+    process(r)  // May take a long time.
+    &lt;-sem       // Done; enable next request to run.
+}
+
+func Serve(queue chan *Request) {
+    for {
+        req := &lt;-queue
+        go handle(req)  // Don't wait for handle to finish.
+    }
+}
+</pre>
+
+<p>
+Once <code>MaxOutstanding</code> handlers are executing <code>process</code>,
+any more will block trying to send into the filled channel buffer,
+until one of the existing handlers finishes and receives from the buffer.
+</p>
+
+<p>
+This design has a problem, though: <code>Serve</code>
+creates a new goroutine for
+every incoming request, even though only <code>MaxOutstanding</code>
+of them can run at any moment.
+As a result, the program can consume unlimited resources if the requests come in too fast.
+We can address that deficiency by changing <code>Serve</code> to
+gate the creation of the goroutines.
+Here's an obvious solution, but beware it has a bug we'll fix subsequently:
+</p>
+
+<pre>
+func Serve(queue chan *Request) {
+    for req := range queue {
+        sem &lt;- 1
+        go func() {
+            process(req) // Buggy; see explanation below.
+            &lt;-sem
+        }()
+    }
+}</pre>
+
+<p>
+The bug is that in a Go <code>for</code> loop, the loop variable
+is reused for each iteration, so the <code>req</code>
+variable is shared across all goroutines.
+That's not what we want.
+We need to make sure that <code>req</code> is unique for each goroutine.
+Here's one way to do that, passing the value of <code>req</code> as an argument
+to the closure in the goroutine:
+</p>
+
+<pre>
+func Serve(queue chan *Request) {
+    for req := range queue {
+        sem &lt;- 1
+        go func(req *Request) {
+            process(req)
+            &lt;-sem
+        }(req)
+    }
+}</pre>
+
+<p>
+Compare this version with the previous to see the difference in how
+the closure is declared and run.
+Another solution is just to create a new variable with the same
+name, as in this example:
+</p>
+
+<pre>
+func Serve(queue chan *Request) {
+    for req := range queue {
+        req := req // Create new instance of req for the goroutine.
+        sem &lt;- 1
+        go func() {
+            process(req)
+            &lt;-sem
+        }()
+    }
+}</pre>
+
+<p>
+It may seem odd to write
+</p>
+
+<pre>
+req := req
+</pre>
+
+<p>
+but it's legal and idiomatic in Go to do this.
+You get a fresh version of the variable with the same name, deliberately
+shadowing the loop variable locally but unique to each goroutine.
+</p>
+
+<p>
+Going back to the general problem of writing the server,
+another approach that manages resources well is to start a fixed
+number of <code>handle</code> goroutines all reading from the request
+channel.
+The number of goroutines limits the number of simultaneous
+calls to <code>process</code>.
+This <code>Serve</code> function also accepts a channel on which
+it will be told to exit; after launching the goroutines it blocks
+receiving from that channel.
+</p>
+
+<pre>
+func handle(queue chan *Request) {
+    for r := range queue {
+        process(r)
+    }
+}
+
+func Serve(clientRequests chan *Request, quit chan bool) {
+    // Start handlers
+    for i := 0; i &lt; MaxOutstanding; i++ {
+        go handle(clientRequests)
+    }
+    &lt;-quit  // Wait to be told to exit.
+}
+</pre>
+
+<h3 id="chan_of_chan">Channels of channels</h3>
+<p>
+One of the most important properties of Go is that
+a channel is a first-class value that can be allocated and passed
+around like any other.  A common use of this property is
+to implement safe, parallel demultiplexing.
+</p>
+<p>
+In the example in the previous section, <code>handle</code> was
+an idealized handler for a request but we didn't define the
+type it was handling.  If that type includes a channel on which
+to reply, each client can provide its own path for the answer.
+Here's a schematic definition of type <code>Request</code>.
+</p>
+<pre>
+type Request struct {
+    args        []int
+    f           func([]int) int
+    resultChan  chan int
+}
+</pre>
+<p>
+The client provides a function and its arguments, as well as
+a channel inside the request object on which to receive the answer.
+</p>
+<pre>
+func sum(a []int) (s int) {
+    for _, v := range a {
+        s += v
+    }
+    return
+}
+
+request := &amp;Request{[]int{3, 4, 5}, sum, make(chan int)}
+// Send request
+clientRequests &lt;- request
+// Wait for response.
+fmt.Printf("answer: %d\n", &lt;-request.resultChan)
+</pre>
+<p>
+On the server side, the handler function is the only thing that changes.
+</p>
+<pre>
+func handle(queue chan *Request) {
+    for req := range queue {
+        req.resultChan &lt;- req.f(req.args)
+    }
+}
+</pre>
+<p>
+There's clearly a lot more to do to make it realistic, but this
+code is a framework for a rate-limited, parallel, non-blocking RPC
+system, and there's not a mutex in sight.
+</p>
+
+<h3 id="parallel">Parallelization</h3>
+<p>
+Another application of these ideas is to parallelize a calculation
+across multiple CPU cores.  If the calculation can be broken into
+separate pieces that can execute independently, it can be parallelized,
+with a channel to signal when each piece completes.
+</p>
+<p>
+Let's say we have an expensive operation to perform on a vector of items,
+and that the value of the operation on each item is independent,
+as in this idealized example.
+</p>
+<pre>
+type Vector []float64
+
+// Apply the operation to v[i], v[i+1] ... up to v[n-1].
+func (v Vector) DoSome(i, n int, u Vector, c chan int) {
+    for ; i &lt; n; i++ {
+        v[i] += u.Op(v[i])
+    }
+    c &lt;- 1    // signal that this piece is done
+}
+</pre>
+<p>
+We launch the pieces independently in a loop, one per CPU.
+They can complete in any order but it doesn't matter; we just
+count the completion signals by draining the channel after
+launching all the goroutines.
+</p>
+<pre>
+const numCPU = 4 // number of CPU cores
+
+func (v Vector) DoAll(u Vector) {
+    c := make(chan int, numCPU)  // Buffering optional but sensible.
+    for i := 0; i &lt; numCPU; i++ {
+        go v.DoSome(i*len(v)/numCPU, (i+1)*len(v)/numCPU, u, c)
+    }
+    // Drain the channel.
+    for i := 0; i &lt; numCPU; i++ {
+        &lt;-c    // wait for one task to complete
+    }
+    // All done.
+}
+</pre>
+<p>
+Rather than create a constant value for numCPU, we can ask the runtime what
+value is appropriate.
+The function <code><a href="/pkg/runtime#NumCPU">runtime.NumCPU</a></code>
+returns the number of hardware CPU cores in the machine, so we could write
+</p>
+<pre>
+var numCPU = runtime.NumCPU()
+</pre>
+<p>
+There is also a function
+<code><a href="/pkg/runtime#GOMAXPROCS">runtime.GOMAXPROCS</a></code>,
+which reports (or sets)
+the user-specified number of cores that a Go program can have running
+simultaneously.
+It defaults to the value of <code>runtime.NumCPU</code> but can be
+overridden by setting the similarly named shell environment variable
+or by calling the function with a positive number.  Calling it with
+zero just queries the value.
+Therefore if we want to honor the user's resource request, we should write
+</p>
+<pre>
+var numCPU = runtime.GOMAXPROCS(0)
+</pre>
+<p>
+Be sure not to confuse the ideas of concurrency—structuring a program
+as independently executing components—and parallelism—executing
+calculations in parallel for efficiency on multiple CPUs.
+Although the concurrency features of Go can make some problems easy
+to structure as parallel computations, Go is a concurrent language,
+not a parallel one, and not all parallelization problems fit Go's model.
+For a discussion of the distinction, see the talk cited in
+<a href="//blog.golang.org/2013/01/concurrency-is-not-parallelism.html">this
+blog post</a>.
+
+<h3 id="leaky_buffer">A leaky buffer</h3>
+
+<p>
+The tools of concurrent programming can even make non-concurrent
+ideas easier to express.  Here's an example abstracted from an RPC
+package.  The client goroutine loops receiving data from some source,
+perhaps a network.  To avoid allocating and freeing buffers, it keeps
+a free list, and uses a buffered channel to represent it.  If the
+channel is empty, a new buffer gets allocated.
+Once the message buffer is ready, it's sent to the server on
+<code>serverChan</code>.
+</p>
+<pre>
+var freeList = make(chan *Buffer, 100)
+var serverChan = make(chan *Buffer)
+
+func client() {
+    for {
+        var b *Buffer
+        // Grab a buffer if available; allocate if not.
+        select {
+        case b = &lt;-freeList:
+            // Got one; nothing more to do.
+        default:
+            // None free, so allocate a new one.
+            b = new(Buffer)
+        }
+        load(b)              // Read next message from the net.
+        serverChan &lt;- b      // Send to server.
+    }
+}
+</pre>
+<p>
+The server loop receives each message from the client, processes it,
+and returns the buffer to the free list.
+</p>
+<pre>
+func server() {
+    for {
+        b := &lt;-serverChan    // Wait for work.
+        process(b)
+        // Reuse buffer if there's room.
+        select {
+        case freeList &lt;- b:
+            // Buffer on free list; nothing more to do.
+        default:
+            // Free list full, just carry on.
+        }
+    }
+}
+</pre>
+<p>
+The client attempts to retrieve a buffer from <code>freeList</code>;
+if none is available, it allocates a fresh one.
+The server's send to <code>freeList</code> puts <code>b</code> back
+on the free list unless the list is full, in which case the
+buffer is dropped on the floor to be reclaimed by
+the garbage collector.
+(The <code>default</code> clauses in the <code>select</code>
+statements execute when no other case is ready,
+meaning that the <code>selects</code> never block.)
+This implementation builds a leaky bucket free list
+in just a few lines, relying on the buffered channel and
+the garbage collector for bookkeeping.
+</p>
+
+<h2 id="errors">Errors</h2>
+
+<p>
+Library routines must often return some sort of error indication to
+the caller.
+As mentioned earlier, Go's multivalue return makes it
+easy to return a detailed error description alongside the normal
+return value.
+It is good style to use this feature to provide detailed error information.
+For example, as we'll see, <code>os.Open</code> doesn't
+just return a <code>nil</code> pointer on failure, it also returns an
+error value that describes what went wrong.
+</p>
+
+<p>
+By convention, errors have type <code>error</code>,
+a simple built-in interface.
+</p>
+<pre>
+type error interface {
+    Error() string
+}
+</pre>
+<p>
+A library writer is free to implement this interface with a
+richer model under the covers, making it possible not only
+to see the error but also to provide some context.
+As mentioned, alongside the usual <code>*os.File</code>
+return value, <code>os.Open</code> also returns an
+error value.
+If the file is opened successfully, the error will be <code>nil</code>,
+but when there is a problem, it will hold an
+<code>os.PathError</code>:
+</p>
+<pre>
+// PathError records an error and the operation and
+// file path that caused it.
+type PathError struct {
+    Op string    // "open", "unlink", etc.
+    Path string  // The associated file.
+    Err error    // Returned by the system call.
+}
+
+func (e *PathError) Error() string {
+    return e.Op + " " + e.Path + ": " + e.Err.Error()
+}
+</pre>
+<p>
+<code>PathError</code>'s <code>Error</code> generates
+a string like this:
+</p>
+<pre>
+open /etc/passwx: no such file or directory
+</pre>
+<p>
+Such an error, which includes the problematic file name, the
+operation, and the operating system error it triggered, is useful even
+if printed far from the call that caused it;
+it is much more informative than the plain
+"no such file or directory".
+</p>
+
+<p>
+When feasible, error strings should identify their origin, such as by having
+a prefix naming the operation or package that generated the error.  For example, in package
+<code>image</code>, the string representation for a decoding error due to an
+unknown format is "image: unknown format".
+</p>
+
+<p>
+Callers that care about the precise error details can
+use a type switch or a type assertion to look for specific
+errors and extract details.  For <code>PathErrors</code>
+this might include examining the internal <code>Err</code>
+field for recoverable failures.
+</p>
+
+<pre>
+for try := 0; try &lt; 2; try++ {
+    file, err = os.Create(filename)
+    if err == nil {
+        return
+    }
+    if e, ok := err.(*os.PathError); ok &amp;&amp; e.Err == syscall.ENOSPC {
+        deleteTempFiles()  // Recover some space.
+        continue
+    }
+    return
+}
+</pre>
+
+<p>
+The second <code>if</code> statement here is another <a href="#interface_conversions">type assertion</a>.
+If it fails, <code>ok</code> will be false, and <code>e</code>
+will be <code>nil</code>.
+If it succeeds,  <code>ok</code> will be true, which means the
+error was of type <code>*os.PathError</code>, and then so is <code>e</code>,
+which we can examine for more information about the error.
+</p>
+
+<h3 id="panic">Panic</h3>
+
+<p>
+The usual way to report an error to a caller is to return an
+<code>error</code> as an extra return value.  The canonical
+<code>Read</code> method is a well-known instance; it returns a byte
+count and an <code>error</code>.  But what if the error is
+unrecoverable?  Sometimes the program simply cannot continue.
+</p>
+
+<p>
+For this purpose, there is a built-in function <code>panic</code>
+that in effect creates a run-time error that will stop the program
+(but see the next section).  The function takes a single argument
+of arbitrary type&mdash;often a string&mdash;to be printed as the
+program dies.  It's also a way to indicate that something impossible has
+happened, such as exiting an infinite loop.
+</p>
+
+
+<pre>
+// A toy implementation of cube root using Newton's method.
+func CubeRoot(x float64) float64 {
+    z := x/3   // Arbitrary initial value
+    for i := 0; i &lt; 1e6; i++ {
+        prevz := z
+        z -= (z*z*z-x) / (3*z*z)
+        if veryClose(z, prevz) {
+            return z
+        }
+    }
+    // A million iterations has not converged; something is wrong.
+    panic(fmt.Sprintf("CubeRoot(%g) did not converge", x))
+}
+</pre>
+
+<p>
+This is only an example but real library functions should
+avoid <code>panic</code>.  If the problem can be masked or worked
+around, it's always better to let things continue to run rather
+than taking down the whole program.  One possible counterexample
+is during initialization: if the library truly cannot set itself up,
+it might be reasonable to panic, so to speak.
+</p>
+
+<pre>
+var user = os.Getenv("USER")
+
+func init() {
+    if user == "" {
+        panic("no value for $USER")
+    }
+}
+</pre>
+
+<h3 id="recover">Recover</h3>
+
+<p>
+When <code>panic</code> is called, including implicitly for run-time
+errors such as indexing a slice out of bounds or failing a type
+assertion, it immediately stops execution of the current function
+and begins unwinding the stack of the goroutine, running any deferred
+functions along the way.  If that unwinding reaches the top of the
+goroutine's stack, the program dies.  However, it is possible to
+use the built-in function <code>recover</code> to regain control
+of the goroutine and resume normal execution.
+</p>
+
+<p>
+A call to <code>recover</code> stops the unwinding and returns the
+argument passed to <code>panic</code>.  Because the only code that
+runs while unwinding is inside deferred functions, <code>recover</code>
+is only useful inside deferred functions.
+</p>
+
+<p>
+One application of <code>recover</code> is to shut down a failing goroutine
+inside a server without killing the other executing goroutines.
+</p>
+
+<pre>
+func server(workChan &lt;-chan *Work) {
+    for work := range workChan {
+        go safelyDo(work)
+    }
+}
+
+func safelyDo(work *Work) {
+    defer func() {
+        if err := recover(); err != nil {
+            log.Println("work failed:", err)
+        }
+    }()
+    do(work)
+}
+</pre>
+
+<p>
+In this example, if <code>do(work)</code> panics, the result will be
+logged and the goroutine will exit cleanly without disturbing the
+others.  There's no need to do anything else in the deferred closure;
+calling <code>recover</code> handles the condition completely.
+</p>
+
+<p>
+Because <code>recover</code> always returns <code>nil</code> unless called directly
+from a deferred function, deferred code can call library routines that themselves
+use <code>panic</code> and <code>recover</code> without failing.  As an example,
+the deferred function in <code>safelyDo</code> might call a logging function before
+calling <code>recover</code>, and that logging code would run unaffected
+by the panicking state.
+</p>
+
+<p>
+With our recovery pattern in place, the <code>do</code>
+function (and anything it calls) can get out of any bad situation
+cleanly by calling <code>panic</code>.  We can use that idea to
+simplify error handling in complex software.  Let's look at an
+idealized version of a <code>regexp</code> package, which reports
+parsing errors by calling <code>panic</code> with a local
+error type.  Here's the definition of <code>Error</code>,
+an <code>error</code> method, and the <code>Compile</code> function.
+</p>
+
+<pre>
+// Error is the type of a parse error; it satisfies the error interface.
+type Error string
+func (e Error) Error() string {
+    return string(e)
+}
+
+// error is a method of *Regexp that reports parsing errors by
+// panicking with an Error.
+func (regexp *Regexp) error(err string) {
+    panic(Error(err))
+}
+
+// Compile returns a parsed representation of the regular expression.
+func Compile(str string) (regexp *Regexp, err error) {
+    regexp = new(Regexp)
+    // doParse will panic if there is a parse error.
+    defer func() {
+        if e := recover(); e != nil {
+            regexp = nil    // Clear return value.
+            err = e.(Error) // Will re-panic if not a parse error.
+        }
+    }()
+    return regexp.doParse(str), nil
+}
+</pre>
+
+<p>
+If <code>doParse</code> panics, the recovery block will set the
+return value to <code>nil</code>&mdash;deferred functions can modify
+named return values.  It will then check, in the assignment
+to <code>err</code>, that the problem was a parse error by asserting
+that it has the local type <code>Error</code>.
+If it does not, the type assertion will fail, causing a run-time error
+that continues the stack unwinding as though nothing had interrupted
+it.
+This check means that if something unexpected happens, such
+as an index out of bounds, the code will fail even though we
+are using <code>panic</code> and <code>recover</code> to handle
+parse errors.
+</p>
+
+<p>
+With error handling in place, the <code>error</code> method (because it's a
+method bound to a type, it's fine, even natural, for it to have the same name
+as the builtin <code>error</code> type)
+makes it easy to report parse errors without worrying about unwinding
+the parse stack by hand:
+</p>
+
+<pre>
+if pos == 0 {
+    re.error("'*' illegal at start of expression")
+}
+</pre>
+
+<p>
+Useful though this pattern is, it should be used only within a package.
+<code>Parse</code> turns its internal <code>panic</code> calls into
+<code>error</code> values; it does not expose <code>panics</code>
+to its client.  That is a good rule to follow.
+</p>
+
+<p>
+By the way, this re-panic idiom changes the panic value if an actual
+error occurs.  However, both the original and new failures will be
+presented in the crash report, so the root cause of the problem will
+still be visible.  Thus this simple re-panic approach is usually
+sufficient&mdash;it's a crash after all&mdash;but if you want to
+display only the original value, you can write a little more code to
+filter unexpected problems and re-panic with the original error.
+That's left as an exercise for the reader.
+</p>
+
+
+<h2 id="web_server">A web server</h2>
+
+<p>
+Let's finish with a complete Go program, a web server.
+This one is actually a kind of web re-server.
+Google provides a service at <code>chart.apis.google.com</code>
+that does automatic formatting of data into charts and graphs.
+It's hard to use interactively, though,
+because you need to put the data into the URL as a query.
+The program here provides a nicer interface to one form of data: given a short piece of text,
+it calls on the chart server to produce a QR code, a matrix of boxes that encode the
+text.
+That image can be grabbed with your cell phone's camera and interpreted as,
+for instance, a URL, saving you typing the URL into the phone's tiny keyboard.
+</p>
+<p>
+Here's the complete program.
+An explanation follows.
+</p>
+{{code "/doc/progs/eff_qr.go" `/package/` `$`}}
+<p>
+The pieces up to <code>main</code> should be easy to follow.
+The one flag sets a default HTTP port for our server.  The template
+variable <code>templ</code> is where the fun happens. It builds an HTML template
+that will be executed by the server to display the page; more about
+that in a moment.
+</p>
+<p>
+The <code>main</code> function parses the flags and, using the mechanism
+we talked about above, binds the function <code>QR</code> to the root path
+for the server.  Then <code>http.ListenAndServe</code> is called to start the
+server; it blocks while the server runs.
+</p>
+<p>
+<code>QR</code> just receives the request, which contains form data, and
+executes the template on the data in the form value named <code>s</code>.
+</p>
+<p>
+The template package <code>html/template</code> is powerful;
+this program just touches on its capabilities.
+In essence, it rewrites a piece of HTML text on the fly by substituting elements derived
+from data items passed to <code>templ.Execute</code>, in this case the
+form value.
+Within the template text (<code>templateStr</code>),
+double-brace-delimited pieces denote template actions.
+The piece from <code>{{html "{{if .}}"}}</code>
+to <code>{{html "{{end}}"}}</code> executes only if the value of the current data item, called <code>.</code> (dot),
+is non-empty.
+That is, when the string is empty, this piece of the template is suppressed.
+</p>
+<p>
+The two snippets <code>{{html "{{.}}"}}</code> say to show the data presented to
+the template—the query string—on the web page.
+The HTML template package automatically provides appropriate escaping so the
+text is safe to display.
+</p>
+<p>
+The rest of the template string is just the HTML to show when the page loads.
+If this is too quick an explanation, see the <a href="/pkg/html/template/">documentation</a>
+for the template package for a more thorough discussion.
+</p>
+<p>
+And there you have it: a useful web server in a few lines of code plus some
+data-driven HTML text.
+Go is powerful enough to make a lot happen in a few lines.
+</p>
+
+<!--
+TODO
+<pre>
+verifying implementation
+type Color uint32
+
+// Check that Color implements image.Color and image.Image
+var _ image.Color = Black
+var _ image.Image = Black
+</pre>
+-->
diff --git a/_content/doc/gccgo_contribute.html b/_content/doc/gccgo_contribute.html
new file mode 100644
index 0000000..395902d
--- /dev/null
+++ b/_content/doc/gccgo_contribute.html
@@ -0,0 +1,112 @@
+<!--{
+	"Title": "Contributing to the gccgo frontend"
+}-->
+
+<h2>Introduction</h2>
+
+<p>
+These are some notes on contributing to the gccgo frontend for GCC.
+For information on contributing to parts of Go other than gccgo,
+see <a href="/doc/contribute.html">Contributing to the Go project</a>.  For
+information on building gccgo for yourself,
+see <a href="/doc/gccgo_install.html">Setting up and using gccgo</a>.
+For more of the gritty details on the process of doing development
+with the gccgo frontend,
+see <a href="https://go.googlesource.com/gofrontend/+/master/HACKING">the
+file HACKING</a> in the gofrontend repository.
+</p>
+
+<h2>Legal Prerequisites</h2>
+
+<p>
+You must follow the <a href="/doc/contribute.html#copyright">Go copyright
+rules</a> for all changes to the gccgo frontend and the associated
+libgo library.  Code that is part of GCC rather than gccgo must follow
+the general <a href="https://gcc.gnu.org/contribute.html">GCC
+contribution rules</a>.
+</p>
+
+<h2>Code</h2>
+
+<p>
+The master sources for the gccgo frontend may be found at
+<a href="https://go.googlesource.com/gofrontend">https://go.googlesource.com/gofrontend</a>.
+They are mirrored
+at <a href="https://github.com/golang/gofrontend">https://github.com/golang/gofrontend</a>.
+The master sources are not buildable by themselves, but only in
+conjunction with GCC (in the future, other compilers may be
+supported).  Changes made to the gccgo frontend are also applied to
+the GCC source code repository hosted at <code>gcc.gnu.org</code>.  In
+the <code>gofrontend</code> repository, the <code>go</code> directory
+is mirrored to the <code>gcc/go/gofrontend</code> directory in the GCC
+repository, and the <code>gofrontend</code> <code>libgo</code>
+directory is mirrored to the GCC <code>libgo</code> directory.  In
+addition, the <code>test</code> directory
+from <a href="//go.googlesource.com/go">the main Go repository</a>
+is mirrored to the <code>gcc/testsuite/go.test/test</code> directory
+in the GCC repository.
+</p>
+
+<p>
+Changes to these directories always flow from the master sources to
+the GCC repository.  The files should never be changed in the GCC
+repository except by changing them in the master sources and mirroring
+them.
+</p>
+
+<p>
+The gccgo frontend is written in C++.
+It follows the GNU and GCC coding standards for C++.
+In writing code for the frontend, follow the formatting of the
+surrounding code.
+Almost all GCC-specific code is not in the frontend proper and is
+instead in the GCC sources in the <code>gcc/go</code> directory.
+</p>
+
+<p>
+The run-time library for gccgo is mostly the same as the library
+in <a href="//go.googlesource.com/go">the main Go repository</a>.
+The library code in the Go repository is periodically merged into
+the <code>libgo/go</code> directory of the <code>gofrontend</code> and
+then the GCC repositories, using the shell
+script <code>libgo/merge.sh</code>.  Accordingly, most library changes
+should be made in the main Go repository.  The files outside
+of <code>libgo/go</code> are gccgo-specific; that said, some of the
+files in <code>libgo/runtime</code> are based on files
+in <code>src/runtime</code> in the main Go repository.
+</p>
+
+<h2>Testing</h2>
+
+<p>
+All patches must be tested.  A patch that introduces new failures is
+not acceptable.
+</p>
+
+<p>
+To run the gccgo test suite, run <code>make check-go</code> in your
+build directory.  This will run various tests
+under <code>gcc/testsuite/go.*</code> and will also run
+the <code>libgo</code> testsuite.  This copy of the tests from the
+main Go repository is run using the DejaGNU script found
+in <code>gcc/testsuite/go.test/go-test.exp</code>.
+</p>
+
+<p>
+Most new tests should be submitted to the main Go repository for later
+mirroring into the GCC repository.  If there is a need for specific
+tests for gccgo, they should go in
+the <code>gcc/testsuite/go.go-torture</code>
+or <code>gcc/testsuite/go.dg</code> directories in the GCC repository.
+</p>
+
+<h2>Submitting Changes</h2>
+
+<p>
+Changes to the Go frontend should follow the same process as for the
+main Go repository, only for the <code>gofrontend</code> project and
+the <code>gofrontend-dev@googlegroups.com</code> mailing list
+rather than the <code>go</code> project and the
+<code>golang-dev@googlegroups.com</code> mailing list.  Those changes
+will then be merged into the GCC sources.
+</p>
diff --git a/_content/doc/gccgo_install.html b/_content/doc/gccgo_install.html
new file mode 100644
index 0000000..c478a9e
--- /dev/null
+++ b/_content/doc/gccgo_install.html
@@ -0,0 +1,533 @@
+<!--{
+	"Title": "Setting up and using gccgo",
+	"Path": "/doc/install/gccgo"
+}-->
+
+<p>
+This document explains how to use gccgo, a compiler for
+the Go language. The gccgo compiler is a new frontend
+for GCC, the widely used GNU compiler. Although the
+frontend itself is under a BSD-style license, gccgo is
+normally used as part of GCC and is then covered by
+the <a href="https://www.gnu.org/licenses/gpl.html">GNU General Public
+License</a> (the license covers gccgo itself as part of GCC; it
+does not cover code generated by gccgo).
+</p>
+
+<p>
+Note that gccgo is not the <code>gc</code> compiler; see
+the <a href="/doc/install.html">Installing Go</a> instructions for that
+compiler.
+</p>
+
+<h2 id="Releases">Releases</h2>
+
+<p>
+The simplest way to install gccgo is to install a GCC binary release
+built to include Go support. GCC binary releases are available from
+<a href="https://gcc.gnu.org/install/binaries.html">various
+websites</a> and are typically included as part of GNU/Linux
+distributions. We expect that most people who build these binaries
+will include Go support.
+</p>
+
+<p>
+The GCC 4.7.1 release and all later 4.7 releases include a complete
+<a href="/doc/go1.html">Go 1</a> compiler and libraries.
+</p>
+
+<p>
+Due to timing, the GCC 4.8.0 and 4.8.1 releases are close to but not
+identical to Go 1.1. The GCC 4.8.2 release includes a complete Go
+1.1.2 implementation.
+</p>
+
+<p>
+The GCC 4.9 releases include a complete Go 1.2 implementation.
+</p>
+
+<p>
+The GCC 5 releases include a complete implementation of the Go 1.4
+user libraries. The Go 1.4 runtime is not fully merged, but that
+should not be visible to Go programs.
+</p>
+
+<p>
+The GCC 6 releases include a complete implementation of the Go 1.6.1
+user libraries. The Go 1.6 runtime is not fully merged, but that
+should not be visible to Go programs.
+</p>
+
+<p>
+The GCC 7 releases include a complete implementation of the Go 1.8.1
+user libraries. As with earlier releases, the Go 1.8 runtime is not
+fully merged, but that should not be visible to Go programs.
+</p>
+
+<p>
+The GCC 8 releases include a complete implementation of the Go 1.10.1
+release. The Go 1.10 runtime has now been fully merged into the GCC
+development sources, and concurrent garbage collection is fully
+supported.
+</p>
+
+<p>
+The GCC 9 releases include a complete implementation of the Go 1.12.2
+release.
+</p>
+
+<h2 id="Source_code">Source code</h2>
+
+<p>
+If you cannot use a release, or prefer to build gccgo for yourself, the
+gccgo source code is accessible via Git. The GCC web site has
+<a href="https://gcc.gnu.org/git.html">instructions for getting the GCC
+source code</a>. The gccgo source code is included. As a convenience, a
+stable version of the Go support is available in the
+<code>devel/gccgo</code> branch of the main GCC code repository:
+<code>git://gcc.gnu.org/git/gcc.git</code>.
+This branch is periodically updated with stable Go compiler sources.
+</p>
+
+<p>
+Note that although <code>gcc.gnu.org</code> is the most convenient way
+to get the source code for the Go frontend, it is not where the master
+sources live. If you want to contribute changes to the Go frontend
+compiler, see <a href="/doc/gccgo_contribute.html">Contributing to
+gccgo</a>.
+</p>
+
+
+<h2 id="Building">Building</h2>
+
+<p>
+Building gccgo is just like building GCC
+with one or two additional options. See
+the <a href="https://gcc.gnu.org/install/">instructions on the gcc web
+site</a>. When you run <code>configure</code>, add the
+option <code>--enable-languages=c,c++,go</code> (along with other
+languages you may want to build). If you are targeting a 32-bit x86,
+then you will want to build gccgo to default to
+supporting locked compare and exchange instructions; do this by also
+using the <code>configure</code> option <code>--with-arch=i586</code>
+(or a newer architecture, depending on where you need your programs to
+run). If you are targeting a 64-bit x86, but sometimes want to use
+the <code>-m32</code> option, then use the <code>configure</code>
+option <code>--with-arch-32=i586</code>.
+</p>
+
+<h3 id="Gold">Gold</h3>
+
+<p>
+On x86 GNU/Linux systems the gccgo compiler is able to
+use a small discontiguous stack for goroutines. This permits programs
+to run many more goroutines, since each goroutine can use a relatively
+small stack. Doing this requires using the gold linker version 2.22
+or later. You can either install GNU binutils 2.22 or later, or you
+can build gold yourself.
+</p>
+
+<p>
+To build gold yourself, build the GNU binutils,
+using <code>--enable-gold=default</code> when you run
+the <code>configure</code> script. Before building, you must install
+the flex and bison packages. A typical sequence would look like
+this (you can replace <code>/opt/gold</code> with any directory to
+which you have write access):
+</p>
+
+<pre>
+git clone git://sourceware.org/git/binutils-gdb.git
+mkdir binutils-objdir
+cd binutils-objdir
+../binutils-gdb/configure --enable-gold=default --prefix=/opt/gold
+make
+make install
+</pre>
+
+<p>
+However you install gold, when you configure gccgo, use the
+option <code>--with-ld=<var>GOLD_BINARY</var></code>.
+</p>
+
+<h3 id="Prerequisites">Prerequisites</h3>
+
+<p>
+A number of prerequisites are required to build GCC, as
+described on
+the <a href="https://gcc.gnu.org/install/prerequisites.html">gcc web
+site</a>. It is important to install all the prerequisites before
+running the gcc <code>configure</code> script.
+The prerequisite libraries can be conveniently downloaded using the
+script <code>contrib/download_prerequisites</code> in the GCC sources.
+
+<h3 id="Build_commands">Build commands</h3>
+
+<p>
+Once all the prerequisites are installed, then a typical build and
+install sequence would look like this (only use
+the <code>--with-ld</code> option if you are using the gold linker as
+described above):
+</p>
+
+<pre>
+git clone --branch devel/gccgo git://gcc.gnu.org/git/gcc.git gccgo
+mkdir objdir
+cd objdir
+../gccgo/configure --prefix=/opt/gccgo --enable-languages=c,c++,go --with-ld=/opt/gold/bin/ld
+make
+make install
+</pre>
+
+<h2 id="Using_gccgo">Using gccgo</h2>
+
+<p>
+The gccgo compiler works like other gcc frontends. As of GCC 5 the gccgo
+installation also includes a version of the <code>go</code> command,
+which may be used to build Go programs as described at
+<a href="https://golang.org/cmd/go">https://golang.org/cmd/go</a>.
+</p>
+
+<p>
+To compile a file without using the <code>go</code> command:
+</p>
+
+<pre>
+gccgo -c file.go
+</pre>
+
+<p>
+That produces <code>file.o</code>. To link files together to form an
+executable:
+</p>
+
+<pre>
+gccgo -o file file.o
+</pre>
+
+<p>
+To run the resulting file, you will need to tell the program where to
+find the compiled Go packages. There are a few ways to do this:
+</p>
+
+<ul>
+<li>
+<p>
+Set the <code>LD_LIBRARY_PATH</code> environment variable:
+</p>
+
+<pre>
+LD_LIBRARY_PATH=${prefix}/lib/gcc/MACHINE/VERSION
+[or]
+LD_LIBRARY_PATH=${prefix}/lib64/gcc/MACHINE/VERSION
+export LD_LIBRARY_PATH
+</pre>
+
+<p>
+Here <code>${prefix}</code> is the <code>--prefix</code> option used
+when building gccgo. For a binary install this is
+normally <code>/usr</code>. Whether to use <code>lib</code>
+or <code>lib64</code> depends on the target.
+Typically <code>lib64</code> is correct for x86_64 systems,
+and <code>lib</code> is correct for other systems. The idea is to
+name the directory where <code>libgo.so</code> is found.
+</p>
+
+</li>
+
+<li>
+<p>
+Passing a <code>-Wl,-R</code> option when you link (replace lib with
+lib64 if appropriate for your system):
+</p>
+
+<pre>
+go build -gccgoflags -Wl,-R,${prefix}/lib/gcc/MACHINE/VERSION
+[or]
+gccgo -o file file.o -Wl,-R,${prefix}/lib/gcc/MACHINE/VERSION
+</pre>
+</li>
+
+<li>
+<p>
+Use the <code>-static-libgo</code> option to link statically against
+the compiled packages.
+</p>
+</li>
+
+<li>
+<p>
+Use the <code>-static</code> option to do a fully static link (the
+default for the <code>gc</code> compiler).
+</p>
+</li>
+</ul>
+
+<h2 id="Options">Options</h2>
+
+<p>
+The gccgo compiler supports all GCC options
+that are language independent, notably the <code>-O</code>
+and <code>-g</code> options.
+</p>
+
+<p>
+The <code>-fgo-pkgpath=PKGPATH</code> option may be used to set a
+unique prefix for the package being compiled.
+This option is automatically used by the go command, but you may want
+to use it if you invoke gccgo directly.
+This option is intended for use with large
+programs that contain many packages, in order to allow multiple
+packages to use the same identifier as the package name.
+The <code>PKGPATH</code> may be any string; a good choice for the
+string is the path used to import the package.
+</p>
+
+<p>
+The <code>-I</code> and <code>-L</code> options, which are synonyms
+for the compiler, may be used to set the search path for finding
+imports.
+These options are not needed if you build with the go command.
+</p>
+
+<h2 id="Imports">Imports</h2>
+
+<p>
+When you compile a file that exports something, the export
+information will be stored directly in the object file.
+If you build with gccgo directly, rather than with the go command,
+then when you import a package, you must tell gccgo how to find the
+file.
+</p>
+
+<p>
+When you import the package <var>FILE</var> with gccgo,
+it will look for the import data in the following files, and use the
+first one that it finds.
+
+<ul>
+<li><code><var>FILE</var>.gox</code>
+<li><code>lib<var>FILE</var>.so</code>
+<li><code>lib<var>FILE</var>.a</code>
+<li><code><var>FILE</var>.o</code>
+</ul>
+
+<p>
+<code><var>FILE</var>.gox</code>, when used, will typically contain
+nothing but export data. This can be generated from
+<code><var>FILE</var>.o</code> via
+</p>
+
+<pre>
+objcopy -j .go_export FILE.o FILE.gox
+</pre>
+
+<p>
+The gccgo compiler will look in the current
+directory for import files. In more complex scenarios you
+may pass the <code>-I</code> or <code>-L</code> option to
+gccgo. Both options take directories to search. The
+<code>-L</code> option is also passed to the linker.
+</p>
+
+<p>
+The gccgo compiler does not currently (2015-06-15) record
+the file name of imported packages in the object file. You must
+arrange for the imported data to be linked into the program.
+Again, this is not necessary when building with the go command.
+</p>
+
+<pre>
+gccgo -c mypackage.go              # Exports mypackage
+gccgo -c main.go                   # Imports mypackage
+gccgo -o main main.o mypackage.o   # Explicitly links with mypackage.o
+</pre>
+
+<h2 id="Debugging">Debugging</h2>
+
+<p>
+If you use the <code>-g</code> option when you compile, you can run
+<code>gdb</code> on your executable. The debugger has only limited
+knowledge about Go. You can set breakpoints, single-step,
+etc. You can print variables, but they will be printed as though they
+had C/C++ types. For numeric types this doesn't matter. Go strings
+and interfaces will show up as two-element structures. Go
+maps and channels are always represented as C pointers to run-time
+structures.
+</p>
+
+<h2 id="C_Interoperability">C Interoperability</h2>
+
+<p>
+When using gccgo there is limited interoperability with C,
+or with C++ code compiled using <code>extern "C"</code>.
+</p>
+
+<h3 id="Types">Types</h3>
+
+<p>
+Basic types map directly: an <code>int32</code> in Go is
+an <code>int32_t</code> in C, an <code>int64</code> is
+an <code>int64_t</code>, etc.
+The Go type <code>int</code> is an integer that is the same size as a
+pointer, and as such corresponds to the C type <code>intptr_t</code>.
+Go <code>byte</code> is equivalent to C <code>unsigned char</code>.
+Pointers in Go are pointers in C.
+A Go <code>struct</code> is the same as C <code>struct</code> with the
+same fields and types.
+</p>
+
+<p>
+The Go <code>string</code> type is currently defined as a two-element
+structure (this is <b style="color: red;">subject to change</b>):
+</p>
+
+<pre>
+struct __go_string {
+  const unsigned char *__data;
+  intptr_t __length;
+};
+</pre>
+
+<p>
+You can't pass arrays between C and Go. However, a pointer to an
+array in Go is equivalent to a C pointer to the
+equivalent of the element type.
+For example, Go <code>*[10]int</code> is equivalent to C <code>int*</code>,
+assuming that the C pointer does point to 10 elements.
+</p>
+
+<p>
+A slice in Go is a structure. The current definition is
+(this is <b style="color: red;">subject to change</b>):
+</p>
+
+<pre>
+struct __go_slice {
+  void *__values;
+  intptr_t __count;
+  intptr_t __capacity;
+};
+</pre>
+
+<p>
+The type of a Go function is a pointer to a struct (this is
+<b style="color: red;">subject to change</b>). The first field in the
+struct points to the code of the function, which will be equivalent to
+a pointer to a C function whose parameter types are equivalent, with
+an additional trailing parameter. The trailing parameter is the
+closure, and the argument to pass is a pointer to the Go function
+struct.
+
+When a Go function returns more than one value, the C function returns
+a struct. For example, these functions are roughly equivalent:
+</p>
+
+<pre>
+func GoFunction(int) (int, float64)
+struct { int i; float64 f; } CFunction(int, void*)
+</pre>
+
+<p>
+Go <code>interface</code>, <code>channel</code>, and <code>map</code>
+types have no corresponding C type (<code>interface</code> is a
+two-element struct and <code>channel</code> and <code>map</code> are
+pointers to structs in C, but the structs are deliberately undocumented). C
+<code>enum</code> types correspond to some integer type, but precisely
+which one is difficult to predict in general; use a cast. C <code>union</code>
+types have no corresponding Go type. C <code>struct</code> types containing
+bitfields have no corresponding Go type. C++ <code>class</code> types have
+no corresponding Go type.
+</p>
+
+<p>
+Memory allocation is completely different between C and Go, as Go uses
+garbage collection. The exact guidelines in this area are undetermined,
+but it is likely that it will be permitted to pass a pointer to allocated
+memory from C to Go. The responsibility of eventually freeing the pointer
+will remain with C side, and of course if the C side frees the pointer
+while the Go side still has a copy the program will fail. When passing a
+pointer from Go to C, the Go function must retain a visible copy of it in
+some Go variable. Otherwise the Go garbage collector may delete the
+pointer while the C function is still using it.
+</p>
+
+<h3 id="Function_names">Function names</h3>
+
+<p>
+Go code can call C functions directly using a Go extension implemented
+in gccgo: a function declaration may be preceded by
+<code>//extern NAME</code>. For example, here is how the C function
+<code>open</code> can be declared in Go:
+</p>
+
+<pre>
+//extern open
+func c_open(name *byte, mode int, perm int) int
+</pre>
+
+<p>
+The C function naturally expects a NUL-terminated string, which in
+Go is equivalent to a pointer to an array (not a slice!) of
+<code>byte</code> with a terminating zero byte. So a sample call
+from Go would look like (after importing the <code>syscall</code> package):
+</p>
+
+<pre>
+var name = [4]byte{'f', 'o', 'o', 0};
+i := c_open(&amp;name[0], syscall.O_RDONLY, 0);
+</pre>
+
+<p>
+(this serves as an example only, to open a file in Go please use Go's
+<code>os.Open</code> function instead).
+</p>
+
+<p>
+Note that if the C function can block, such as in a call
+to <code>read</code>, calling the C function may block the Go program.
+Unless you have a clear understanding of what you are doing, all calls
+between C and Go should be implemented through cgo or SWIG, as for
+the <code>gc</code> compiler.
+</p>
+
+<p>
+The name of Go functions accessed from C is subject to change. At present
+the name of a Go function that does not have a receiver is
+<code>prefix.package.Functionname</code>. The prefix is set by
+the <code>-fgo-prefix</code> option used when the package is compiled;
+if the option is not used, the default is <code>go</code>.
+To call the function from C you must set the name using
+a GCC extension.
+</p>
+
+<pre>
+extern int go_function(int) __asm__ ("myprefix.mypackage.Function");
+</pre>
+
+<h3 id="Automatic_generation_of_Go_declarations_from_C_source_code">
+Automatic generation of Go declarations from C source code</h3>
+
+<p>
+The Go version of GCC supports automatically generating
+Go declarations from C code. The facility is rather awkward, and most
+users should use the <a href="/cmd/cgo">cgo</a> program with
+the <code>-gccgo</code> option instead.
+</p>
+
+<p>
+Compile your C code as usual, and add the option
+<code>-fdump-go-spec=<var>FILENAME</var></code>. This will create the
+file <code><var>FILENAME</var></code> as a side effect of the
+compilation. This file will contain Go declarations for the types,
+variables and functions declared in the C code. C types that can not
+be represented in Go will be recorded as comments in the Go code. The
+generated file will not have a <code>package</code> declaration, but
+can otherwise be compiled directly by gccgo.
+</p>
+
+<p>
+This procedure is full of unstated caveats and restrictions and we make no
+guarantee that it will not change in the future. It is more useful as a
+starting point for real Go code than as a regular procedure.
+</p>
diff --git a/_content/doc/go-logo-black.png b/_content/doc/go-logo-black.png
new file mode 100644
index 0000000..3077ebd
--- /dev/null
+++ b/_content/doc/go-logo-black.png
Binary files differ
diff --git a/_content/doc/go-logo-blue.png b/_content/doc/go-logo-blue.png
new file mode 100644
index 0000000..8d43a56
--- /dev/null
+++ b/_content/doc/go-logo-blue.png
Binary files differ
diff --git a/_content/doc/go-logo-white.png b/_content/doc/go-logo-white.png
new file mode 100644
index 0000000..fa29169
--- /dev/null
+++ b/_content/doc/go-logo-white.png
Binary files differ
diff --git a/_content/doc/go1.1.html b/_content/doc/go1.1.html
new file mode 100644
index 0000000..f615c97
--- /dev/null
+++ b/_content/doc/go1.1.html
@@ -0,0 +1,1099 @@
+<!--{
+	"Title": "Go 1.1 Release Notes",
+	"Path":  "/doc/go1.1",
+	"Template": true
+}-->
+
+<h2 id="introduction">Introduction to Go 1.1</h2>
+
+<p>
+The release of <a href="/doc/go1.html">Go version 1</a> (Go 1 or Go 1.0 for short)
+in March of 2012 introduced a new period
+of stability in the Go language and libraries.
+That stability has helped nourish a growing community of Go users
+and systems around the world.
+Several "point" releases since
+then—1.0.1, 1.0.2, and 1.0.3—have been issued.
+These point releases fixed known bugs but made
+no non-critical changes to the implementation.
+</p>
+
+<p>
+This new release, Go 1.1, keeps the <a href="/doc/go1compat.html">promise
+of compatibility</a> but adds a couple of significant
+(backwards-compatible, of course) language changes, has a long list
+of (again, compatible) library changes, and
+includes major work on the implementation of the compilers,
+libraries, and run-time.
+The focus is on performance.
+Benchmarking is an inexact science at best, but we see significant,
+sometimes dramatic speedups for many of our test programs.
+We trust that many of our users' programs will also see improvements
+just by updating their Go installation and recompiling.
+</p>
+
+<p>
+This document summarizes the changes between Go 1 and Go 1.1.
+Very little if any code will need modification to run with Go 1.1,
+although a couple of rare error cases surface with this release
+and need to be addressed if they arise.
+Details appear below; see the discussion of
+<a href="#int">64-bit ints</a> and <a href="#unicode_literals">Unicode literals</a>
+in particular.
+</p>
+
+<h2 id="language">Changes to the language</h2>
+
+<p>
+<a href="/doc/go1compat.html">The Go compatibility document</a> promises
+that programs written to the Go 1 language specification will continue to operate,
+and those promises are maintained.
+In the interest of firming up the specification, though, there are
+details about some error cases that have been clarified.
+There are also some new language features.
+</p>
+
+<h3 id="divzero">Integer division by zero</h3>
+
+<p>
+In Go 1, integer division by a constant zero produced a run-time panic:
+</p>
+
+<pre>
+func f(x int) int {
+	return x/0
+}
+</pre>
+
+<p>
+In Go 1.1, an integer division by constant zero is not a legal program, so it is a compile-time error.
+</p>
+
+<h3 id="unicode_literals">Surrogates in Unicode literals</h3>
+
+<p>
+The definition of string and rune literals has been refined to exclude surrogate halves from the
+set of valid Unicode code points.
+See the <a href="#unicode">Unicode</a> section for more information.
+</p>
+
+<h3 id="method_values">Method values</h3>
+
+<p>
+Go 1.1 now implements
+<a href="/ref/spec#Method_values">method values</a>,
+which are functions that have been bound to a specific receiver value.
+For instance, given a
+<a href="/pkg/bufio/#Writer"><code>Writer</code></a>
+value <code>w</code>,
+the expression
+<code>w.Write</code>,
+a method value, is a function that will always write to <code>w</code>; it is equivalent to
+a function literal closing over <code>w</code>:
+</p>
+
+<pre>
+func (p []byte) (n int, err error) {
+	return w.Write(p)
+}
+</pre>
+
+<p>
+Method values are distinct from method expressions, which generate functions
+from methods of a given type; the method expression <code>(*bufio.Writer).Write</code>
+is equivalent to a function with an extra first argument, a receiver of type
+<code>(*bufio.Writer)</code>:
+</p>
+
+<pre>
+func (w *bufio.Writer, p []byte) (n int, err error) {
+	return w.Write(p)
+}
+</pre>
+
+<p>
+<em>Updating</em>: No existing code is affected; the change is strictly backward-compatible.
+</p>
+
+<h3 id="return">Return requirements</h3>
+
+<p>
+Before Go 1.1, a function that returned a value needed an explicit "return"
+or call to <code>panic</code> at
+the end of the function; this was a simple way to make the programmer
+be explicit about the meaning of the function. But there are many cases
+where a final "return" is clearly unnecessary, such as a function with
+only an infinite "for" loop.
+</p>
+
+<p>
+In Go 1.1, the rule about final "return" statements is more permissive.
+It introduces the concept of a
+<a href="/ref/spec#Terminating_statements"><em>terminating statement</em></a>,
+a statement that is guaranteed to be the last one a function executes.
+Examples include
+"for" loops with no condition and "if-else"
+statements in which each half ends in a "return".
+If the final statement of a function can be shown <em>syntactically</em> to
+be a terminating statement, no final "return" statement is needed.
+</p>
+
+<p>
+Note that the rule is purely syntactic: it pays no attention to the values in the
+code and therefore requires no complex analysis.
+</p>
+
+<p>
+<em>Updating</em>: The change is backward-compatible, but existing code
+with superfluous "return" statements and calls to <code>panic</code> may
+be simplified manually.
+Such code can be identified by <code>go vet</code>.
+</p>
+
+<h2 id="impl">Changes to the implementations and tools</h2>
+
+<h3 id="gccgo">Status of gccgo</h3>
+
+<p>
+The GCC release schedule does not coincide with the Go release schedule, so some skew is inevitable in
+<code>gccgo</code>'s releases.
+The 4.8.0 version of GCC shipped in March, 2013 and includes a nearly-Go 1.1 version of <code>gccgo</code>.
+Its library is a little behind the release, but the biggest difference is that method values are not implemented.
+Sometime around July 2013, we expect 4.8.2 of GCC to ship with a <code>gccgo</code>
+providing a complete Go 1.1 implementation.
+</p>
+
+<h3 id="gc_flag">Command-line flag parsing</h3>
+
+<p>
+In the gc toolchain, the compilers and linkers now use the
+same command-line flag parsing rules as the Go flag package, a departure
+from the traditional Unix flag parsing. This may affect scripts that invoke
+the tool directly.
+For example,
+<code>go tool 6c -Fw -Dfoo</code> must now be written
+<code>go tool 6c -F -w -D foo</code>.
+</p>
+
+<h3 id="int">Size of int on 64-bit platforms</h3>
+
+<p>
+The language allows the implementation to choose whether the <code>int</code> type and
+<code>uint</code> types are 32 or 64 bits. Previous Go implementations made <code>int</code>
+and <code>uint</code> 32 bits on all systems. Both the gc and gccgo implementations
+now make
+<code>int</code> and <code>uint</code> 64 bits on 64-bit platforms such as AMD64/x86-64.
+Among other things, this enables the allocation of slices with
+more than 2 billion elements on 64-bit platforms.
+</p>
+
+<p>
+<em>Updating</em>:
+Most programs will be unaffected by this change.
+Because Go does not allow implicit conversions between distinct
+<a href="/ref/spec#Numeric_types">numeric types</a>,
+no programs will stop compiling due to this change.
+However, programs that contain implicit assumptions
+that <code>int</code> is only 32 bits may change behavior.
+For example, this code prints a positive number on 64-bit systems and
+a negative one on 32-bit systems:
+</p>
+
+<pre>
+x := ^uint32(0) // x is 0xffffffff
+i := int(x)     // i is -1 on 32-bit systems, 0xffffffff on 64-bit
+fmt.Println(i)
+</pre>
+
+<p>Portable code intending 32-bit sign extension (yielding <code>-1</code> on all systems)
+would instead say:
+</p>
+
+<pre>
+i := int(int32(x))
+</pre>
+
+<h3 id="heap">Heap size on 64-bit architectures</h3>
+
+<p>
+On 64-bit architectures, the maximum heap size has been enlarged substantially,
+from a few gigabytes to several tens of gigabytes.
+(The exact details depend on the system and may change.)
+</p>
+
+<p>
+On 32-bit architectures, the heap size has not changed.
+</p>
+
+<p>
+<em>Updating</em>:
+This change should have no effect on existing programs beyond allowing them
+to run with larger heaps.
+</p>
+
+<h3 id="unicode">Unicode</h3>
+
+<p>
+To make it possible to represent code points greater than 65535 in UTF-16,
+Unicode defines <em>surrogate halves</em>,
+a range of code points to be used only in the assembly of large values, and only in UTF-16.
+The code points in that surrogate range are illegal for any other purpose.
+In Go 1.1, this constraint is honored by the compiler, libraries, and run-time:
+a surrogate half is illegal as a rune value, when encoded as UTF-8, or when
+encoded in isolation as UTF-16.
+When encountered, for example in converting from a rune to UTF-8, it is
+treated as an encoding error and will yield the replacement rune,
+<a href="/pkg/unicode/utf8/#RuneError"><code>utf8.RuneError</code></a>,
+U+FFFD.
+</p>
+
+<p>
+This program,
+</p>
+
+<pre>
+import "fmt"
+
+func main() {
+    fmt.Printf("%+q\n", string(0xD800))
+}
+</pre>
+
+<p>
+printed <code>"\ud800"</code> in Go 1.0, but prints <code>"\ufffd"</code> in Go 1.1.
+</p>
+
+<p>
+Surrogate-half Unicode values are now illegal in rune and string constants, so constants such as
+<code>'\ud800'</code> and <code>"\ud800"</code> are now rejected by the compilers.
+When written explicitly as UTF-8 encoded bytes,
+such strings can still be created, as in <code>"\xed\xa0\x80"</code>.
+However, when such a string is decoded as a sequence of runes, as in a range loop, it will yield only <code>utf8.RuneError</code>
+values.
+</p>
+
+<p>
+The Unicode byte order mark U+FEFF, encoded in UTF-8, is now permitted as the first
+character of a Go source file.
+Even though its appearance in the byte-order-free UTF-8 encoding is clearly unnecessary,
+some editors add the mark as a kind of "magic number" identifying a UTF-8 encoded file.
+</p>
+
+<p>
+<em>Updating</em>:
+Most programs will be unaffected by the surrogate change.
+Programs that depend on the old behavior should be modified to avoid the issue.
+The byte-order-mark change is strictly backward-compatible.
+</p>
+
+<h3 id="race">Race detector</h3>
+
+<p>
+A major addition to the tools is a <em>race detector</em>, a way to
+find bugs in programs caused by concurrent access of the same
+variable, where at least one of the accesses is a write.
+This new facility is built into the <code>go</code> tool.
+For now, it is only available on Linux, Mac OS X, and Windows systems with
+64-bit x86 processors.
+To enable it, set the <code>-race</code> flag when building or testing your program
+(for instance, <code>go test -race</code>).
+The race detector is documented in <a href="/doc/articles/race_detector.html">a separate article</a>.
+</p>
+
+<h3 id="gc_asm">The gc assemblers</h3>
+
+<p>
+Due to the change of the <a href="#int"><code>int</code></a> to 64 bits and
+a new internal <a href="//golang.org/s/go11func">representation of functions</a>,
+the arrangement of function arguments on the stack has changed in the gc toolchain.
+Functions written in assembly will need to be revised at least
+to adjust frame pointer offsets.
+</p>
+
+<p>
+<em>Updating</em>:
+The <code>go vet</code> command now checks that functions implemented in assembly
+match the Go function prototypes they implement.
+</p>
+
+<h3 id="gocmd">Changes to the go command</h3>
+
+<p>
+The <a href="/cmd/go/"><code>go</code></a> command has acquired several
+changes intended to improve the experience for new Go users.
+</p>
+
+<p>
+First, when compiling, testing, or running Go code, the <code>go</code> command will now give more detailed error messages,
+including a list of paths searched, when a package cannot be located.
+</p>
+
+<pre>
+$ go build foo/quxx
+can't load package: package foo/quxx: cannot find package "foo/quxx" in any of:
+        /home/you/go/src/pkg/foo/quxx (from $GOROOT)
+        /home/you/src/foo/quxx (from $GOPATH)
+</pre>
+
+<p>
+Second, the <code>go get</code> command no longer allows <code>$GOROOT</code>
+as the default destination when downloading package source.
+To use the <code>go get</code>
+command, a <a href="/doc/code.html#GOPATH">valid <code>$GOPATH</code></a> is now required.
+</p>
+
+<pre>
+$ GOPATH= go get code.google.com/p/foo/quxx
+package code.google.com/p/foo/quxx: cannot download, $GOPATH not set. For more details see: go help gopath
+</pre>
+
+<p>
+Finally, as a result of the previous change, the <code>go get</code> command will also fail
+when <code>$GOPATH</code> and <code>$GOROOT</code> are set to the same value.
+</p>
+
+<pre>
+$ GOPATH=$GOROOT go get code.google.com/p/foo/quxx
+warning: GOPATH set to GOROOT (/home/you/go) has no effect
+package code.google.com/p/foo/quxx: cannot download, $GOPATH must not be set to $GOROOT. For more details see: go help gopath
+</pre>
+
+<h3 id="gotest">Changes to the go test command</h3>
+
+<p>
+The <a href="/cmd/go/#hdr-Test_packages"><code>go test</code></a>
+command no longer deletes the binary when run with profiling enabled,
+to make it easier to analyze the profile.
+The implementation sets the <code>-c</code> flag automatically, so after running,
+</p>
+
+<pre>
+$ go test -cpuprofile cpuprof.out mypackage
+</pre>
+
+<p>
+the file <code>mypackage.test</code> will be left in the directory where <code>go test</code> was run.
+</p>
+
+<p>
+The <a href="/cmd/go/#hdr-Test_packages"><code>go test</code></a>
+command can now generate profiling information
+that reports where goroutines are blocked, that is,
+where they tend to stall waiting for an event such as a channel communication.
+The information is presented as a
+<em>blocking profile</em>
+enabled with the
+<code>-blockprofile</code>
+option of
+<code>go test</code>.
+Run <code>go help test</code> for more information.
+</p>
+
+<h3 id="gofix">Changes to the go fix command</h3>
+
+<p>
+The <a href="/cmd/fix/"><code>fix</code></a> command, usually run as
+<code>go fix</code>, no longer applies fixes to update code from
+before Go 1 to use Go 1 APIs.
+To update pre-Go 1 code to Go 1.1, use a Go 1.0 toolchain
+to convert the code to Go 1.0 first.
+</p>
+
+<h3 id="tags">Build constraints</h3>
+
+<p>
+The "<code>go1.1</code>" tag has been added to the list of default
+<a href="/pkg/go/build/#hdr-Build_Constraints">build constraints</a>.
+This permits packages to take advantage of the new features in Go 1.1 while
+remaining compatible with earlier versions of Go.
+</p>
+
+<p>
+To build a file only with Go 1.1 and above, add this build constraint:
+</p>
+
+<pre>
+// +build go1.1
+</pre>
+
+<p>
+To build a file only with Go 1.0.x, use the converse constraint:
+</p>
+
+<pre>
+// +build !go1.1
+</pre>
+
+<h3 id="platforms">Additional platforms</h3>
+
+<p>
+The Go 1.1 toolchain adds experimental support for <code>freebsd/arm</code>,
+<code>netbsd/386</code>, <code>netbsd/amd64</code>, <code>netbsd/arm</code>,
+<code>openbsd/386</code> and <code>openbsd/amd64</code> platforms.
+</p>
+
+<p>
+An ARMv6 or later processor is required for <code>freebsd/arm</code> or
+<code>netbsd/arm</code>.
+</p>
+
+<p>
+Go 1.1 adds experimental support for <code>cgo</code> on <code>linux/arm</code>.
+</p>
+
+<h3 id="crosscompile">Cross compilation</h3>
+
+<p>
+When cross-compiling, the <code>go</code> tool will disable <code>cgo</code>
+support by default.
+</p>
+
+<p>
+To explicitly enable <code>cgo</code>, set <code>CGO_ENABLED=1</code>.
+</p>
+
+<h2 id="performance">Performance</h2>
+
+<p>
+The performance of code compiled with the Go 1.1 gc tool suite should be noticeably
+better for most Go programs.
+Typical improvements relative to Go 1.0 seem to be about 30%-40%, sometimes
+much more, but occasionally less or even non-existent.
+There are too many small performance-driven tweaks through the tools and libraries
+to list them all here, but the following major changes are worth noting:
+</p>
+
+<ul>
+<li>The gc compilers generate better code in many cases, most noticeably for
+floating point on the 32-bit Intel architecture.</li>
+<li>The gc compilers do more in-lining, including for some operations
+in the run-time such as <a href="/pkg/builtin/#append"><code>append</code></a>
+and interface conversions.</li>
+<li>There is a new implementation of Go maps with significant reduction in
+memory footprint and CPU time.</li>
+<li>The garbage collector has been made more parallel, which can reduce
+latencies for programs running on multiple CPUs.</li>
+<li>The garbage collector is also more precise, which costs a small amount of
+CPU time but can reduce the size of the heap significantly, especially
+on 32-bit architectures.</li>
+<li>Due to tighter coupling of the run-time and network libraries, fewer
+context switches are required on network operations.</li>
+</ul>
+
+<h2 id="library">Changes to the standard library</h2>
+
+<h3 id="bufio_scanner">bufio.Scanner</h3>
+
+<p>
+The various routines to scan textual input in the
+<a href="/pkg/bufio/"><code>bufio</code></a>
+package,
+<a href="/pkg/bufio/#Reader.ReadBytes"><code>ReadBytes</code></a>,
+<a href="/pkg/bufio/#Reader.ReadString"><code>ReadString</code></a>
+and particularly
+<a href="/pkg/bufio/#Reader.ReadLine"><code>ReadLine</code></a>,
+are needlessly complex to use for simple purposes.
+In Go 1.1, a new type,
+<a href="/pkg/bufio/#Scanner"><code>Scanner</code></a>,
+has been added to make it easier to do simple tasks such as
+read the input as a sequence of lines or space-delimited words.
+It simplifies the problem by terminating the scan on problematic
+input such as pathologically long lines, and having a simple
+default: line-oriented input, with each line stripped of its terminator.
+Here is code to reproduce the input a line at a time:
+</p>
+
+<pre>
+scanner := bufio.NewScanner(os.Stdin)
+for scanner.Scan() {
+    fmt.Println(scanner.Text()) // Println will add back the final '\n'
+}
+if err := scanner.Err(); err != nil {
+    fmt.Fprintln(os.Stderr, "reading standard input:", err)
+}
+</pre>
+
+<p>
+Scanning behavior can be adjusted through a function to control subdividing the input
+(see the documentation for <a href="/pkg/bufio/#SplitFunc"><code>SplitFunc</code></a>),
+but for tough problems or the need to continue past errors, the older interface
+may still be required.
+</p>
+
+<h3 id="net">net</h3>
+
+<p>
+The protocol-specific resolvers in the <a href="/pkg/net/"><code>net</code></a> package were formerly
+lax about the network name passed in.
+Although the documentation was clear
+that the only valid networks for
+<a href="/pkg/net/#ResolveTCPAddr"><code>ResolveTCPAddr</code></a>
+are <code>"tcp"</code>,
+<code>"tcp4"</code>, and <code>"tcp6"</code>, the Go 1.0 implementation silently accepted any string.
+The Go 1.1 implementation returns an error if the network is not one of those strings.
+The same is true of the other protocol-specific resolvers <a href="/pkg/net/#ResolveIPAddr"><code>ResolveIPAddr</code></a>,
+<a href="/pkg/net/#ResolveUDPAddr"><code>ResolveUDPAddr</code></a>, and
+<a href="/pkg/net/#ResolveUnixAddr"><code>ResolveUnixAddr</code></a>.
+</p>
+
+<p>
+The previous implementation of
+<a href="/pkg/net/#ListenUnixgram"><code>ListenUnixgram</code></a>
+returned a
+<a href="/pkg/net/#UDPConn"><code>UDPConn</code></a> as
+a representation of the connection endpoint.
+The Go 1.1 implementation instead returns a
+<a href="/pkg/net/#UnixConn"><code>UnixConn</code></a>
+to allow reading and writing
+with its
+<a href="/pkg/net/#UnixConn.ReadFrom"><code>ReadFrom</code></a>
+and
+<a href="/pkg/net/#UnixConn.WriteTo"><code>WriteTo</code></a>
+methods.
+</p>
+
+<p>
+The data structures
+<a href="/pkg/net/#IPAddr"><code>IPAddr</code></a>,
+<a href="/pkg/net/#TCPAddr"><code>TCPAddr</code></a>, and
+<a href="/pkg/net/#UDPAddr"><code>UDPAddr</code></a>
+add a new string field called <code>Zone</code>.
+Code using untagged composite literals (e.g. <code>net.TCPAddr{ip, port}</code>)
+instead of tagged literals (<code>net.TCPAddr{IP: ip, Port: port}</code>)
+will break due to the new field.
+The Go 1 compatibility rules allow this change: client code must use tagged literals to avoid such breakages.
+</p>
+
+<p>
+<em>Updating</em>:
+To correct breakage caused by the new struct field,
+<code>go fix</code> will rewrite code to add tags for these types.
+More generally, <code>go vet</code> will identify composite literals that
+should be revised to use field tags.
+</p>
+
+<h3 id="reflect">reflect</h3>
+
+<p>
+The <a href="/pkg/reflect/"><code>reflect</code></a> package has several significant additions.
+</p>
+
+<p>
+It is now possible to run a "select" statement using
+the <code>reflect</code> package; see the description of
+<a href="/pkg/reflect/#Select"><code>Select</code></a>
+and
+<a href="/pkg/reflect/#SelectCase"><code>SelectCase</code></a>
+for details.
+</p>
+
+<p>
+The new method
+<a href="/pkg/reflect/#Value.Convert"><code>Value.Convert</code></a>
+(or
+<a href="/pkg/reflect/#Type"><code>Type.ConvertibleTo</code></a>)
+provides functionality to execute a Go conversion or type assertion operation
+on a
+<a href="/pkg/reflect/#Value"><code>Value</code></a>
+(or test for its possibility).
+</p>
+
+<p>
+The new function
+<a href="/pkg/reflect/#MakeFunc"><code>MakeFunc</code></a>
+creates a wrapper function to make it easier to call a function with existing
+<a href="/pkg/reflect/#Value"><code>Values</code></a>,
+doing the standard Go conversions among the arguments, for instance
+to pass an actual <code>int</code> to a formal <code>interface{}</code>.
+</p>
+
+<p>
+Finally, the new functions
+<a href="/pkg/reflect/#ChanOf"><code>ChanOf</code></a>,
+<a href="/pkg/reflect/#MapOf"><code>MapOf</code></a>
+and
+<a href="/pkg/reflect/#SliceOf"><code>SliceOf</code></a>
+construct new
+<a href="/pkg/reflect/#Type"><code>Types</code></a>
+from existing types, for example to construct the type <code>[]T</code> given
+only <code>T</code>.
+</p>
+
+
+<h3 id="time">time</h3>
+<p>
+On FreeBSD, Linux, NetBSD, OS X and OpenBSD, previous versions of the
+<a href="/pkg/time/"><code>time</code></a> package
+returned times with microsecond precision.
+The Go 1.1 implementation on these
+systems now returns times with nanosecond precision.
+Programs that write to an external format with microsecond precision
+and read it back, expecting to recover the original value, will be affected
+by the loss of precision.
+There are two new methods of <a href="/pkg/time/#Time"><code>Time</code></a>,
+<a href="/pkg/time/#Time.Round"><code>Round</code></a>
+and
+<a href="/pkg/time/#Time.Truncate"><code>Truncate</code></a>,
+that can be used to remove precision from a time before passing it to
+external storage.
+</p>
+
+<p>
+The new method
+<a href="/pkg/time/#Time.YearDay"><code>YearDay</code></a>
+returns the one-indexed integral day number of the year specified by the time value.
+</p>
+
+<p>
+The
+<a href="/pkg/time/#Timer"><code>Timer</code></a>
+type has a new method
+<a href="/pkg/time/#Timer.Reset"><code>Reset</code></a>
+that modifies the timer to expire after a specified duration.
+</p>
+
+<p>
+Finally, the new function
+<a href="/pkg/time/#ParseInLocation"><code>ParseInLocation</code></a>
+is like the existing
+<a href="/pkg/time/#Parse"><code>Parse</code></a>
+but parses the time in the context of a location (time zone), ignoring
+time zone information in the parsed string.
+This function addresses a common source of confusion in the time API.
+</p>
+
+<p>
+<em>Updating</em>:
+Code that needs to read and write times using an external format with
+lower precision should be modified to use the new methods.
+</p>
+
+<h3 id="exp_old">Exp and old subtrees moved to go.exp and go.text subrepositories</h3>
+
+<p>
+To make it easier for binary distributions to access them if desired, the <code>exp</code>
+and <code>old</code> source subtrees, which are not included in binary distributions,
+have been moved to the new <code>go.exp</code> subrepository at
+<code>code.google.com/p/go.exp</code>. To access the <code>ssa</code> package,
+for example, run
+</p>
+
+<pre>
+$ go get code.google.com/p/go.exp/ssa
+</pre>
+
+<p>
+and then in Go source,
+</p>
+
+<pre>
+import "code.google.com/p/go.exp/ssa"
+</pre>
+
+<p>
+The old package <code>exp/norm</code> has also been moved, but to a new repository
+<code>go.text</code>, where the Unicode APIs and other text-related packages will
+be developed.
+</p>
+
+<h3 id="new_packages">New packages</h3>
+
+<p>
+There are three new packages.
+</p>
+
+<ul>
+<li>
+The <a href="/pkg/go/format/"><code>go/format</code></a> package provides
+a convenient way for a program to access the formatting capabilities of the
+<a href="/cmd/go/#hdr-Run_gofmt_on_package_sources"><code>go fmt</code></a> command.
+It has two functions,
+<a href="/pkg/go/format/#Node"><code>Node</code></a> to format a Go parser
+<a href="/pkg/go/ast/#Node"><code>Node</code></a>,
+and
+<a href="/pkg/go/format/#Source"><code>Source</code></a>
+to reformat arbitrary Go source code into the standard format as provided by the
+<a href="/cmd/go/#hdr-Run_gofmt_on_package_sources"><code>go fmt</code></a> command.
+</li>
+
+<li>
+The <a href="/pkg/net/http/cookiejar/"><code>net/http/cookiejar</code></a> package provides the basics for managing HTTP cookies.
+</li>
+
+<li>
+The <a href="/pkg/runtime/race/"><code>runtime/race</code></a> package provides low-level facilities for data race detection.
+It is internal to the race detector and does not otherwise export any user-visible functionality.
+</li>
+</ul>
+
+<h3 id="minor_library_changes">Minor changes to the library</h3>
+
+<p>
+The following list summarizes a number of minor changes to the library, mostly additions.
+See the relevant package documentation for more information about each change.
+</p>
+
+<ul>
+<li>
+The <a href="/pkg/bytes/"><code>bytes</code></a> package has two new functions,
+<a href="/pkg/bytes/#TrimPrefix"><code>TrimPrefix</code></a>
+and
+<a href="/pkg/bytes/#TrimSuffix"><code>TrimSuffix</code></a>,
+with self-evident properties.
+Also, the <a href="/pkg/bytes/#Buffer"><code>Buffer</code></a> type
+has a new method
+<a href="/pkg/bytes/#Buffer.Grow"><code>Grow</code></a> that
+provides some control over memory allocation inside the buffer.
+Finally, the
+<a href="/pkg/bytes/#Reader"><code>Reader</code></a> type now has a
+<a href="/pkg/strings/#Reader.WriteTo"><code>WriteTo</code></a> method
+so it implements the
+<a href="/pkg/io/#WriterTo"><code>io.WriterTo</code></a> interface.
+</li>
+
+<li>
+The <a href="/pkg/compress/gzip/"><code>compress/gzip</code></a> package has
+a new <a href="/pkg/compress/gzip/#Writer.Flush"><code>Flush</code></a>
+method for its
+<a href="/pkg/compress/gzip/#Writer"><code>Writer</code></a>
+type that flushes its underlying <code>flate.Writer</code>.
+</li>
+
+<li>
+The <a href="/pkg/crypto/hmac/"><code>crypto/hmac</code></a> package has a new function,
+<a href="/pkg/crypto/hmac/#Equal"><code>Equal</code></a>, to compare two MACs.
+</li>
+
+<li>
+The <a href="/pkg/crypto/x509/"><code>crypto/x509</code></a> package
+now supports PEM blocks (see
+<a href="/pkg/crypto/x509/#DecryptPEMBlock"><code>DecryptPEMBlock</code></a> for instance),
+and a new function
+<a href="/pkg/crypto/x509/#ParseECPrivateKey"><code>ParseECPrivateKey</code></a> to parse elliptic curve private keys.
+</li>
+
+<li>
+The <a href="/pkg/database/sql/"><code>database/sql</code></a> package
+has a new
+<a href="/pkg/database/sql/#DB.Ping"><code>Ping</code></a>
+method for its
+<a href="/pkg/database/sql/#DB"><code>DB</code></a>
+type that tests the health of the connection.
+</li>
+
+<li>
+The <a href="/pkg/database/sql/driver/"><code>database/sql/driver</code></a> package
+has a new
+<a href="/pkg/database/sql/driver/#Queryer"><code>Queryer</code></a>
+interface that a
+<a href="/pkg/database/sql/driver/#Conn"><code>Conn</code></a>
+may implement to improve performance.
+</li>
+
+<li>
+The <a href="/pkg/encoding/json/"><code>encoding/json</code></a> package's
+<a href="/pkg/encoding/json/#Decoder"><code>Decoder</code></a>
+has a new method
+<a href="/pkg/encoding/json/#Decoder.Buffered"><code>Buffered</code></a>
+to provide access to the remaining data in its buffer,
+as well as a new method
+<a href="/pkg/encoding/json/#Decoder.UseNumber"><code>UseNumber</code></a>
+to unmarshal a value into the new type
+<a href="/pkg/encoding/json/#Number"><code>Number</code></a>,
+a string, rather than a float64.
+</li>
+
+<li>
+The <a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> package
+has a new function,
+<a href="/pkg/encoding/xml/#EscapeText"><code>EscapeText</code></a>,
+which writes escaped XML output,
+and a method on
+<a href="/pkg/encoding/xml/#Encoder"><code>Encoder</code></a>,
+<a href="/pkg/encoding/xml/#Encoder.Indent"><code>Indent</code></a>,
+to specify indented output.
+</li>
+
+<li>
+In the <a href="/pkg/go/ast/"><code>go/ast</code></a> package, a
+new type <a href="/pkg/go/ast/#CommentMap"><code>CommentMap</code></a>
+and associated methods makes it easier to extract and process comments in Go programs.
+</li>
+
+<li>
+In the <a href="/pkg/go/doc/"><code>go/doc</code></a> package,
+the parser now keeps better track of stylized annotations such as <code>TODO(joe)</code>
+throughout the code,
+information that the <a href="/cmd/godoc/"><code>godoc</code></a>
+command can filter or present according to the value of the <code>-notes</code> flag.
+</li>
+
+<li>
+The undocumented and only partially implemented "noescape" feature of the
+<a href="/pkg/html/template/"><code>html/template</code></a>
+package has been removed; programs that depend on it will break.
+</li>
+
+<li>
+The <a href="/pkg/image/jpeg/"><code>image/jpeg</code></a> package now
+reads progressive JPEG files and handles a few more subsampling configurations.
+</li>
+
+<li>
+The <a href="/pkg/io/"><code>io</code></a> package now exports the
+<a href="/pkg/io/#ByteWriter"><code>io.ByteWriter</code></a> interface to capture the common
+functionality of writing a byte at a time.
+It also exports a new error, <a href="/pkg/io/#ErrNoProgress"><code>ErrNoProgress</code></a>,
+used to indicate a <code>Read</code> implementation is looping without delivering data.
+</li>
+
+<li>
+The <a href="/pkg/log/syslog/"><code>log/syslog</code></a> package now provides better support
+for OS-specific logging features.
+</li>
+
+<li>
+The <a href="/pkg/math/big/"><code>math/big</code></a> package's
+<a href="/pkg/math/big/#Int"><code>Int</code></a> type
+now has methods
+<a href="/pkg/math/big/#Int.MarshalJSON"><code>MarshalJSON</code></a>
+and
+<a href="/pkg/math/big/#Int.UnmarshalJSON"><code>UnmarshalJSON</code></a>
+to convert to and from a JSON representation.
+Also,
+<a href="/pkg/math/big/#Int"><code>Int</code></a>
+can now convert directly to and from a <code>uint64</code> using
+<a href="/pkg/math/big/#Int.Uint64"><code>Uint64</code></a>
+and
+<a href="/pkg/math/big/#Int.SetUint64"><code>SetUint64</code></a>,
+while
+<a href="/pkg/math/big/#Rat"><code>Rat</code></a>
+can do the same with <code>float64</code> using
+<a href="/pkg/math/big/#Rat.Float64"><code>Float64</code></a>
+and
+<a href="/pkg/math/big/#Rat.SetFloat64"><code>SetFloat64</code></a>.
+</li>
+
+<li>
+The <a href="/pkg/mime/multipart/"><code>mime/multipart</code></a> package
+has a new method for its
+<a href="/pkg/mime/multipart/#Writer"><code>Writer</code></a>,
+<a href="/pkg/mime/multipart/#Writer.SetBoundary"><code>SetBoundary</code></a>,
+to define the boundary separator used to package the output.
+The <a href="/pkg/mime/multipart/#Reader"><code>Reader</code></a> also now
+transparently decodes any <code>quoted-printable</code> parts and removes
+the <code>Content-Transfer-Encoding</code> header when doing so.
+</li>
+
+<li>
+The
+<a href="/pkg/net/"><code>net</code></a> package's
+<a href="/pkg/net/#ListenUnixgram"><code>ListenUnixgram</code></a>
+function has changed return types: it now returns a
+<a href="/pkg/net/#UnixConn"><code>UnixConn</code></a>
+rather than a
+<a href="/pkg/net/#UDPConn"><code>UDPConn</code></a>, which was
+clearly a mistake in Go 1.0.
+Since this API change fixes a bug, it is permitted by the Go 1 compatibility rules.
+</li>
+
+<li>
+The <a href="/pkg/net/"><code>net</code></a> package includes a new type,
+<a href="/pkg/net/#Dialer"><code>Dialer</code></a>, to supply options to
+<a href="/pkg/net/#Dialer.Dial"><code>Dial</code></a>.
+</li>
+
+<li>
+The <a href="/pkg/net/"><code>net</code></a> package adds support for
+link-local IPv6 addresses with zone qualifiers, such as <code>fe80::1%lo0</code>.
+The address structures <a href="/pkg/net/#IPAddr"><code>IPAddr</code></a>,
+<a href="/pkg/net/#UDPAddr"><code>UDPAddr</code></a>, and
+<a href="/pkg/net/#TCPAddr"><code>TCPAddr</code></a>
+record the zone in a new field, and functions that expect string forms of these addresses, such as
+<a href="/pkg/net/#Dial"><code>Dial</code></a>,
+<a href="/pkg/net/#ResolveIPAddr"><code>ResolveIPAddr</code></a>,
+<a href="/pkg/net/#ResolveUDPAddr"><code>ResolveUDPAddr</code></a>, and
+<a href="/pkg/net/#ResolveTCPAddr"><code>ResolveTCPAddr</code></a>,
+now accept the zone-qualified form.
+</li>
+
+<li>
+The <a href="/pkg/net/"><code>net</code></a> package adds
+<a href="/pkg/net/#LookupNS"><code>LookupNS</code></a> to its suite of resolving functions.
+<code>LookupNS</code> returns the <a href="/pkg/net/#NS">NS records</a> for a host name.
+</li>
+
+<li>
+The <a href="/pkg/net/"><code>net</code></a> package adds protocol-specific
+packet reading and writing methods to
+<a href="/pkg/net/#IPConn"><code>IPConn</code></a>
+(<a href="/pkg/net/#IPConn.ReadMsgIP"><code>ReadMsgIP</code></a>
+and <a href="/pkg/net/#IPConn.WriteMsgIP"><code>WriteMsgIP</code></a>) and
+<a href="/pkg/net/#UDPConn"><code>UDPConn</code></a>
+(<a href="/pkg/net/#UDPConn.ReadMsgUDP"><code>ReadMsgUDP</code></a> and
+<a href="/pkg/net/#UDPConn.WriteMsgUDP"><code>WriteMsgUDP</code></a>).
+These are specialized versions of <a href="/pkg/net/#PacketConn"><code>PacketConn</code></a>'s
+<code>ReadFrom</code> and <code>WriteTo</code> methods that provide access to out-of-band data associated
+with the packets.
+ </li>
+
+ <li>
+The <a href="/pkg/net/"><code>net</code></a> package adds methods to
+<a href="/pkg/net/#UnixConn"><code>UnixConn</code></a> to allow closing half of the connection
+(<a href="/pkg/net/#UnixConn.CloseRead"><code>CloseRead</code></a> and
+<a href="/pkg/net/#UnixConn.CloseWrite"><code>CloseWrite</code></a>),
+matching the existing methods of <a href="/pkg/net/#TCPConn"><code>TCPConn</code></a>.
+</li>
+
+<li>
+The <a href="/pkg/net/http/"><code>net/http</code></a> package includes several new additions.
+<a href="/pkg/net/http/#ParseTime"><code>ParseTime</code></a> parses a time string, trying
+several common HTTP time formats.
+The <a href="/pkg/net/http/#Request.PostFormValue"><code>PostFormValue</code></a> method of
+<a href="/pkg/net/http/#Request"><code>Request</code></a> is like
+<a href="/pkg/net/http/#Request.FormValue"><code>FormValue</code></a> but ignores URL parameters.
+The <a href="/pkg/net/http/#CloseNotifier"><code>CloseNotifier</code></a> interface provides a mechanism
+for a server handler to discover when a client has disconnected.
+The <code>ServeMux</code> type now has a
+<a href="/pkg/net/http/#ServeMux.Handler"><code>Handler</code></a> method to access a path's
+<code>Handler</code> without executing it.
+The <code>Transport</code> can now cancel an in-flight request with
+<a href="/pkg/net/http/#Transport.CancelRequest"><code>CancelRequest</code></a>.
+Finally, the Transport is now more aggressive at closing TCP connections when
+a <a href="/pkg/net/http/#Response"><code>Response.Body</code></a> is closed before
+being fully consumed.
+</li>
+
+<li>
+The <a href="/pkg/net/mail/"><code>net/mail</code></a> package has two new functions,
+<a href="/pkg/net/mail/#ParseAddress"><code>ParseAddress</code></a> and
+<a href="/pkg/net/mail/#ParseAddressList"><code>ParseAddressList</code></a>,
+to parse RFC 5322-formatted mail addresses into
+<a href="/pkg/net/mail/#Address"><code>Address</code></a> structures.
+</li>
+
+<li>
+The <a href="/pkg/net/smtp/"><code>net/smtp</code></a> package's
+<a href="/pkg/net/smtp/#Client"><code>Client</code></a> type has a new method,
+<a href="/pkg/net/smtp/#Client.Hello"><code>Hello</code></a>,
+which transmits a <code>HELO</code> or <code>EHLO</code> message to the server.
+</li>
+
+<li>
+The <a href="/pkg/net/textproto/"><code>net/textproto</code></a> package
+has two new functions,
+<a href="/pkg/net/textproto/#TrimBytes"><code>TrimBytes</code></a> and
+<a href="/pkg/net/textproto/#TrimString"><code>TrimString</code></a>,
+which do ASCII-only trimming of leading and trailing spaces.
+</li>
+
+<li>
+The new method <a href="/pkg/os/#FileMode.IsRegular"><code>os.FileMode.IsRegular</code></a> makes it easy to ask if a file is a plain file.
+</li>
+
+<li>
+The <a href="/pkg/os/signal/"><code>os/signal</code></a> package has a new function,
+<a href="/pkg/os/signal/#Stop"><code>Stop</code></a>, which stops the package delivering
+any further signals to the channel.
+</li>
+
+<li>
+The <a href="/pkg/regexp/"><code>regexp</code></a> package
+now supports Unix-original leftmost-longest matches through the
+<a href="/pkg/regexp/#Regexp.Longest"><code>Regexp.Longest</code></a>
+method, while
+<a href="/pkg/regexp/#Regexp.Split"><code>Regexp.Split</code></a> slices
+strings into pieces based on separators defined by the regular expression.
+</li>
+
+<li>
+The <a href="/pkg/runtime/debug/"><code>runtime/debug</code></a> package
+has three new functions regarding memory usage.
+The <a href="/pkg/runtime/debug/#FreeOSMemory"><code>FreeOSMemory</code></a>
+function triggers a run of the garbage collector and then attempts to return unused
+memory to the operating system;
+the <a href="/pkg/runtime/debug/#ReadGCStats"><code>ReadGCStats</code></a>
+function retrieves statistics about the collector; and
+<a href="/pkg/runtime/debug/#SetGCPercent"><code>SetGCPercent</code></a>
+provides a programmatic way to control how often the collector runs,
+including disabling it altogether.
+</li>
+
+<li>
+The <a href="/pkg/sort/"><code>sort</code></a> package has a new function,
+<a href="/pkg/sort/#Reverse"><code>Reverse</code></a>.
+Wrapping the argument of a call to
+<a href="/pkg/sort/#Sort"><code>sort.Sort</code></a>
+with a call to <code>Reverse</code> causes the sort order to be reversed.
+</li>
+
+<li>
+The <a href="/pkg/strings/"><code>strings</code></a> package has two new functions,
+<a href="/pkg/strings/#TrimPrefix"><code>TrimPrefix</code></a>
+and
+<a href="/pkg/strings/#TrimSuffix"><code>TrimSuffix</code></a>
+with self-evident properties, and the new method
+<a href="/pkg/strings/#Reader.WriteTo"><code>Reader.WriteTo</code></a> so the
+<a href="/pkg/strings/#Reader"><code>Reader</code></a>
+type now implements the
+<a href="/pkg/io/#WriterTo"><code>io.WriterTo</code></a> interface.
+</li>
+
+<li>
+The <a href="/pkg/syscall/"><code>syscall</code></a> package's
+<a href="/pkg/syscall/#Fchflags"><code>Fchflags</code></a> function on various BSDs
+(including Darwin) has changed signature.
+It now takes an int as the first parameter instead of a string.
+Since this API change fixes a bug, it is permitted by the Go 1 compatibility rules.
+</li>
+<li>
+The <a href="/pkg/syscall/"><code>syscall</code></a> package also has received many updates
+to make it more inclusive of constants and system calls for each supported operating system.
+</li>
+
+<li>
+The <a href="/pkg/testing/"><code>testing</code></a> package now automates the generation of allocation
+statistics in tests and benchmarks using the new
+<a href="/pkg/testing/#AllocsPerRun"><code>AllocsPerRun</code></a> function. And the
+<a href="/pkg/testing/#B.ReportAllocs"><code>ReportAllocs</code></a>
+method on <a href="/pkg/testing/#B"><code>testing.B</code></a> will enable printing of
+memory allocation statistics for the calling benchmark. It also introduces the
+<a href="/pkg/testing/#BenchmarkResult.AllocsPerOp"><code>AllocsPerOp</code></a> method of
+<a href="/pkg/testing/#BenchmarkResult"><code>BenchmarkResult</code></a>.
+There is also a new
+<a href="/pkg/testing/#Verbose"><code>Verbose</code></a> function to test the state of the <code>-v</code>
+command-line flag,
+and a new
+<a href="/pkg/testing/#B.Skip"><code>Skip</code></a> method of
+<a href="/pkg/testing/#B"><code>testing.B</code></a> and
+<a href="/pkg/testing/#T"><code>testing.T</code></a>
+to simplify skipping an inappropriate test.
+</li>
+
+<li>
+In the <a href="/pkg/text/template/"><code>text/template</code></a>
+and
+<a href="/pkg/html/template/"><code>html/template</code></a> packages,
+templates can now use parentheses to group the elements of pipelines, simplifying the construction of complex pipelines.
+Also, as part of the new parser, the
+<a href="/pkg/text/template/parse/#Node"><code>Node</code></a> interface got two new methods to provide
+better error reporting.
+Although this violates the Go 1 compatibility rules,
+no existing code should be affected because this interface is explicitly intended only to be used
+by the
+<a href="/pkg/text/template/"><code>text/template</code></a>
+and
+<a href="/pkg/html/template/"><code>html/template</code></a>
+packages and there are safeguards to guarantee that.
+</li>
+
+<li>
+The implementation of the <a href="/pkg/unicode/"><code>unicode</code></a> package has been updated to Unicode version 6.2.0.
+</li>
+
+<li>
+In the <a href="/pkg/unicode/utf8/"><code>unicode/utf8</code></a> package,
+the new function <a href="/pkg/unicode/utf8/#ValidRune"><code>ValidRune</code></a> reports whether the rune is a valid Unicode code point.
+To be valid, a rune must be in range and not be a surrogate half.
+</li>
+</ul>
diff --git a/_content/doc/go1.10.html b/_content/doc/go1.10.html
new file mode 100644
index 0000000..853f874
--- /dev/null
+++ b/_content/doc/go1.10.html
@@ -0,0 +1,1448 @@
+<!--{
+	"Title": "Go 1.10 Release Notes",
+	"Path":  "/doc/go1.10",
+	"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.10</h2>
+
+<p>
+The latest Go release, version 1.10, arrives six months after <a href="go1.9">Go 1.9</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>
+This release improves <a href="#build">caching of built packages</a>,
+adds <a href="#test">caching of successful test results</a>,
+runs <a href="#test-vet">vet automatically during tests</a>,
+and
+permits <a href="#cgo">passing string values directly between Go and C using cgo</a>.
+A new <a href="#cgo">hard-coded set of safe compiler options</a> may cause
+unexpected <a href="https://golang.org/s/invalidflag"><code>invalid
+flag</code></a> errors in code that built successfully with older
+releases.
+</p>
+
+<h2 id="language">Changes to the language</h2>
+
+<p>
+There are no significant changes to the language specification.
+</p>
+
+<p><!-- CL 60230 -->
+A corner case involving shifts of untyped constants has been clarified,
+and as a result the compilers have been updated to allow the index expression
+<code>x[1.0</code>&nbsp;<code>&lt;&lt;</code>&nbsp;<code>s]</code> where <code>s</code> is an unsigned integer;
+the <a href="/pkg/go/types/">go/types</a> package already did.
+</p>
+
+<p><!-- CL 73233 -->
+The grammar for method expressions has been updated to relax the
+syntax to allow any type expression as a receiver;
+this matches what the compilers were already implementing.
+For example, <code>struct{io.Reader}.Read</code> is a valid, if unusual,
+method expression that the compilers already accepted and is
+now permitted by the language grammar.
+</p>
+
+<h2 id="ports">Ports</h2>
+
+<p>
+There are no new supported operating systems or processor architectures in this release.
+Most of the work has focused on strengthening the support for existing ports,
+in particular <a href="#asm">new instructions in the assembler</a>
+and improvements to the code generated by the compilers.
+</p>
+
+<p id="freebsd">
+As <a href="go1.9#freebsd">announced in the Go 1.9 release notes</a>,
+Go 1.10 now requires FreeBSD 10.3 or later;
+support for FreeBSD 9.3 has been removed.
+</p>
+
+<p id="netbsd">
+Go now runs on NetBSD again but requires the unreleased NetBSD 8.
+Only <code>GOARCH</code> <code>amd64</code> and <code>386</code> have
+been fixed. The <code>arm</code> port is still broken.
+</p>
+
+<p id="mips">
+On 32-bit MIPS systems, the new environment variable settings
+<code>GOMIPS=hardfloat</code> (the default) and
+<code>GOMIPS=softfloat</code> select whether to use
+hardware instructions or software emulation for floating-point computations.
+</p>
+
+<p id="openbsd">
+Go 1.10 is the last release that will run on OpenBSD 6.0.
+Go 1.11 will require OpenBSD 6.2.
+</p>
+
+<p id="darwin">
+Go 1.10 is the last release that will run on OS X 10.8 Mountain Lion or OS X 10.9 Mavericks.
+Go 1.11 will require OS X 10.10 Yosemite or later.
+</p>
+
+<p id="windows">
+Go 1.10 is the last release that will run on Windows XP or Windows Vista.
+Go 1.11 will require Windows 7 or later.
+</p>
+
+<h2 id="tools">Tools</h2>
+
+<h3 id="goroot">Default GOROOT &amp; GOTMPDIR</h3>
+
+<p>
+If the environment variable <code>$GOROOT</code> is unset,
+the go tool previously used the default <code>GOROOT</code>
+set during toolchain compilation.
+Now, before falling back to that default, the go tool attempts to
+deduce <code>GOROOT</code> from its own executable path.
+This allows binary distributions to be unpacked anywhere in the
+file system and then be used without setting <code>GOROOT</code>
+explicitly.
+</p>
+
+<p>
+By default, the go tool creates its temporary files and directories
+in the system temporary directory (for example, <code>$TMPDIR</code> on Unix).
+If the new environment variable <code>$GOTMPDIR</code> is set,
+the go tool will creates its temporary files and directories in that directory instead.
+</p>
+
+<h3 id="build">Build &amp; Install</h3>
+
+<p>
+The <code>go</code>&nbsp;<code>build</code> command now detects out-of-date packages
+purely based on the content of source files, specified build flags, and metadata stored in the compiled packages.
+Modification times are no longer consulted or relevant.
+The old advice to add <code>-a</code> to force a rebuild in cases where
+the modification times were misleading for one reason or another
+(for example, changes in build flags) is no longer necessary:
+builds now always detect when packages must be rebuilt.
+(If you observe otherwise, please file a bug.)
+</p>
+
+<p>
+The <code>go</code>&nbsp;<code>build</code> <code>-asmflags</code>, <code>-gcflags</code>, <code>-gccgoflags</code>, and <code>-ldflags</code> options
+now apply by default only to the packages listed directly on the command line.
+For example, <code>go</code> <code>build</code> <code>-gcflags=-m</code> <code>mypkg</code>
+passes the compiler the <code>-m</code> flag when building <code>mypkg</code>
+but not its dependencies.
+The new, more general form <code>-asmflags=pattern=flags</code> (and similarly for the others)
+applies the <code>flags</code> only to the packages matching the pattern.
+For example: <code>go</code> <code>install</code> <code>-ldflags=cmd/gofmt=-X=main.version=1.2.3</code> <code>cmd/...</code>
+installs all the commands matching <code>cmd/...</code> but only applies the <code>-X</code> option
+to the linker flags for <code>cmd/gofmt</code>.
+For more details, see <a href="/cmd/go/#hdr-Compile_packages_and_dependencies"><code>go</code> <code>help</code> <code>build</code></a>.
+</p>
+
+<p>
+The <code>go</code>&nbsp;<code>build</code> command now maintains a cache of
+recently built packages, separate from the installed packages in <code>$GOROOT/pkg</code> or <code>$GOPATH/pkg</code>.
+The effect of the cache should be to speed builds that do not explicitly install packages
+or when switching between different copies of source code (for example, when changing
+back and forth between different branches in a version control system).
+The old advice to add the <code>-i</code> flag for speed, as in <code>go</code> <code>build</code> <code>-i</code>
+or <code>go</code> <code>test</code> <code>-i</code>,
+is no longer necessary: builds run just as fast without <code>-i</code>.
+For more details, see <a href="/cmd/go/#hdr-Build_and_test_caching"><code>go</code> <code>help</code> <code>cache</code></a>.
+</p>
+
+<p>
+The <code>go</code>&nbsp;<code>install</code> command now installs only the
+packages and commands listed directly on the command line.
+For example, <code>go</code> <code>install</code> <code>cmd/gofmt</code>
+installs the gofmt program but not any of the packages on which it depends.
+The new build cache makes future commands still run as quickly as if the
+dependencies had been installed.
+To force the installation of dependencies, use the new
+<code>go</code> <code>install</code> <code>-i</code> flag.
+Installing dependency packages should not be necessary in general,
+and the very concept of installed packages may disappear in a future release.
+</p>
+
+<p>
+Many details of the <code>go</code>&nbsp;<code>build</code> implementation have changed to support these improvements.
+One new requirement implied by these changes is that
+binary-only packages must now declare accurate import blocks in their
+stub source code, so that those imports can be made available when
+linking a program using the binary-only package.
+For more details, see <a href="/cmd/go/#hdr-File_types"><code>go</code> <code>help</code> <code>filetype</code></a>.
+</p>
+
+<h3 id="test">Test</h3>
+
+<p>
+The <code>go</code>&nbsp;<code>test</code> command now caches test results:
+if the test executable and command line match a previous run
+and the files and environment variables consulted by that run
+have not changed either, <code>go</code> <code>test</code> will print
+the previous test output, replacing the elapsed time with the string “(cached).”
+Test caching applies only to successful test results;
+only to <code>go</code> <code>test</code>
+commands with an explicit list of packages; and
+only to command lines using a subset of the
+<code>-cpu</code>, <code>-list</code>, <code>-parallel</code>,
+<code>-run</code>, <code>-short</code>, and <code>-v</code> test flags.
+The idiomatic way to bypass test caching is to use <code>-count=1</code>.
+</p>
+
+<p id="test-vet">
+The <code>go</code>&nbsp;<code>test</code> command now automatically runs
+<code>go</code> <code>vet</code> on the package being tested,
+to identify significant problems before running the test.
+Any such problems are treated like build errors and prevent execution of the test.
+Only a high-confidence subset of the available <code>go</code> <code>vet</code>
+checks are enabled for this automatic check.
+To disable the running of <code>go</code> <code>vet</code>, use
+<code>go</code> <code>test</code> <code>-vet=off</code>.
+</p>
+
+<p>
+The <code>go</code> <code>test</code> <code>-coverpkg</code> flag now
+interprets its argument as a comma-separated list of patterns to match against
+the dependencies of each test, not as a list of packages to load anew.
+For example, <code>go</code> <code>test</code> <code>-coverpkg=all</code>
+is now a meaningful way to run a test with coverage enabled for the test package
+and all its dependencies.
+Also, the <code>go</code> <code>test</code> <code>-coverprofile</code> option is now
+supported when running multiple tests.
+</p>
+
+<p>
+In case of failure due to timeout, tests are now more likely to write their profiles before exiting.
+</p>
+
+<p>
+The <code>go</code>&nbsp;<code>test</code> command now always
+merges the standard output and standard error from a given test binary execution
+and writes both to <code>go</code> <code>test</code>'s standard output.
+In past releases, <code>go</code> <code>test</code> only applied this
+merging most of the time.
+</p>
+
+<p>
+The <code>go</code>&nbsp;<code>test</code> <code>-v</code> output
+now includes <code>PAUSE</code> and <code>CONT</code> status update
+lines to mark when <a href="/pkg/testing/#T.Parallel">parallel tests</a> pause and continue.
+</p>
+
+<p>
+The new <code>go</code> <code>test</code> <code>-failfast</code> flag
+disables running additional tests after any test fails.
+Note that tests running in parallel with the failing test are allowed to complete.
+</p>
+
+<p>
+Finally, the new <code>go</code> <code>test</code> <code>-json</code> flag
+filters test output through the new command
+<code>go</code> <code>tool</code> <code>test2json</code>
+to produce a machine-readable JSON-formatted description of test execution.
+This allows the creation of rich presentations of test execution
+in IDEs and other tools.
+</p>
+
+
+<p>
+For more details about all these changes,
+see <a href="/cmd/go/#hdr-Test_packages"><code>go</code> <code>help</code> <code>test</code></a>
+and the <a href="/cmd/test2json/">test2json documentation</a>.
+</p>
+
+<h3 id="cgo">Cgo</h3>
+
+<p>
+Options specified by cgo using <code>#cgo CFLAGS</code> and the like
+are now checked against a list of permitted options.
+This closes a security hole in which a downloaded package uses
+compiler options like
+<span style="white-space: nowrap"><code>-fplugin</code></span>
+to run arbitrary code on the machine where it is being built.
+This can cause a build error such as <code>invalid flag in #cgo CFLAGS</code>.
+For more background, and how to handle this error, see
+<a href="https://golang.org/s/invalidflag">https://golang.org/s/invalidflag</a>.
+</p>
+
+<p>
+Cgo now implements a C typedef like “<code>typedef</code> <code>X</code> <code>Y</code>” using a Go type alias,
+so that Go code may use the types <code>C.X</code> and <code>C.Y</code> interchangeably.
+It also now supports the use of niladic function-like macros.
+Also, the documentation has been updated to clarify that
+Go structs and Go arrays are not supported in the type signatures of cgo-exported functions.
+</p>
+
+<p>
+Cgo now supports direct access to Go string values from C.
+Functions in the C preamble may use the type <code>_GoString_</code>
+to accept a Go string as an argument.
+C code may call <code>_GoStringLen</code> and <code>_GoStringPtr</code>
+for direct access to the contents of the string.
+A value of type <code>_GoString_</code>
+may be passed in a call to an exported Go function that takes an argument of Go type <code>string</code>.
+</p>
+
+<p>
+During toolchain bootstrap, the environment variables <code>CC</code> and <code>CC_FOR_TARGET</code> specify
+the default C compiler that the resulting toolchain will use for host and target builds, respectively.
+However, if the toolchain will be used with multiple targets, it may be necessary to specify a different C compiler for each
+(for example, a different compiler for <code>darwin/arm64</code> versus <code>linux/ppc64le</code>).
+The new set of environment variables <code>CC_FOR_<i>goos</i>_<i>goarch</i></code>
+allows specifying a different default C compiler for each target.
+Note that these variables only apply during toolchain bootstrap,
+to set the defaults used by the resulting toolchain.
+Later <code>go</code> <code>build</code> commands use the <code>CC</code> environment
+variable or else the built-in default.
+</p>
+
+<p>
+Cgo now translates some C types that would normally map to a pointer
+type in Go, to a <code>uintptr</code> instead. These types include
+the <code>CFTypeRef</code> hierarchy in Darwin's CoreFoundation
+framework and the <code>jobject</code> hierarchy in Java's JNI
+interface.
+</p>
+
+<p>
+These types must be <code>uintptr</code> on the Go side because they
+would otherwise confuse the Go garbage collector; they are sometimes
+not really pointers but data structures encoded in a pointer-sized integer.
+Pointers to Go memory must not be stored in these <code>uintptr</code> values.
+</p>
+
+<p>
+Because of this change, values of the affected types need to be
+zero-initialized with the constant <code>0</code> instead of the
+constant <code>nil</code>. Go 1.10 provides <code>gofix</code>
+modules to help with that rewrite:
+</p>
+
+<pre>
+go tool fix -r cftype &lt;pkg&gt;
+go tool fix -r jni &lt;pkg&gt;
+</pre>
+
+<p>
+For more details, see the <a href="/cmd/cgo/">cgo documentation</a>.
+</p>
+
+<h3 id="doc">Doc</h3>
+
+<p>
+The <code>go</code>&nbsp;<code>doc</code> tool now adds functions returning slices of <code>T</code> or <code>*T</code>
+to the display of type <code>T</code>, similar to the existing behavior for functions returning single <code>T</code> or <code>*T</code> results.
+For example:
+</p>
+
+<pre>
+$ go doc mail.Address
+package mail // import "net/mail"
+
+type Address struct {
+	Name    string
+	Address string
+}
+    Address represents a single mail address.
+
+func ParseAddress(address string) (*Address, error)
+func ParseAddressList(list string) ([]*Address, error)
+func (a *Address) String() string
+$
+</pre>
+
+<p>
+Previously, <code>ParseAddressList</code> was only shown in the package overview (<code>go</code> <code>doc</code> <code>mail</code>).
+</p>
+
+<h3 id="fix">Fix</h3>
+
+<p>
+The <code>go</code>&nbsp;<code>fix</code> tool now replaces imports of <code>"golang.org/x/net/context"</code>
+with <code>"context"</code>.
+(Forwarding aliases in the former make it completely equivalent to the latter when using Go 1.9 or later.)
+</p>
+
+<h3 id="get">Get</h3>
+
+<p>
+The <code>go</code>&nbsp;<code>get</code> command now supports Fossil source code repositories.
+</p>
+
+<h3 id="pprof">Pprof</h3>
+
+<p>
+The blocking and mutex profiles produced by the <code>runtime/pprof</code> package
+now include symbol information, so they can be viewed
+in <code>go</code> <code>tool</code> <code>pprof</code>
+without the binary that produced the profile.
+(All other profile types were changed to include symbol information in Go 1.9.)
+</p>
+
+<p>
+The <a href="/cmd/pprof/"><code>go</code>&nbsp;<code>tool</code>&nbsp;<code>pprof</code></a>
+profile visualizer has been updated to git version 9e20b5b (2017-11-08)
+from <a href="https://github.com/google/pprof">github.com/google/pprof</a>,
+which includes an updated web interface.
+</p>
+
+<h3 id="vet">Vet</h3>
+
+<p>
+The <a href="/cmd/vet/"><code>go</code>&nbsp;<code>vet</code></a> command now always has access to
+complete, up-to-date type information when checking packages, even for packages using cgo or vendored imports.
+The reports should be more accurate as a result.
+Note that only <code>go</code>&nbsp;<code>vet</code> has access to this information;
+the more low-level <code>go</code>&nbsp;<code>tool</code>&nbsp;<code>vet</code> does not
+and should be avoided except when working on <code>vet</code> itself.
+(As of Go 1.9, <code>go</code>&nbsp;<code>vet</code> provides access to all the same flags as
+<code>go</code>&nbsp;<code>tool</code>&nbsp;<code>vet</code>.)
+</p>
+
+<h3 id="diag">Diagnostics</h3>
+
+<p>
+This release includes a new <a href="/doc/diagnostics.html">overview of available Go program diagnostic tools</a>.
+</p>
+
+<h3 id="gofmt">Gofmt</h3>
+
+<p>
+Two minor details of the default formatting of Go source code have changed.
+First, certain complex three-index slice expressions previously formatted like
+<code>x[i+1</code>&nbsp;<code>:</code>&nbsp;<code>j:k]</code> and now
+format with more consistent spacing: <code>x[i+1</code>&nbsp;<code>:</code>&nbsp;<code>j</code>&nbsp;<code>:</code>&nbsp;<code>k]</code>.
+Second, single-method interface literals written on a single line,
+which are sometimes used in type assertions,
+are no longer split onto multiple lines.
+</p>
+
+<p>
+Note that these kinds of minor updates to gofmt are expected from time to time.
+In general, we recommend against building systems that check that source code
+matches the output of a specific version of gofmt.
+For example, a continuous integration test that fails if any code already checked into
+a repository is not “properly formatted” is inherently fragile and not recommended.
+</p>
+
+<p>
+If multiple programs must agree about which version of gofmt is used to format a source file,
+we recommend that they do this by arranging to invoke the same gofmt binary.
+For example, in the Go open source repository, our Git pre-commit hook is written in Go
+and could import <code>go/format</code> directly, but instead it invokes the <code>gofmt</code>
+binary found in the current path, so that the pre-commit hook need not be recompiled
+each time <code>gofmt</code> changes.
+</p>
+
+<h3 id="compiler">Compiler Toolchain</h3>
+
+<p>
+The compiler includes many improvements to the performance of generated code,
+spread fairly evenly across the supported architectures.
+</p>
+
+<p>
+The DWARF debug information recorded in binaries has been improved in a few ways:
+constant values are now recorded;
+line number information is more accurate, making source-level stepping through a program work better;
+and each package is now presented as its own DWARF compilation unit.
+</p>
+
+<p>
+The various <a href="https://docs.google.com/document/d/1nr-TQHw_er6GOQRsF6T43GGhFDelrAP0NqSS_00RgZQ/edit">build modes</a>
+have been ported to more systems.
+Specifically, <code>c-shared</code> now works on <code>linux/ppc64le</code>, <code>windows/386</code>, and <code>windows/amd64</code>;
+<code>pie</code> now works on <code>darwin/amd64</code> and also forces the use of external linking on all systems;
+and <code>plugin</code> now works on <code>linux/ppc64le</code> and <code>darwin/amd64</code>.
+</p>
+
+<p>
+The <code>linux/ppc64le</code> port now requires the use of external linking
+with any programs that use cgo, even uses by the standard library.
+</p>
+
+<h3 id="asm">Assembler</h3>
+
+<p>
+For the ARM 32-bit port, the assembler now supports the instructions
+<code><small>BFC</small></code>,
+<code><small>BFI</small></code>,
+<code><small>BFX</small></code>,
+<code><small>BFXU</small></code>,
+<code><small>FMULAD</small></code>,
+<code><small>FMULAF</small></code>,
+<code><small>FMULSD</small></code>,
+<code><small>FMULSF</small></code>,
+<code><small>FNMULAD</small></code>,
+<code><small>FNMULAF</small></code>,
+<code><small>FNMULSD</small></code>,
+<code><small>FNMULSF</small></code>,
+<code><small>MULAD</small></code>,
+<code><small>MULAF</small></code>,
+<code><small>MULSD</small></code>,
+<code><small>MULSF</small></code>,
+<code><small>NMULAD</small></code>,
+<code><small>NMULAF</small></code>,
+<code><small>NMULD</small></code>,
+<code><small>NMULF</small></code>,
+<code><small>NMULSD</small></code>,
+<code><small>NMULSF</small></code>,
+<code><small>XTAB</small></code>,
+<code><small>XTABU</small></code>,
+<code><small>XTAH</small></code>,
+and
+<code><small>XTAHU</small></code>.
+</p>
+
+<p>
+For the ARM 64-bit port, the assembler now supports the
+<code><small>VADD</small></code>,
+<code><small>VADDP</small></code>,
+<code><small>VADDV</small></code>,
+<code><small>VAND</small></code>,
+<code><small>VCMEQ</small></code>,
+<code><small>VDUP</small></code>,
+<code><small>VEOR</small></code>,
+<code><small>VLD1</small></code>,
+<code><small>VMOV</small></code>,
+<code><small>VMOVI</small></code>,
+<code><small>VMOVS</small></code>,
+<code><small>VORR</small></code>,
+<code><small>VREV32</small></code>,
+and
+<code><small>VST1</small></code>
+instructions.
+</p>
+
+<p>
+For the PowerPC 64-bit port, the assembler now supports the POWER9 instructions
+<code><small>ADDEX</small></code>,
+<code><small>CMPEQB</small></code>,
+<code><small>COPY</small></code>,
+<code><small>DARN</small></code>,
+<code><small>LDMX</small></code>,
+<code><small>MADDHD</small></code>,
+<code><small>MADDHDU</small></code>,
+<code><small>MADDLD</small></code>,
+<code><small>MFVSRLD</small></code>,
+<code><small>MTVSRDD</small></code>,
+<code><small>MTVSRWS</small></code>,
+<code><small>PASTECC</small></code>,
+<code><small>VCMPNEZB</small></code>,
+<code><small>VCMPNEZBCC</small></code>,
+and
+<code><small>VMSUMUDM</small></code>.
+</p>
+
+<p>
+For the S390X port, the assembler now supports the
+<code><small>TMHH</small></code>,
+<code><small>TMHL</small></code>,
+<code><small>TMLH</small></code>,
+and
+<code><small>TMLL</small></code>
+instructions.
+</p>
+
+<p>
+For the X86 64-bit port, the assembler now supports 359 new instructions,
+including the full AVX, AVX2, BMI, BMI2, F16C, FMA3, SSE2, SSE3, SSSE3, SSE4.1, and SSE4.2 extension sets.
+The assembler also no longer implements <code><small>MOVL</small></code>&nbsp;<code><small>$0,</small></code>&nbsp;<code><small>AX</small></code>
+as an <code><small>XORL</small></code> instruction,
+to avoid clearing the condition flags unexpectedly.
+</p>
+
+<h3 id="gccgo">Gccgo</h3>
+
+<p>
+Due to the alignment of Go's semiannual release schedule with GCC's
+annual release schedule,
+GCC release 7 contains the Go 1.8.3 version of gccgo.
+We expect that the next release, GCC 8, will contain the Go 1.10
+version of gccgo.
+</p>
+
+<h2 id="runtime">Runtime</h2>
+
+<p>
+The behavior of nested calls to
+<a href="/pkg/runtime/#LockOSThread"><code>LockOSThread</code></a> and
+<a href="/pkg/runtime/#UnlockOSThread"><code>UnlockOSThread</code></a>
+has changed.
+These functions control whether a goroutine is locked to a specific operating system thread,
+so that the goroutine only runs on that thread, and the thread only runs that goroutine.
+Previously, calling <code>LockOSThread</code> more than once in a row
+was equivalent to calling it once, and a single <code>UnlockOSThread</code>
+always unlocked the thread.
+Now, the calls nest: if <code>LockOSThread</code> is called multiple times,
+<code>UnlockOSThread</code> must be called the same number of times
+in order to unlock the thread.
+Existing code that was careful not to nest these calls will remain correct.
+Existing code that incorrectly assumed the calls nested will become correct.
+Most uses of these functions in public Go source code falls into the second category.
+</p>
+
+<p>
+Because one common use of <code>LockOSThread</code> and <code>UnlockOSThread</code>
+is to allow Go code to reliably modify thread-local state (for example, Linux or Plan 9 name spaces),
+the runtime now treats locked threads as unsuitable for reuse or for creating new threads.
+</p>
+
+<p>
+Stack traces no longer include implicit wrapper functions (previously marked <code>&lt;autogenerated&gt;</code>),
+unless a fault or panic happens in the wrapper itself.
+As a result, skip counts passed to functions like <a href="/pkg/runtime/#Caller"><code>Caller</code></a>
+should now always match the structure of the code as written, rather than depending on
+optimization decisions and implementation details.
+</p>
+
+<p>
+The garbage collector has been modified to reduce its impact on allocation latency.
+It now uses a smaller fraction of the overall CPU when running, but it may run more of the time.
+The total CPU consumed by the garbage collector has not changed significantly.
+</p>
+
+<p>
+The <a href="/pkg/runtime/#GOROOT"><code>GOROOT</code></a> function
+now defaults (when the <code>$GOROOT</code> environment variable is not set)
+to the <code>GOROOT</code> or <code>GOROOT_FINAL</code> in effect
+at the time the calling program was compiled.
+Previously it used the <code>GOROOT</code> or <code>GOROOT_FINAL</code> in effect
+at the time the toolchain that compiled the calling program was compiled.
+</p>
+
+<p>
+There is no longer a limit on the <a href="/pkg/runtime/#GOMAXPROCS"><code>GOMAXPROCS</code></a> setting.
+(In Go 1.9 the limit was 1024.)
+</p>
+
+<h2 id="performance">Performance</h2>
+
+<p>
+As always, the changes are so general and varied that precise
+statements about performance are difficult to make.  Most programs
+should run a bit faster, due to speedups in the garbage collector,
+better generated code, and optimizations in the core library.
+</p>
+
+<h2 id="gc">Garbage Collector</h2>
+
+<p>
+Many applications should experience significantly lower allocation latency and overall performance overhead when the garbage collector is active.
+</p>
+
+<h2 id="library">Core library</h2>
+
+<p>
+All of the changes to the standard library are minor.
+The changes in <a href="#bytes">bytes</a>
+and <a href="#net/url">net/url</a> are the most likely to require updating of existing programs.
+</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="archive/tar"><dt><a href="/pkg/archive/tar/">archive/tar</a></dt>
+<dd>
+<p>
+In general, the handling of special header formats is significantly improved and expanded.
+</p>
+<p>
+<a href="/pkg/archive/tar/#FileInfoHeader"><code>FileInfoHeader</code></a> has always
+recorded the Unix UID and GID numbers from its <a href="/pkg/os/#FileInfo"><code>os.FileInfo</code></a> argument
+(specifically, from the system-dependent information returned by the <code>FileInfo</code>'s <code>Sys</code> method)
+in the returned <a href="/pkg/archive/tar/#Header"><code>Header</code></a>.
+Now it also records the user and group names corresponding to those IDs,
+as well as the major and minor device numbers for device files.
+</p>
+<p>
+The new <a href="/pkg/archive/tar/#Header"><code>Header.Format</code></a> field
+of type <a href="/pkg/archive/tar/#Format"><code>Format</code></a>
+controls which tar header format the <a href="/pkg/archive/tar/#Writer"><code>Writer</code></a> uses.
+The default, as before, is to select the most widely-supported header type
+that can encode the fields needed by the header (USTAR if possible, or else PAX if possible, or else GNU).
+The <a href="/pkg/archive/tar/#Reader"><code>Reader</code></a> sets <code>Header.Format</code> for each header it reads.
+</p>
+<p>
+<code>Reader</code> and the <code>Writer</code> now support arbitrary PAX records,
+using the new <a href="/pkg/archive/tar/#Header"><code>Header.PAXRecords</code></a> field,
+a generalization of the existing <code>Xattrs</code> field.
+</p>
+<p>
+The <code>Reader</code> no longer insists that the file name or link name in GNU headers
+be valid UTF-8.
+</p>
+<p>
+When writing PAX- or GNU-format headers, the <code>Writer</code> now includes
+the <code>Header.AccessTime</code> and <code>Header.ChangeTime</code> fields (if set).
+When writing PAX-format headers, the times include sub-second precision.
+</p>
+</dl>
+
+<dl id="archive/zip"><dt><a href="/pkg/archive/zip/">archive/zip</a></dt>
+<dd>
+<p>
+Go 1.10 adds more complete support for times and character set encodings in ZIP archives.
+</p>
+<p>
+The original ZIP format used the standard MS-DOS encoding of year, month, day, hour, minute, and second into fields in two 16-bit values.
+That encoding cannot represent time zones or odd seconds, so multiple extensions have been
+introduced to allow richer encodings.
+In Go 1.10, the <a href="/pkg/archive/zip/#Reader"><code>Reader</code></a> and <a href="/pkg/archive/zip/#Writer"><code>Writer</code></a>
+now support the widely-understood Info-Zip extension that encodes the time separately in the 32-bit Unix “seconds since epoch” form.
+The <a href="/pkg/archive/zip/#FileHeader"><code>FileHeader</code></a>'s new <code>Modified</code> field of type <a href="/pkg/time/#Time"><code>time.Time</code></a>
+obsoletes the <code>ModifiedTime</code> and <code>ModifiedDate</code> fields, which continue to hold the MS-DOS encoding.
+The <code>Reader</code> and <code>Writer</code> now adopt the common
+convention that a ZIP archive storing a time zone-independent Unix time
+also stores the local time in the MS-DOS field,
+so that the time zone offset can be inferred.
+For compatibility, the <a href="/pkg/archive/zip/#FileHeader.ModTime"><code>ModTime</code></a> and
+<a href="/pkg/archive/zip/#FileHeader.SetModTime"><code>SetModTime</code></a> methods
+behave the same as in earlier releases; new code should use <code>Modified</code> directly.
+</p>
+<p>
+The header for each file in a ZIP archive has a flag bit indicating whether
+the name and comment fields are encoded as UTF-8, as opposed to a system-specific default encoding.
+In Go 1.8 and earlier, the <code>Writer</code> never set the UTF-8 bit.
+In Go 1.9, the <code>Writer</code> changed to set the UTF-8 bit almost always.
+This broke the creation of ZIP archives containing Shift-JIS file names.
+In Go 1.10, the <code>Writer</code> now sets the UTF-8 bit only when
+both the name and the comment field are valid UTF-8 and at least one is non-ASCII.
+Because non-ASCII encodings very rarely look like valid UTF-8, the new
+heuristic should be correct nearly all the time.
+Setting a <code>FileHeader</code>'s new <code>NonUTF8</code> field to true
+disables the heuristic entirely for that file.
+</p>
+<p>
+The <code>Writer</code> also now supports setting the end-of-central-directory record's comment field,
+by calling the <code>Writer</code>'s new <a href="/pkg/archive/zip/#Writer.SetComment"><code>SetComment</code></a> method.
+</p>
+</dl>
+
+<dl id="bufio"><dt><a href="/pkg/bufio/">bufio</a></dt>
+<dd>
+<p>
+The new <a href="/pkg/bufio/#Reader.Size"><code>Reader.Size</code></a>
+and <a href="/pkg/bufio/#Writer.Size"><code>Writer.Size</code></a>
+methods report the <code>Reader</code> or <code>Writer</code>'s underlying buffer size.
+</p>
+</dl>
+
+<dl id="bytes"><dt><a href="/pkg/bytes/">bytes</a></dt>
+<dd>
+<p>
+The
+<a href="/pkg/bytes/#Fields"><code>Fields</code></a>,
+<a href="/pkg/bytes/#FieldsFunc"><code>FieldsFunc</code></a>,
+<a href="/pkg/bytes/#Split"><code>Split</code></a>,
+and
+<a href="/pkg/bytes/#SplitAfter"><code>SplitAfter</code></a>
+functions have always returned subslices of their inputs.
+Go 1.10 changes each returned subslice to have capacity equal to its length,
+so that appending to one cannot overwrite adjacent data in the original input.
+</p>
+</dl>
+
+<dl id="crypto/cipher"><dt><a href="/pkg/crypto/cipher/">crypto/cipher</a></dt>
+<dd>
+<p>
+<a href="/pkg/crypto/cipher/#NewOFB"><code>NewOFB</code></a> now panics if given
+an initialization vector of incorrect length, like the other constructors in the
+package always have.
+(Previously it returned a nil <code>Stream</code> implementation.)
+</p>
+</dl>
+
+<dl id="crypto/tls"><dt><a href="/pkg/crypto/tls/">crypto/tls</a></dt>
+<dd>
+<p>
+The TLS server now advertises support for SHA-512 signatures when using TLS 1.2.
+The server already supported the signatures, but some clients would not select
+them unless explicitly advertised.
+</p>
+</dl>
+
+<dl id="crypto/x509"><dt><a href="/pkg/crypto/x509/">crypto/x509</a></dt>
+<dd>
+<p>
+<a href="/pkg/crypto/x509/#Certificate.Verify"><code>Certificate.Verify</code></a>
+now enforces the name constraints for all
+names contained in the certificate, not just the one name that a client has asked about.
+Extended key usage restrictions are similarly now checked all at once.
+As a result, after a certificate has been validated, now it can be trusted in its entirety.
+It is no longer necessary to revalidate the certificate for each additional name
+or key usage.
+</p>
+
+<p>
+Parsed certificates also now report URI names and IP, email, and URI constraints, using the new
+<a href="/pkg/crypto/x509/#Certificate"><code>Certificate</code></a> fields
+<code>URIs</code>, <code>PermittedIPRanges</code>, <code>ExcludedIPRanges</code>,
+<code>PermittedEmailAddresses</code>, <code>ExcludedEmailAddresses</code>,
+<code>PermittedURIDomains</code>, and <code>ExcludedURIDomains</code>. Certificates with
+invalid values for those fields are now rejected.
+</p>
+
+<p>
+The new <a href="/pkg/crypto/x509/#MarshalPKCS1PublicKey"><code>MarshalPKCS1PublicKey</code></a>
+and <a href="/pkg/crypto/x509/#ParsePKCS1PublicKey"><code>ParsePKCS1PublicKey</code></a>
+functions convert an RSA public key to and from PKCS#1-encoded form.
+</p>
+
+<p>
+The new <a href="/pkg/crypto/x509/#MarshalPKCS8PrivateKey"><code>MarshalPKCS8PrivateKey</code></a>
+function converts a private key to PKCS#8-encoded form.
+(<a href="/pkg/crypto/x509/#ParsePKCS8PrivateKey"><code>ParsePKCS8PrivateKey</code></a>
+has existed since Go 1.)
+</p>
+</dl>
+
+<dl id="crypto/x509/pkix"><dt><a href="/pkg/crypto/x509/pkix/">crypto/x509/pkix</a></dt>
+<dd>
+<p>
+<a href="/pkg/crypto/x509/pkix/#Name"><code>Name</code></a> now implements a
+<a href="/pkg/crypto/x509/pkix/#Name.String"><code>String</code></a> method that
+formats the X.509 distinguished name in the standard RFC 2253 format.
+</p>
+</dl>
+
+<dl id="database/sql/driver"><dt><a href="/pkg/database/sql/driver/">database/sql/driver</a></dt>
+<dd>
+<p>
+Drivers that currently hold on to the destination buffer provided by
+<a href="/pkg/database/sql/driver/#Rows.Next"><code>driver.Rows.Next</code></a> should ensure they no longer
+write to a buffer assigned to the destination array outside of that call.
+Drivers must be careful that underlying buffers are not modified when closing
+<a href="/pkg/database/sql/driver/#Rows"><code>driver.Rows</code></a>.
+</p>
+<p>
+Drivers that want to construct a <a href="/pkg/database/sql/#DB"><code>sql.DB</code></a> for
+their clients can now implement the <a href="/pkg/database/sql/driver/#Connector"><code>Connector</code></a> interface
+and call the new <a href="/pkg/database/sql/#OpenDB"><code>sql.OpenDB</code></a> function,
+instead of needing to encode all configuration into a string
+passed to  <a href="/pkg/database/sql/#Open"><code>sql.Open</code></a>.
+</p>
+<p>
+Drivers that want to parse the configuration string only once per <code>sql.DB</code>
+instead of once per <a href="/pkg/database/sql/#Conn"><code>sql.Conn</code></a>,
+or that want access to each <code>sql.Conn</code>'s underlying context,
+can make their <a href="/pkg/database/sql/driver/#Driver"><code>Driver</code></a>
+implementations also implement <a href="/pkg/database/sql/driver/#DriverContext"><code>DriverContext</code></a>'s
+new <code>OpenConnector</code> method.
+</p>
+<p>
+Drivers that implement <a href="/pkg/database/sql/driver/#ExecerContext"><code>ExecerContext</code></a>
+no longer need to implement <a href="/pkg/database/sql/driver/#Execer"><code>Execer</code></a>;
+similarly, drivers that implement <a href="/pkg/database/sql/driver/#QueryerContext"><code>QueryerContext</code></a>
+no longer need to implement <a href="/pkg/database/sql/driver/#Queryer"><code>Queryer</code></a>.
+Previously, even if the context-based interfaces were implemented they were ignored
+unless the non-context-based interfaces were also implemented.
+</p>
+<p>
+To allow drivers to better isolate different clients using a cached driver connection in succession,
+if a <a href="/pkg/database/sql/driver/#Conn"><code>Conn</code></a> implements the new
+<a href="/pkg/database/sql/driver/#SessionResetter"><code>SessionResetter</code></a> interface,
+<code>database/sql</code> will now call <code>ResetSession</code> before
+reusing the <code>Conn</code> for a new client.
+</p>
+</dl>
+
+<dl id="debug/elf"><dt><a href="/pkg/debug/elf/">debug/elf</a></dt>
+<dd>
+<p>
+This release adds 348 new relocation constants divided between the relocation types
+<a href="/pkg/debug/elf/#R_386"><code>R_386</code></a>,
+<a href="/pkg/debug/elf/#R_AARCH64"><code>R_AARCH64</code></a>,
+<a href="/pkg/debug/elf/#R_ARM"><code>R_ARM</code></a>,
+<a href="/pkg/debug/elf/#R_PPC64"><code>R_PPC64</code></a>,
+and
+<a href="/pkg/debug/elf/#R_X86_64"><code>R_X86_64</code></a>.
+</p>
+</dl>
+
+<dl id="debug/macho"><dt><a href="/pkg/debug/macho/">debug/macho</a></dt>
+<dd>
+<p>
+Go 1.10 adds support for reading relocations from Mach-O sections,
+using the <a href="/pkg/debug/macho#Section"><code>Section</code></a> struct's new <code>Relocs</code> field
+and the new <a href="/pkg/debug/macho/#Reloc"><code>Reloc</code></a>,
+<a href="/pkg/debug/macho/#RelocTypeARM"><code>RelocTypeARM</code></a>,
+<a href="/pkg/debug/macho/#RelocTypeARM64"><code>RelocTypeARM64</code></a>,
+<a href="/pkg/debug/macho/#RelocTypeGeneric"><code>RelocTypeGeneric</code></a>,
+and
+<a href="/pkg/debug/macho/#RelocTypeX86_64"><code>RelocTypeX86_64</code></a>
+types and associated constants.
+</p>
+<p>
+Go 1.10 also adds support for the <code>LC_RPATH</code> load command,
+represented by the types
+<a href="/pkg/debug/macho/#RpathCmd"><code>RpathCmd</code></a> and
+<a href="/pkg/debug/macho/#Rpath"><code>Rpath</code></a>,
+and new <a href="/pkg/debug/macho/#pkg-constants">named constants</a>
+for the various flag bits found in headers.
+</p>
+</dl>
+
+<dl id="encoding/asn1"><dt><a href="/pkg/encoding/asn1/">encoding/asn1</a></dt>
+<dd>
+<p>
+<a href="/pkg/encoding/asn1/#Marshal"><code>Marshal</code></a> now correctly encodes
+strings containing asterisks as type UTF8String instead of PrintableString,
+unless the string is in a struct field with a tag forcing the use of PrintableString.
+<code>Marshal</code> also now respects struct tags containing <code>application</code> directives.
+</p>
+<p>
+The new <a href="/pkg/encoding/asn1/#MarshalWithParams"><code>MarshalWithParams</code></a>
+function marshals its argument as if the additional params were its associated
+struct field tag.
+</p>
+<p>
+<a href="/pkg/encoding/asn1/#Unmarshal"><code>Unmarshal</code></a> now respects
+struct field tags using the <code>explicit</code> and <code>tag</code>
+directives.
+</p>
+<p>
+Both <code>Marshal</code> and <code>Unmarshal</code> now support a new struct field tag
+<code>numeric</code>, indicating an ASN.1 NumericString.
+</p>
+</dl>
+
+<dl id="encoding/csv"><dt><a href="/pkg/encoding/csv/">encoding/csv</a></dt>
+<dd>
+<p>
+<a href="/pkg/encoding/csv/#Reader"><code>Reader</code></a> now disallows the use of
+nonsensical <code>Comma</code> and <code>Comment</code> settings,
+such as NUL, carriage return, newline, invalid runes, and the Unicode replacement character,
+or setting <code>Comma</code> and <code>Comment</code> equal to each other.
+</p>
+<p>
+In the case of a syntax error in a CSV record that spans multiple input lines, <code>Reader</code>
+now reports the line on which the record started in the <a href="/pkg/encoding/csv/#ParseError"><code>ParseError</code></a>'s new <code>StartLine</code> field.
+</p>
+</dl>
+
+<dl id="encoding/hex"><dt><a href="/pkg/encoding/hex/">encoding/hex</a></dt>
+<dd>
+<p>
+The new functions
+<a href="/pkg/encoding/hex/#NewEncoder"><code>NewEncoder</code></a>
+and
+<a href="/pkg/encoding/hex/#NewDecoder"><code>NewDecoder</code></a>
+provide streaming conversions to and from hexadecimal,
+analogous to equivalent functions already in
+<a href="/pkg/encoding/base32/">encoding/base32</a>
+and
+<a href="/pkg/encoding/base64/">encoding/base64</a>.
+</p>
+
+<p>
+When the functions
+<a href="/pkg/encoding/hex/#Decode"><code>Decode</code></a>
+and
+<a href="/pkg/encoding/hex/#DecodeString"><code>DecodeString</code></a>
+encounter malformed input,
+they now return the number of bytes already converted
+along with the error.
+Previously they always returned a count of 0 with any error.
+</p>
+</dl>
+
+<dl id="encoding/json"><dt><a href="/pkg/encoding/json/">encoding/json</a></dt>
+<dd>
+<p>
+The <a href="/pkg/encoding/json/#Decoder"><code>Decoder</code></a>
+adds a new method
+<a href="/pkg/encoding/json/#Decoder.DisallowUnknownFields"><code>DisallowUnknownFields</code></a>
+that causes it to report inputs with unknown JSON fields as a decoding error.
+(The default behavior has always been to discard unknown fields.)
+</p>
+
+<p>
+As a result of <a href="#reflect">fixing a reflect bug</a>,
+<a href="/pkg/encoding/json/#Unmarshal"><code>Unmarshal</code></a>
+can no longer decode into fields inside
+embedded pointers to unexported struct types,
+because it cannot initialize the unexported embedded pointer
+to point at fresh storage.
+<code>Unmarshal</code> now returns an error in this case.
+</p>
+</dl>
+
+<dl id="encoding/pem"><dt><a href="/pkg/encoding/pem/">encoding/pem</a></dt>
+<dd>
+<p>
+<a href="/pkg/encoding/pem/#Encode"><code>Encode</code></a>
+and
+<a href="/pkg/encoding/pem/#EncodeToMemory"><code>EncodeToMemory</code></a>
+no longer generate partial output when presented with a
+block that is impossible to encode as PEM data.
+</p>
+</dl>
+
+<dl id="encoding/xml"><dt><a href="/pkg/encoding/xml/">encoding/xml</a></dt>
+<dd>
+<p>
+The new function
+<a href="/pkg/encoding/xml/#NewTokenDecoder"><code>NewTokenDecoder</code></a>
+is like
+<a href="/pkg/encoding/xml/#NewDecoder"><code>NewDecoder</code></a>
+but creates a decoder reading from a <a href="/pkg/encoding/xml/#TokenReader"><code>TokenReader</code></a>
+instead of an XML-formatted byte stream.
+This is meant to enable the construction of XML stream transformers in client libraries.
+</p>
+</dl>
+
+<dl id="flag"><dt><a href="/pkg/flag/">flag</a></dt>
+<dd>
+<p>
+The default
+<a href="/pkg/flag/#Usage"><code>Usage</code></a> function now prints
+its first line of output to
+<code>CommandLine.Output()</code>
+instead of assuming <code>os.Stderr</code>,
+so that the usage message is properly redirected for
+clients using <code>CommandLine.SetOutput</code>.
+</p>
+<p>
+<a href="/pkg/flag/#PrintDefaults"><code>PrintDefaults</code></a> now
+adds appropriate indentation after newlines in flag usage strings,
+so that multi-line usage strings display nicely.
+</p>
+<p>
+<a href="/pkg/flag/#FlagSet"><code>FlagSet</code></a> adds new methods
+<a href="/pkg/flag/#FlagSet.ErrorHandling"><code>ErrorHandling</code></a>,
+<a href="/pkg/flag/#FlagSet.Name"><code>Name</code></a>,
+and
+<a href="/pkg/flag/#FlagSet.Output"><code>Output</code></a>,
+to retrieve the settings passed to
+<a href="/pkg/flag/#NewFlagSet"><code>NewFlagSet</code></a>
+and
+<a href="/pkg/flag/#FlagSet.SetOutput"><code>FlagSet.SetOutput</code></a>.
+</p>
+</dl>
+
+<dl id="go/doc"><dt><a href="/pkg/go/doc/">go/doc</a></dt>
+<dd>
+<p>
+To support the <a href="#doc">doc change</a> described above,
+functions returning slices of <code>T</code>, <code>*T</code>, <code>**T</code>, and so on
+are now reported in <code>T</code>'s <a href="/pkg/go/doc/#Type"><code>Type</code></a>'s <code>Funcs</code> list,
+instead of in the <a href="/pkg/go/doc/#Package"><code>Package</code></a>'s <code>Funcs</code> list.
+</p>
+</dl>
+
+<dl id="go/importer"><dt><a href="/pkg/go/importer/">go/importer</a></dt>
+<dd>
+<p>
+The <a href="/pkg/go/importer/#For"><code>For</code></a> function now accepts a non-nil lookup argument.
+</p>
+</dl>
+
+<dl id="go/printer"><dt><a href="/pkg/go/printer/">go/printer</a></dt>
+<dd>
+<p>
+The changes to the default formatting of Go source code
+discussed in the <a href="#gofmt">gofmt section</a> above
+are implemented in the <a href="/pkg/go/printer/">go/printer</a> package
+and also affect the output of the higher-level <a href="/pkg/go/format/">go/format</a> package.
+</p>
+</dl>
+
+<dl id="hash"><dt><a href="/pkg/hash/">hash</a></dt>
+<dd>
+<p>
+Implementations of the <a href="/pkg/hash/#Hash"><code>Hash</code></a> interface are now
+encouraged to implement <a href="/pkg/encoding/#BinaryMarshaler"><code>encoding.BinaryMarshaler</code></a>
+and <a href="/pkg/encoding/#BinaryUnmarshaler"><code>encoding.BinaryUnmarshaler</code></a>
+to allow saving and recreating their internal state,
+and all implementations in the standard library
+(<a href="/pkg/hash/crc32/">hash/crc32</a>, <a href="/pkg/crypto/sha256/">crypto/sha256</a>, and so on)
+now implement those interfaces.
+</p>
+</dl>
+
+<dl id="html/template"><dt><a href="/pkg/html/template/">html/template</a></dt>
+<dd>
+<p>
+The new <a href="/pkg/html/template#Srcset"><code>Srcset</code></a> content
+type allows for proper handling of values within the
+<a href="https://w3c.github.io/html/semantics-embedded-content.html#element-attrdef-img-srcset"><code>srcset</code></a>
+attribute of <code>img</code> tags.
+</p>
+</dl>
+
+<dl id="math/big"><dt><a href="/pkg/math/big/">math/big</a></dt>
+<dd>
+<p>
+<a href="/pkg/math/big/#Int"><code>Int</code></a> now supports conversions to and from bases 2 through 62
+in its <a href="/pkg/math/big/#Int.SetString"><code>SetString</code></a> and <a href="/pkg/math/big/#Text"><code>Text</code></a> methods.
+(Previously it only allowed bases 2 through 36.)
+The value of the constant <code>MaxBase</code> has been updated.
+</p>
+<p>
+<a href="/pkg/math/big/#Int"><code>Int</code></a> adds a new
+<a href="/pkg/math/big/#CmpAbs"><code>CmpAbs</code></a> method
+that is like <a href="/pkg/math/big/#Cmp"><code>Cmp</code></a> but
+compares only the absolute values (not the signs) of its arguments.
+</p>
+<p>
+<a href="/pkg/math/big/#Float"><code>Float</code></a> adds a new
+<a href="/pkg/math/big/#Float.Sqrt"><code>Sqrt</code></a> method to
+compute square roots.
+</p>
+</dl>
+
+<dl id="math/cmplx"><dt><a href="/pkg/math/cmplx/">math/cmplx</a></dt>
+<dd>
+<p>
+Branch cuts and other boundary cases in
+<a href="/pkg/math/cmplx/#Asin"><code>Asin</code></a>,
+<a href="/pkg/math/cmplx/#Asinh"><code>Asinh</code></a>,
+<a href="/pkg/math/cmplx/#Atan"><code>Atan</code></a>,
+and
+<a href="/pkg/math/cmplx/#Sqrt"><code>Sqrt</code></a>
+have been corrected to match the definitions used in the C99 standard.
+</p>
+</dl>
+
+<dl id="math/rand"><dt><a href="/pkg/math/rand/">math/rand</a></dt>
+<dd>
+<p>
+The new <a href="/pkg/math/rand/#Shuffle"><code>Shuffle</code></a> function and corresponding
+<a href="/pkg/math/rand/#Rand.Shuffle"><code>Rand.Shuffle</code></a> method
+shuffle an input sequence.
+</p>
+</dl>
+
+<dl id="math"><dt><a href="/pkg/math/">math</a></dt>
+<dd>
+<p>
+The new functions
+<a href="/pkg/math/#Round"><code>Round</code></a>
+and
+<a href="/pkg/math/#RoundToEven"><code>RoundToEven</code></a>
+round their arguments to the nearest floating-point integer;
+<code>Round</code> rounds a half-integer to its larger integer neighbor (away from zero)
+while <code>RoundToEven</code> rounds a half-integer to its even integer neighbor.
+</p>
+
+<p>
+The new functions
+<a href="/pkg/math/#Erfinv"><code>Erfinv</code></a>
+and
+<a href="/pkg/math/#Erfcinv"><code>Erfcinv</code></a>
+compute the inverse error function and the
+inverse complementary error function.
+</p>
+</dl>
+
+<dl id="mime/multipart"><dt><a href="/pkg/mime/multipart/">mime/multipart</a></dt>
+<dd>
+<p>
+<a href="/pkg/mime/multipart/#Reader"><code>Reader</code></a>
+now accepts parts with empty filename attributes.
+</p>
+</dl>
+
+<dl id="mime"><dt><a href="/pkg/mime/">mime</a></dt>
+<dd>
+<p>
+<a href="/pkg/mime/#ParseMediaType"><code>ParseMediaType</code></a> now discards
+invalid attribute values; previously it returned those values as empty strings.
+</p>
+</dl>
+
+<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
+<dd>
+<p>
+The <a href="/pkg/net/#Conn"><code>Conn</code></a> and
+<a href="/pkg/net/#Conn"><code>Listener</code></a> implementations
+in this package now guarantee that when <code>Close</code> returns,
+the underlying file descriptor has been closed.
+(In earlier releases, if the <code>Close</code> stopped pending I/O
+in other goroutines, the closing of the file descriptor could happen in one of those
+goroutines shortly after <code>Close</code> returned.)
+</p>
+
+<p>
+<a href="/pkg/net/#TCPListener"><code>TCPListener</code></a> and
+<a href="/pkg/net/#UnixListener"><code>UnixListener</code></a>
+now implement
+<a href="/pkg/syscall/#Conn"><code>syscall.Conn</code></a>,
+to allow setting options on the underlying file descriptor
+using <a href="/pkg/syscall/#RawConn"><code>syscall.RawConn.Control</code></a>.
+</p>
+
+<p>
+The <code>Conn</code> implementations returned by <a href="/pkg/net/#Pipe"><code>Pipe</code></a>
+now support setting read and write deadlines.
+</p>
+
+<p>
+The <a href="/pkg/net/#IPConn.ReadMsgIP"><code>IPConn.ReadMsgIP</code></a>,
+<a href="/pkg/net/#IPConn.WriteMsgIP"><code>IPConn.WriteMsgIP</code></a>,
+<a href="/pkg/net/#UDPConn.ReadMsgUDP"><code>UDPConn.ReadMsgUDP</code></a>,
+and
+<a href="/pkg/net/#UDPConn.WriteMsgUDP"><code>UDPConn.WriteMsgUDP</code></a>,
+methods are now implemented on Windows.
+</p>
+</dl>
+
+<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
+<dd>
+<p>
+On the client side, an HTTP proxy (most commonly configured by
+<a href="/pkg/net/http/#ProxyFromEnvironment"><code>ProxyFromEnvironment</code></a>)
+can now be specified as an <code>https://</code> URL,
+meaning that the client connects to the proxy over HTTPS before issuing a standard, proxied HTTP request.
+(Previously, HTTP proxy URLs were required to begin with <code>http://</code> or <code>socks5://</code>.)
+</p>
+<p>
+On the server side, <a href="/pkg/net/http/#FileServer"><code>FileServer</code></a> and its single-file equivalent <a href="/pkg/net/http/#ServeFile"><code>ServeFile</code></a>
+now apply <code>If-Range</code> checks to <code>HEAD</code> requests.
+<code>FileServer</code> also now reports directory read failures to the <a href="/pkg/net/http/#Server"><code>Server</code></a>'s <code>ErrorLog</code>.
+The content-serving handlers also now omit the <code>Content-Type</code> header when serving zero-length content.
+</p>
+<p>
+<a href="/pkg/net/http/#ResponseWriter"><code>ResponseWriter</code></a>'s <code>WriteHeader</code> method now panics
+if passed an invalid (non-3-digit) status code.
+</p>
+<p>
+<!-- CL 46631 -->
+The <code>Server</code> will no longer add an implicit Content-Type when a <code>Handler</code> does not write any output.
+</p>
+<p>
+<a href="/pkg/net/http/#Redirect"><code>Redirect</code></a> now sets the <code>Content-Type</code> header before writing its HTTP response.
+</p>
+</dl>
+
+<dl id="net/mail"><dt><a href="/pkg/net/mail/">net/mail</a></dt>
+<dd>
+<p>
+<a href="/pkg/net/mail/#ParseAddress"><code>ParseAddress</code></a> and
+<a href="/pkg/net/mail/#ParseAddressList"><code>ParseAddressList</code></a>
+now support a variety of obsolete address formats.
+</p>
+</dl>
+
+<dl id="net/smtp"><dt><a href="/pkg/net/smtp/">net/smtp</a></dt>
+<dd>
+<p>
+The <a href="/pkg/net/smtp/#Client"><code>Client</code></a> adds a new
+<a href="/pkg/net/smtp/#Client.Noop"><code>Noop</code></a> method,
+to test whether the server is still responding.
+It also now defends against possible SMTP injection in the inputs
+to the <a href="/pkg/net/smtp/#Client.Hello"><code>Hello</code></a>
+and <a href="/pkg/net/smtp/#Client.Verify"><code>Verify</code></a> methods.
+</p>
+</dl>
+
+<dl id="net/textproto"><dt><a href="/pkg/net/textproto/">net/textproto</a></dt>
+<dd>
+<p>
+<a href="/pkg/net/textproto/#ReadMIMEHeader"><code>ReadMIMEHeader</code></a>
+now rejects any header that begins with a continuation (indented) header line.
+Previously a header with an indented first line was treated as if the first line
+were not indented.
+</p>
+</dl>
+
+<dl id="net/url"><dt><a href="/pkg/net/url/">net/url</a></dt>
+<dd>
+<p>
+<a href="/pkg/net/url/#ResolveReference"><code>ResolveReference</code></a>
+now preserves multiple leading slashes in the target URL.
+Previously it rewrote multiple leading slashes to a single slash,
+which resulted in the <a href="/pkg/net/http/#Client"><code>http.Client</code></a>
+following certain redirects incorrectly.
+</p>
+<p>
+For example, this code's output has changed:
+</p>
+<pre>
+base, _ := url.Parse("http://host//path//to/page1")
+target, _ := url.Parse("page2")
+fmt.Println(base.ResolveReference(target))
+</pre>
+<p>
+Note the doubled slashes around <code>path</code>.
+In Go 1.9 and earlier, the resolved URL was <code>http://host/path//to/page2</code>:
+the doubled slash before <code>path</code> was incorrectly rewritten
+to a single slash, while the doubled slash after <code>path</code> was
+correctly preserved.
+Go 1.10 preserves both doubled slashes, resolving to <code>http://host//path//to/page2</code>
+as required by <a href="https://tools.ietf.org/html/rfc3986#section-5.2">RFC 3986</a>.
+</p>
+
+<p>This change may break existing buggy programs that unintentionally
+construct a base URL with a leading doubled slash in the path and inadvertently
+depend on <code>ResolveReference</code> to correct that mistake.
+For example, this can happen if code adds a host prefix
+like <code>http://host/</code> to a path like <code>/my/api</code>,
+resulting in a URL with a doubled slash: <code>http://host//my/api</code>.
+</p>
+
+<p>
+<a href="/pkg/net/url/#UserInfo"><code>UserInfo</code></a>'s methods
+now treat a nil receiver as equivalent to a pointer to a zero <code>UserInfo</code>.
+Previously, they panicked.
+</p>
+</dl>
+
+<dl id="os"><dt><a href="/pkg/os/">os</a></dt>
+<dd>
+<p>
+<a href="/pkg/os/#File"><code>File</code></a> adds new methods
+<a href="/pkg/os/#File.SetDeadline"><code>SetDeadline</code></a>,
+<a href="/pkg/os/#File.SetReadDeadline"><code>SetReadDeadline</code></a>,
+and
+<a href="/pkg/os/#File.SetWriteDeadline"><code>SetWriteDeadline</code></a>
+that allow setting I/O deadlines when the
+underlying file descriptor supports non-blocking I/O operations.
+The definition of these methods matches those in <a href="/pkg/net/#Conn"><code>net.Conn</code></a>.
+If an I/O method fails due to missing a deadline, it will return a
+timeout error; the
+new <a href="/pkg/os/#IsTimeout"><code>IsTimeout</code></a> function
+reports whether an error represents a timeout.
+</p>
+
+<p>
+Also matching <code>net.Conn</code>,
+<code>File</code>'s
+<a href="/pkg/os/#File.Close"><code>Close</code></a> method
+now guarantee that when <code>Close</code> returns,
+the underlying file descriptor has been closed.
+(In earlier releases,
+if the <code>Close</code> stopped pending I/O
+in other goroutines, the closing of the file descriptor could happen in one of those
+goroutines shortly after <code>Close</code> returned.)
+</p>
+
+<p>
+On BSD, macOS, and Solaris systems,
+<a href="/pkg/os/#Chtimes"><code>Chtimes</code></a>
+now supports setting file times with nanosecond precision
+(assuming the underlying file system can represent them).
+</p>
+</dl>
+
+<dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
+<dd>
+<p>
+The <a href="/pkg/reflect/#Copy"><code>Copy</code></a> function now allows copying
+from a string into a byte array or byte slice, to match the
+<a href="/pkg/builtin/#copy">built-in copy function</a>.
+</p>
+
+<p>
+In structs, embedded pointers to unexported struct types were
+previously incorrectly reported with an empty <code>PkgPath</code>
+in the corresponding <a href="/pkg/reflect/#StructField">StructField</a>,
+with the result that for those fields,
+and <a href="/pkg/reflect/#Value.CanSet"><code>Value.CanSet</code></a>
+incorrectly returned true and
+<a href="/pkg/reflect/#Value.Set"><code>Value.Set</code></a>
+incorrectly succeeded.
+The underlying metadata has been corrected;
+for those fields,
+<code>CanSet</code> now correctly returns false
+and <code>Set</code> now correctly panics.
+This may affect reflection-based unmarshalers
+that could previously unmarshal into such fields
+but no longer can.
+For example, see the <a href="#encoding/json"><code>encoding/json</code> notes</a>.
+</p>
+</dl>
+
+<dl id="runtime/pprof"><dt><a href="/pkg/runtime/pprof/">runtime/pprof</a></dt>
+<dd>
+<p>
+As <a href="#pprof">noted above</a>, the blocking and mutex profiles
+now include symbol information so that they can be viewed without needing
+the binary that generated them.
+</p>
+</dl>
+
+<dl id="strconv"><dt><a href="/pkg/strconv/">strconv</a></dt>
+<dd>
+<p>
+<a href="/pkg/strconv/#ParseUint"><code>ParseUint</code></a> now returns
+the maximum magnitude integer of the appropriate size
+with any <code>ErrRange</code> error, as it was already documented to do.
+Previously it returned 0 with <code>ErrRange</code> errors.
+</p>
+</dl>
+
+<dl id="strings"><dt><a href="/pkg/strings/">strings</a></dt>
+<dd>
+<p>
+A new type
+<a href="/pkg/strings/#Builder"><code>Builder</code></a> is a replacement for
+<a href="/pkg/bytes/#Buffer"><code>bytes.Buffer</code></a> for the use case of
+accumulating text into a <code>string</code> result.
+The <code>Builder</code>'s API is a restricted subset of <code>bytes.Buffer</code>'s
+that allows it to safely avoid making a duplicate copy of the data
+during the <a href="/pkg/strings/#Builder.String"><code>String</code></a> method.
+</p>
+</dl>
+
+<dl id="syscall"><dt><a href="/pkg/syscall/">syscall</a></dt>
+<dd>
+<p>
+On Windows,
+the new <a href="/pkg/syscall/#SysProcAttr"><code>SysProcAttr</code></a> field <code>Token</code>,
+of type <a href="/pkg/syscall/#Token"><code>Token</code></a> allows the creation of a process that
+runs as another user during <a href="/pkg/syscall/#StartProcess"><code>StartProcess</code></a>
+(and therefore also during <a href="/pkg/os/#StartProcess"><code>os.StartProcess</code></a> and
+<a href="/pkg/os/exec/#Cmd.Start"><code>exec.Cmd.Start</code></a>).
+The new function <a href="/pkg/syscall/#CreateProcessAsUser"><code>CreateProcessAsUser</code></a>
+gives access to the underlying system call.
+</p>
+
+<p>
+On BSD, macOS, and Solaris systems, <a href="/pkg/syscall/#UtimesNano"><code>UtimesNano</code></a>
+is now implemented.
+</p>
+</dl>
+
+<dl id="time"><dt><a href="/pkg/time/">time</a></dt>
+<dd>
+<p>
+<a href="/pkg/time/#LoadLocation"><code>LoadLocation</code></a> now uses the directory
+or uncompressed zip file named by the <code>$ZONEINFO</code>
+environment variable before looking in the default system-specific list of
+known installation locations or in <code>$GOROOT/lib/time/zoneinfo.zip</code>.
+</p>
+<p>
+The new function <a href="/pkg/time/#LoadLocationFromTZData"><code>LoadLocationFromTZData</code></a>
+allows conversion of IANA time zone file data to a <a href="/pkg/time/#Location"><code>Location</code></a>.
+</p>
+</dl>
+
+<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 9.0 to
+<a href="http://www.unicode.org/versions/Unicode10.0.0/">Unicode 10.0</a>,
+which adds 8,518 new characters, including four new scripts, one new property,
+a Bitcoin currency symbol, and 56 new emoji.
+</p>
+</dl>
diff --git a/_content/doc/go1.11.html b/_content/doc/go1.11.html
new file mode 100644
index 0000000..483ecd8
--- /dev/null
+++ b/_content/doc/go1.11.html
@@ -0,0 +1,934 @@
+<!--{
+	"Title": "Go 1.11 Release Notes",
+	"Path":  "/doc/go1.11",
+	"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.11</h2>
+
+<p>
+  The latest Go release, version 1.11, arrives six months after <a href="go1.10">Go 1.10</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>
+
+<h2 id="language">Changes to the language</h2>
+
+<p>
+  There are no changes to the language specification.
+</p>
+
+<h2 id="ports">Ports</h2>
+
+<p> <!-- CL 94255, CL 115038, etc -->
+  As <a href="go1.10#ports">announced in the Go 1.10 release notes</a>, Go 1.11 now requires
+  OpenBSD 6.2 or later, macOS 10.10 Yosemite or later, or Windows 7 or later;
+  support for previous versions of these operating systems has been removed.
+</p>
+
+<p> <!-- CL 121657 -->
+  Go 1.11 supports the upcoming OpenBSD 6.4 release. Due to changes in
+  the OpenBSD kernel, older versions of Go will not work on OpenBSD 6.4.
+</p>
+
+<p>
+  There are <a href="https://golang.org/issue/25206">known issues</a> with NetBSD on i386 hardware.
+</p>
+
+<p><!-- CL 107935 -->
+  The race detector is now supported on <code>linux/ppc64le</code>
+  and, to a lesser extent, on <code>netbsd/amd64</code>. The NetBSD race detector support
+  has <a href="https://golang.org/issue/26403">known issues</a>.
+</p>
+
+<p><!-- CL 109255 -->
+  The memory sanitizer (<code>-msan</code>) is now supported on <code>linux/arm64</code>.
+</p>
+
+<p><!-- CL 93875 -->
+  The build modes <code>c-shared</code> and <code>c-archive</code> are now supported on
+  <code>freebsd/amd64</code>.
+</p>
+
+<p id="mips"><!-- CL 108475 -->
+  On 64-bit MIPS systems, the new environment variable settings
+  <code>GOMIPS64=hardfloat</code> (the default) and
+  <code>GOMIPS64=softfloat</code> select whether to use
+  hardware instructions or software emulation for floating-point computations.
+  For 32-bit systems, the environment variable is still <code>GOMIPS</code>,
+  as <a href="go1.10#mips">added in Go 1.10</a>.
+</p>
+
+<p><!-- CL 107475 -->
+  On soft-float ARM systems (<code>GOARM=5</code>), Go now uses a more
+  efficient software floating point interface. This is transparent to
+  Go code, but ARM assembly that uses floating-point instructions not
+  guarded on GOARM will break and must be ported to
+  the <a href="https://golang.org/cl/107475">new interface</a>.
+</p>
+
+<p><!-- CL 94076 -->
+  Go 1.11 on ARMv7 no longer requires a Linux kernel configured
+  with <code>KUSER_HELPERS</code>. This setting is enabled in default
+  kernel configurations, but is sometimes disabled in stripped-down
+  configurations.
+</p>
+
+<h3 id="wasm">WebAssembly</h3>
+<p>
+  Go 1.11 adds an experimental port to <a href="https://webassembly.org">WebAssembly</a>
+  (<code>js/wasm</code>).
+</p>
+<p>
+  Go programs currently compile to one WebAssembly module that
+  includes the Go runtime for goroutine scheduling, garbage
+  collection, maps, etc.
+  As a result, the resulting size is at minimum around
+  2 MB, or 500 KB compressed. Go programs can call into JavaScript
+  using the new experimental
+  <a href="/pkg/syscall/js/"><code>syscall/js</code></a> package.
+  Binary size and interop with other languages has not yet been a
+  priority but may be addressed in future releases.
+</p>
+<p>
+  As a result of the addition of the new <code>GOOS</code> value
+  "<code>js</code>" and <code>GOARCH</code> value "<code>wasm</code>",
+  Go files named <code>*_js.go</code> or <code>*_wasm.go</code> will
+  now be <a href="/pkg/go/build/#hdr-Build_Constraints">ignored by Go
+  tools</a> except when those GOOS/GOARCH values are being used.
+  If you have existing filenames matching those patterns, you will need to rename them.
+</p>
+<p>
+  More information can be found on the
+  <a href="https://golang.org/wiki/WebAssembly">WebAssembly wiki page</a>.
+</p>
+
+<h3 id="riscv">RISC-V GOARCH values reserved</h3>
+<p><!-- CL 106256 -->
+  The main Go compiler does not yet support the RISC-V architecture <!-- is gonna change everything -->
+  but we've reserved the <code>GOARCH</code> values
+  "<code>riscv</code>" and "<code>riscv64</code>", as used by Gccgo,
+  which does support RISC-V. This means that Go files
+  named <code>*_riscv.go</code> will now also
+  be <a href="/pkg/go/build/#hdr-Build_Constraints">ignored by Go
+  tools</a> except when those GOOS/GOARCH values are being used.
+</p>
+
+<h2 id="tools">Tools</h2>
+
+<h3 id="modules">Modules, package versioning, and dependency management</h3>
+<p>
+  Go 1.11 adds preliminary support for a <a href="/cmd/go/#hdr-Modules__module_versions__and_more">new concept called “modules,”</a>
+  an alternative to GOPATH with integrated support for versioning and
+  package distribution.
+  Using modules, developers are no longer confined to working inside GOPATH,
+  version dependency information is explicit yet lightweight,
+  and builds are more reliable and reproducible.
+</p>
+
+<p>
+  Module support is considered experimental.
+  Details are likely to change in response to feedback from Go 1.11 users,
+  and we have more tools planned.
+  Although the details of module support may change, projects that convert
+  to modules using Go 1.11 will continue to work with Go 1.12 and later.
+  If you encounter bugs using modules,
+  please <a href="https://golang.org/issue/new">file issues</a>
+  so we can fix them. For more information, see the
+  <a href="/cmd/go#hdr-Modules__module_versions__and_more"><code>go</code> command documentation</a>.
+</p>
+
+<h3 id="importpath">Import path restriction</h3>
+
+<p>
+  Because Go module support assigns special meaning to the
+  <code>@</code> symbol in command line operations,
+  the <code>go</code> command now disallows the use of
+  import paths containing <code>@</code> symbols.
+  Such import paths were never allowed by <code>go</code> <code>get</code>,
+  so this restriction can only affect users building
+  custom GOPATH trees by other means.
+</p>
+
+<h3 id="gopackages">Package loading</h3>
+
+<p>
+  The new package
+  <a href="https://godoc.org/golang.org/x/tools/go/packages"><code>golang.org/x/tools/go/packages</code></a>
+  provides a simple API for locating and loading packages of Go source code.
+  Although not yet part of the standard library, for many tasks it
+  effectively replaces the <a href="/pkg/go/build"><code>go/build</code></a>
+  package, whose API is unable to fully support modules.
+  Because it runs an external query command such as
+  <a href="/cmd/go/#hdr-List_packages"><code>go list</code></a>
+  to obtain information about Go packages, it enables the construction of
+  analysis tools that work equally well with alternative build systems
+  such as <a href="https://bazel.build">Bazel</a>
+  and <a href="https://buckbuild.com">Buck</a>.
+</p>
+
+<h3 id="gocache">Build cache requirement</h3>
+
+<p>
+  Go 1.11 will be the last release to support setting the environment
+  variable <code>GOCACHE=off</code> to disable the
+  <a href="/cmd/go/#hdr-Build_and_test_caching">build cache</a>,
+  introduced in Go 1.10.
+  Starting in Go 1.12, the build cache will be required,
+  as a step toward eliminating <code>$GOPATH/pkg</code>.
+  The module and package loading support described above
+  already require that the build cache be enabled.
+  If you have disabled the build cache to avoid problems you encountered,
+  please <a href="https://golang.org/issue/new">file an issue</a> to let us know about them.
+</p>
+
+<h3 id="compiler">Compiler toolchain</h3>
+
+<p><!-- CL 109918 -->
+  More functions are now eligible for inlining by default, including
+  functions that call <code>panic</code>.
+</p>
+
+<p><!-- CL 97375 -->
+  The compiler toolchain now supports column information
+  in <a href="/cmd/compile/#hdr-Compiler_Directives">line
+  directives</a>.
+</p>
+
+<p><!-- CL 106797 -->
+  A new package export data format has been introduced.
+  This should be transparent to end users, except for speeding up
+  build times for large Go projects.
+  If it does cause problems, it can be turned off again by
+  passing <code>-gcflags=all=-iexport=false</code> to
+  the <code>go</code> tool when building a binary.
+</p>
+
+<p><!-- CL 100459 -->
+  The compiler now rejects unused variables declared in a type switch
+  guard, such as <code>x</code> in the following example:
+</p>
+<pre>
+func f(v interface{}) {
+	switch x := v.(type) {
+	}
+}
+</pre>
+<p>
+  This was already rejected by both <code>gccgo</code>
+  and <a href="/pkg/go/types/">go/types</a>.
+</p>
+
+<h3 id="assembler">Assembler</h3>
+
+<p><!-- CL 113315 -->
+  The assembler for <code>amd64</code> now accepts AVX512 instructions.
+</p>
+
+<h3 id="debugging">Debugging</h3>
+
+<p><!-- CL 100738, CL 93664 -->
+  The compiler now produces significantly more accurate debug
+  information for optimized binaries, including variable location
+  information, line numbers, and breakpoint locations.
+
+  This should make it possible to debug binaries
+  compiled <em>without</em> <code>-N</code>&nbsp;<code>-l</code>.
+
+  There are still limitations to the quality of the debug information,
+  some of which are fundamental, and some of which will continue to
+  improve with future releases.
+</p>
+
+<p><!-- CL 118276 -->
+  DWARF sections are now compressed by default because of the expanded
+  and more accurate debug information produced by the compiler.
+
+  This is transparent to most ELF tools (such as debuggers on Linux
+  and *BSD) and is supported by the Delve debugger on all platforms,
+  but has limited support in the native tools on macOS and Windows.
+
+  To disable DWARF compression,
+  pass <code>-ldflags=-compressdwarf=false</code> to
+  the <code>go</code> tool when building a binary.
+</p>
+
+<p><!-- CL 109699 -->
+  Go 1.11 adds experimental support for calling Go functions from
+  within a debugger.
+
+  This is useful, for example, to call <code>String</code> methods
+  when paused at a breakpoint.
+
+  This is currently only supported by Delve (version 1.1.0 and up).
+</p>
+
+<h3 id="test">Test</h3>
+
+<p>
+  Since Go 1.10, the <code>go</code>&nbsp;<code>test</code> command runs
+  <code>go</code>&nbsp;<code>vet</code> on the package being tested,
+  to identify problems before running the test. Since <code>vet</code>
+  typechecks the code with <a href="/pkg/go/types/">go/types</a>
+  before running, tests that do not typecheck will now fail.
+
+  In particular, tests that contain an unused variable inside a
+  closure compiled with Go 1.10, because the Go compiler incorrectly
+  accepted them (<a href="https://golang.org/issues/3059">Issue #3059</a>),
+  but will now fail, since <code>go/types</code> correctly reports an
+  "unused variable" error in this case.
+</p>
+
+<p><!-- CL 102696 -->
+  The <code>-memprofile</code> flag
+  to <code>go</code>&nbsp;<code>test</code> now defaults to the
+  "allocs" profile, which records the total bytes allocated since the
+  test began (including garbage-collected bytes).
+</p>
+
+<h3 id="vet">Vet</h3>
+
+<p><!-- CL 108555 -->
+  The <a href="/cmd/vet/"><code>go</code>&nbsp;<code>vet</code></a>
+  command now reports a fatal error when the package under analysis
+  does not typecheck. Previously, a type checking error simply caused
+  a warning to be printed, and <code>vet</code> to exit with status 1.
+</p>
+
+<p><!-- CL 108559 -->
+  Additionally, <a href="/cmd/vet"><code>go</code>&nbsp;<code>vet</code></a>
+  has become more robust when format-checking <code>printf</code> wrappers.
+  Vet now detects the mistake in this example:
+</p>
+
+<pre>
+func wrapper(s string, args ...interface{}) {
+	fmt.Printf(s, args...)
+}
+
+func main() {
+	wrapper("%s", 42)
+}
+</pre>
+
+<h3 id="trace">Trace</h3>
+
+<p><!-- CL 63274 -->
+  With the new <code>runtime/trace</code>
+  package's <a href="/pkg/runtime/trace/#hdr-User_annotation">user
+  annotation API</a>, users can record application-level information
+  in execution traces and create groups of related goroutines.
+  The <code>go</code>&nbsp;<code>tool</code>&nbsp;<code>trace</code>
+  command visualizes this information in the trace view and the new
+  user task/region analysis page.
+</p>
+
+<h3 id="cgo">Cgo</h3>
+
+<p>
+Since Go 1.10, cgo has translated some C pointer types to the Go
+type <code>uintptr</code>. These types include
+the <code>CFTypeRef</code> hierarchy in Darwin's CoreFoundation
+framework and the <code>jobject</code> hierarchy in Java's JNI
+interface. In Go 1.11, several improvements have been made to the code
+that detects these types. Code that uses these types may need some
+updating. See the <a href="go1.10.html#cgo">Go 1.10 release notes</a> for
+details. <!-- CL 126275, CL 127156, CL 122217, CL 122575, CL 123177 -->
+</p>
+
+<h3 id="go_command">Go command</h3>
+
+<p><!-- CL 126656 -->
+  The environment variable <code>GOFLAGS</code> may now be used
+  to set default flags for the <code>go</code> command.
+  This is useful in certain situations.
+  Linking can be noticeably slower on underpowered systems due to DWARF,
+  and users may want to set <code>-ldflags=-w</code> by default.
+  For modules, some users and CI systems will want vendoring always,
+  so they should set <code>-mod=vendor</code> by default.
+  For more information, see the <a href="/cmd/go/#hdr-Environment_variables"><code>go</code>
+  command documentation</a>.
+</p>
+
+<h3 id="godoc">Godoc</h3>
+
+<p>
+  Go 1.11 will be the last release to support <code>godoc</code>'s command-line interface.
+  In future releases, <code>godoc</code> will only be a web server. Users should use
+  <code>go</code> <code>doc</code> for command-line help output instead.
+</p>
+
+<p><!-- CL 85396, CL 124495 -->
+  The <code>godoc</code> web server now shows which version of Go introduced
+  new API features. The initial Go version of types, funcs, and methods are shown
+  right-aligned. For example, see <a href="/pkg/os/#UserCacheDir"><code>UserCacheDir</code></a>, with "1.11"
+  on the right side. For struct fields, inline comments are added when the struct field was
+  added in a Go version other than when the type itself was introduced.
+  For a struct field example, see
+  <a href="/pkg/net/http/httptrace/#ClientTrace.Got1xxResponse"><code>ClientTrace.Got1xxResponse</code></a>.
+</p>
+
+<h3 id="gofmt">Gofmt</h3>
+
+<p>
+  One minor detail of the default formatting of Go source code has changed.
+  When formatting expression lists with inline comments, the comments were
+  aligned according to a heuristic.
+  However, in some cases the alignment would be split up too easily, or
+  introduce too much whitespace.
+  The heuristic has been changed to behave better for human-written code.
+</p>
+
+<p>
+  Note that these kinds of minor updates to gofmt are expected from time to
+  time.
+  In general, systems that need consistent formatting of Go source code should
+  use a specific version of the <code>gofmt</code> binary.
+  See the <a href="/pkg/go/format/">go/format</a> package documentation for more
+  information.
+</p>
+
+<h3 id="run">Run</h3>
+
+<p>
+  <!-- CL 109341 -->
+  The <a href="/cmd/go/"><code>go</code>&nbsp;<code>run</code></a>
+  command now allows a single import path, a directory name or a
+  pattern matching a single package.
+  This allows <code>go</code>&nbsp;<code>run</code>&nbsp;<code>pkg</code> or <code>go</code>&nbsp;<code>run</code>&nbsp;<code>dir</code>, most importantly <code>go</code>&nbsp;<code>run</code>&nbsp;<code>.</code>
+</p>
+
+<h2 id="runtime">Runtime</h2>
+
+<p><!-- CL 85887 -->
+  The runtime now uses a sparse heap layout so there is no longer a
+  limit to the size of the Go heap (previously, the limit was 512GiB).
+  This also fixes rare "address space conflict" failures in mixed Go/C
+  binaries or binaries compiled with <code>-race</code>.
+</p>
+
+<p><!-- CL 108679, CL 106156 -->
+  On macOS and iOS, the runtime now uses <code>libSystem.dylib</code> instead of
+  calling the kernel directly. This should make Go binaries more
+  compatible with future versions of macOS and iOS.
+  The <a href="/pkg/syscall">syscall</a> package still makes direct
+  system calls; fixing this is planned for a future release.
+</p>
+
+<h2 id="performance">Performance</h2>
+
+<p>
+As always, the changes are so general and varied that precise
+statements about performance are difficult to make.  Most programs
+should run a bit faster, due to better generated code and
+optimizations in the core library.
+</p>
+
+<p><!-- CL 74851 -->
+There were multiple performance changes to the <code>math/big</code>
+package as well as many changes across the tree specific to <code>GOARCH=arm64</code>.
+</p>
+
+<h3 id="performance-compiler">Compiler toolchain</h3>
+
+<p><!-- CL 110055 -->
+  The compiler now optimizes map clearing operations of the form:
+</p>
+<pre>
+for k := range m {
+	delete(m, k)
+}
+</pre>
+
+<p><!-- CL 109517 -->
+  The compiler now optimizes slice extension of the form
+  <code>append(s,</code>&nbsp;<code>make([]T,</code>&nbsp;<code>n)...)</code>.
+</p>
+
+<p><!-- CL 100277, CL 105635, CL 109776 -->
+  The compiler now performs significantly more aggressive bounds-check
+  and branch elimination. Notably, it now recognizes transitive
+  relations, so if <code>i&lt;j</code> and <code>j&lt;len(s)</code>,
+  it can use these facts to eliminate the bounds check
+  for <code>s[i]</code>. It also understands simple arithmetic such
+  as <code>s[i-10]</code> and can recognize more inductive cases in
+  loops. Furthermore, the compiler now uses bounds information to more
+  aggressively optimize shift operations.
+</p>
+
+<h2 id="library">Core library</h2>
+
+<p>
+  All of the changes to the standard library are minor.
+</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>
+
+<!-- CL 115095: https://golang.org/cl/115095: yes (`go test pkg` now always builds pkg even if there are no test files): cmd/go: output coverage report even if there are no test files -->
+<!-- CL 110395: https://golang.org/cl/110395: cmd/go, cmd/compile: use Windows response files to avoid arg length limits -->
+<!-- CL 112436: https://golang.org/cl/112436: cmd/pprof: add readline support similar to upstream -->
+
+
+<dl id="crypto"><dt><a href="/pkg/crypto/">crypto</a></dt>
+  <dd>
+    <p><!-- CL 64451 -->
+      Certain crypto operations, including
+      <a href="/pkg/crypto/ecdsa/#Sign"><code>ecdsa.Sign</code></a>,
+      <a href="/pkg/crypto/rsa/#EncryptPKCS1v15"><code>rsa.EncryptPKCS1v15</code></a> and
+      <a href="/pkg/crypto/rsa/#GenerateKey"><code>rsa.GenerateKey</code></a>,
+      now randomly read an extra byte of randomness to ensure tests don't rely on internal behavior.
+    </p>
+
+</dl><!-- crypto -->
+
+<dl id="crypto/cipher"><dt><a href="/pkg/crypto/cipher/">crypto/cipher</a></dt>
+  <dd>
+    <p><!-- CL 48510, CL 116435 -->
+      The new function <a href="/pkg/crypto/cipher/#NewGCMWithTagSize"><code>NewGCMWithTagSize</code></a>
+      implements Galois Counter Mode with non-standard tag lengths for compatibility with existing cryptosystems.
+    </p>
+
+</dl><!-- crypto/cipher -->
+
+<dl id="crypto/rsa"><dt><a href="/pkg/crypto/rsa/">crypto/rsa</a></dt>
+  <dd>
+    <p><!-- CL 103876 -->
+      <a href="/pkg/crypto/rsa/#PublicKey"><code>PublicKey</code></a> now implements a
+      <a href="/pkg/crypto/rsa/#PublicKey.Size"><code>Size</code></a> method that
+      returns the modulus size in bytes.
+    </p>
+
+</dl><!-- crypto/rsa -->
+
+<dl id="crypto/tls"><dt><a href="/pkg/crypto/tls/">crypto/tls</a></dt>
+  <dd>
+    <p><!-- CL 85115 -->
+      <a href="/pkg/crypto/tls/#ConnectionState"><code>ConnectionState</code></a>'s new
+      <a href="/pkg/crypto/tls/#ConnectionState.ExportKeyingMaterial"><code>ExportKeyingMaterial</code></a>
+      method allows exporting keying material bound to the
+      connection according to RFC 5705.
+    </p>
+
+</dl><!-- crypto/tls -->
+
+<dl id="crypto/x509"><dt><a href="/pkg/crypto/x509/">crypto/x509</a></dt>
+  <dd>
+    <p><!-- CL 123355, CL 123695 -->
+      The deprecated, legacy behavior of treating the <code>CommonName</code> field as
+      a hostname when no Subject Alternative Names are present is now disabled when the CN is not a
+      valid hostname.
+      The <code>CommonName</code> can be completely ignored by adding the experimental value
+      <code>x509ignoreCN=1</code> to the <code>GODEBUG</code> environment variable.
+      When the CN is ignored, certificates without SANs validate under chains with name constraints
+      instead of returning <code>NameConstraintsWithoutSANs</code>.
+    </p>
+
+    <p><!-- CL 113475 -->
+      Extended key usage restrictions are again checked only if they appear in the <code>KeyUsages</code>
+      field of <a href="/pkg/crypto/x509/#VerifyOptions"><code>VerifyOptions</code></a>, instead of always being checked.
+      This matches the behavior of Go 1.9 and earlier.
+    </p>
+
+    <p><!-- CL 102699 -->
+      The value returned by <a href="/pkg/crypto/x509/#SystemCertPool"><code>SystemCertPool</code></a>
+      is now cached and might not reflect system changes between invocations.
+    </p>
+
+</dl><!-- crypto/x509 -->
+
+<dl id="debug/elf"><dt><a href="/pkg/debug/elf/">debug/elf</a></dt>
+  <dd>
+    <p><!-- CL 112115 -->
+      More <a href="/pkg/debug/elf/#ELFOSABI_NONE"><code>ELFOSABI</code></a>
+      and <a href="/pkg/debug/elf/#EM_NONE"><code>EM</code></a>
+      constants have been added.
+    </p>
+
+</dl><!-- debug/elf -->
+
+<dl id="encoding/asn1"><dt><a href="/pkg/encoding/asn1/">encoding/asn1</a></dt>
+  <dd>
+    <p><!-- CL 110561 -->
+      <code>Marshal</code> and <code><a href="/pkg/encoding/asn1/#Unmarshal">Unmarshal</a></code>
+      now support "private" class annotations for fields.
+    </p>
+
+</dl><!-- encoding/asn1 -->
+
+<dl id="encoding/base32"><dt><a href="/pkg/encoding/base32/">encoding/base32</a></dt>
+  <dd>
+    <p><!-- CL 112516 -->
+      The decoder now consistently
+      returns <code>io.ErrUnexpectedEOF</code> for an incomplete
+      chunk. Previously it would return <code>io.EOF</code> in some
+      cases.
+    </p>
+
+</dl><!-- encoding/base32 -->
+
+<dl id="encoding/csv"><dt><a href="/pkg/encoding/csv/">encoding/csv</a></dt>
+  <dd>
+    <p><!-- CL 99696 -->
+      The <code>Reader</code> now rejects attempts to set
+      the <a href="/pkg/encoding/csv/#Reader.Comma"><code>Comma</code></a>
+      field to a double-quote character, as double-quote characters
+      already have a special meaning in CSV.
+    </p>
+
+</dl><!-- encoding/csv -->
+
+<!-- CL 100235 was reverted -->
+
+<dl id="html/template"><dt><a href="/pkg/html/template/">html/template</a></dt>
+  <dd>
+    <p><!-- CL 121815 -->
+      The package has changed its behavior when a typed interface
+      value is passed to an implicit escaper function. Previously such
+      a value was written out as (an escaped form)
+      of <code>&lt;nil&gt;</code>. Now such values are ignored, just
+      as an untyped <code>nil</code> value is (and always has been)
+      ignored.
+    </p>
+
+</dl><!-- html/template -->
+
+<dl id="image/gif"><dt><a href="/pkg/image/gif/">image/gif</a></dt>
+  <dd>
+    <p><!-- CL 93076 -->
+      Non-looping animated GIFs are now supported. They are denoted by having a
+      <code><a href="/pkg/image/gif/#GIF.LoopCount">LoopCount</a></code> of -1.
+    </p>
+
+</dl><!-- image/gif -->
+
+<dl id="io/ioutil"><dt><a href="/pkg/io/ioutil/">io/ioutil</a></dt>
+  <dd>
+    <p><!-- CL 105675 -->
+      The <code><a href="/pkg/io/ioutil/#TempFile">TempFile</a></code>
+      function now supports specifying where the random characters in
+      the filename are placed. If the <code>prefix</code> argument
+      includes a "<code>*</code>", the random string replaces the
+      "<code>*</code>". For example, a <code>prefix</code> argument of "<code>myname.*.bat</code>" will
+      result in a random filename such as
+      "<code>myname.123456.bat</code>". If no "<code>*</code>" is
+      included the old behavior is retained, and the random digits are
+      appended to the end.
+    </p>
+
+</dl><!-- io/ioutil -->
+
+<dl id="math/big"><dt><a href="/pkg/math/big/">math/big</a></dt>
+  <dd>
+
+    <p><!-- CL 108996 -->
+      <a href="/pkg/math/big/#Int.ModInverse"><code>ModInverse</code></a> now returns nil when g and n are not relatively prime. The result was previously undefined.
+    </p>
+
+</dl><!-- math/big -->
+
+<dl id="mime/multipart"><dt><a href="/pkg/mime/multipart/">mime/multipart</a></dt>
+  <dd>
+    <p><!-- CL 121055 -->
+      The handling of form-data with missing/empty file names has been
+      restored to the behavior in Go 1.9: in the
+      <a href="/pkg/mime/multipart/#Form"><code>Form</code></a> for
+      the form-data part the value is available in
+      the <code>Value</code> field rather than the <code>File</code>
+      field. In Go releases 1.10 through 1.10.3 a form-data part with
+      a missing/empty file name and a non-empty "Content-Type" field
+      was stored in the <code>File</code> field.  This change was a
+      mistake in 1.10 and has been reverted to the 1.9 behavior.
+    </p>
+
+</dl><!-- mime/multipart -->
+
+<dl id="mime/quotedprintable"><dt><a href="/pkg/mime/quotedprintable/">mime/quotedprintable</a></dt>
+  <dd>
+    <p><!-- CL 121095 -->
+      To support invalid input found in the wild, the package now
+      permits non-ASCII bytes but does not validate their encoding.
+    </p>
+
+</dl><!-- mime/quotedprintable -->
+
+<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
+  <dd>
+    <p><!-- CL 72810 -->
+      The new <a href="/pkg/net/#ListenConfig"><code>ListenConfig</code></a> type and the new
+      <a href="/pkg/net/#Dialer.Control"><code>Dialer.Control</code></a> field permit
+      setting socket options before accepting and creating connections, respectively.
+    </p>
+
+    <p><!-- CL 76391 -->
+      The <a href="/pkg/syscall/#RawConn"><code>syscall.RawConn</code></a> <code>Read</code>
+      and <code>Write</code> methods now work correctly on Windows.
+    </p>
+
+    <p><!-- CL 107715 -->
+      The <code>net</code> package now automatically uses the
+      <a href="http://man7.org/linux/man-pages/man2/splice.2.html"><code>splice</code> system call</a>
+      on Linux when copying data between TCP connections in
+      <a href="/pkg/net/#TCPConn.ReadFrom"><code>TCPConn.ReadFrom</code></a>, as called by
+      <a href="/pkg/io/#Copy"><code>io.Copy</code></a>. The result is faster, more efficient TCP proxying.
+    </p>
+
+    <p><!-- CL 108297 -->
+      The <a href="/pkg/net/#TCPConn.File"><code>TCPConn.File</code></a>,
+      <a href="/pkg/net/#UDPConn.File"><code>UDPConn.File</code></a>,
+      <a href="/pkg/net/#UnixCOnn.File"><code>UnixConn.File</code></a>,
+      and <a href="/pkg/net/#IPConn.File"><code>IPConn.File</code></a>
+      methods no longer put the returned <code>*os.File</code> into
+      blocking mode.
+    </p>
+
+</dl><!-- net -->
+
+<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
+  <dd>
+    <p><!-- CL 71272 -->
+      The <a href="/pkg/net/http/#Transport"><code>Transport</code></a> type has a
+      new <a href="/pkg/net/http/#Transport.MaxConnsPerHost"><code>MaxConnsPerHost</code></a>
+      option that permits limiting the maximum number of connections
+      per host.
+    </p>
+
+    <p><!-- CL 79919 -->
+      The <a href="/pkg/net/http/#Cookie"><code>Cookie</code></a> type has a new
+      <a href="/pkg/net/http/#Cookie.SameSite"><code>SameSite</code></a> field
+      (of new type also named
+      <a href="/pkg/net/http/#SameSite"><code>SameSite</code></a>) to represent the new cookie attribute recently supported by most browsers.
+      The <code>net/http</code>'s <code>Transport</code> does not use the <code>SameSite</code>
+      attribute itself, but the package supports parsing and serializing the
+      attribute for browsers to use.
+    </p>
+
+    <p><!-- CL 81778 -->
+      It is no longer allowed to reuse a <a href="/pkg/net/http/#Server"><code>Server</code></a>
+      after a call to
+      <a href="/pkg/net/http/#Server.Shutdown"><code>Shutdown</code></a> or
+      <a href="/pkg/net/http/#Server.Close"><code>Close</code></a>. It was never officially supported
+      in the past and had often surprising behavior. Now, all future calls to the server's <code>Serve</code>
+      methods will return errors after a shutdown or close.
+    </p>
+
+    <!-- CL 89275 was reverted before Go 1.11 -->
+
+    <p><!-- CL 93296 -->
+      The constant <code>StatusMisdirectedRequest</code> is now defined for HTTP status code 421.
+    </p>
+
+    <p><!-- CL 123875 -->
+      The HTTP server will no longer cancel contexts or send on
+      <a href="/pkg/net/http/#CloseNotifier"><code>CloseNotifier</code></a>
+      channels upon receiving pipelined HTTP/1.1 requests. Browsers do
+      not use HTTP pipelining, but some clients (such as
+      Debian's <code>apt</code>) may be configured to do so.
+    </p>
+
+    <p><!-- CL 115255 -->
+      <a href="/pkg/net/http/#ProxyFromEnvironment"><code>ProxyFromEnvironment</code></a>, which is used by the
+      <a href="/pkg/net/http/#DefaultTransport"><code>DefaultTransport</code></a>, now
+      supports CIDR notation and ports in the <code>NO_PROXY</code> environment variable.
+    </p>
+
+</dl><!-- net/http -->
+
+<dl id="net/http/httputil"><dt><a href="/pkg/net/http/httputil/">net/http/httputil</a></dt>
+  <dd>
+    <p><!-- CL 77410 -->
+      The
+      <a href="/pkg/net/http/httputil/#ReverseProxy"><code>ReverseProxy</code></a>
+      has a new
+      <a href="/pkg/net/http/httputil/#ReverseProxy.ErrorHandler"><code>ErrorHandler</code></a>
+      option to permit changing how errors are handled.
+    </p>
+
+    <p><!-- CL 115135 -->
+      The <code>ReverseProxy</code> now also passes
+      "<code>TE:</code>&nbsp;<code>trailers</code>" request headers
+      through to the backend, as required by the gRPC protocol.
+    </p>
+
+</dl><!-- net/http/httputil -->
+
+<dl id="os"><dt><a href="/pkg/os/">os</a></dt>
+  <dd>
+    <p><!-- CL 78835 -->
+      The new <a href="/pkg/os/#UserCacheDir"><code>UserCacheDir</code></a> function
+      returns the default root directory to use for user-specific cached data.
+    </p>
+
+    <p><!-- CL 94856 -->
+      The new <a href="/pkg/os/#ModeIrregular"><code>ModeIrregular</code></a>
+      is a <a href="/pkg/os/#FileMode"><code>FileMode</code></a> bit to represent
+      that a file is not a regular file, but nothing else is known about it, or that
+      it's not a socket, device, named pipe, symlink, or other file type for which
+      Go has a defined mode bit.
+    </p>
+
+    <p><!-- CL 99337 -->
+      <a href="/pkg/os/#Symlink"><code>Symlink</code></a> now works
+      for unprivileged users on Windows 10 on machines with Developer
+      Mode enabled.
+    </p>
+
+    <p><!-- CL 100077 -->
+      When a non-blocking descriptor is passed
+      to <a href="/pkg/os#NewFile"><code>NewFile</code></a>, the
+      resulting <code>*File</code> will be kept in non-blocking
+      mode. This means that I/O for that <code>*File</code> will use
+      the runtime poller rather than a separate thread, and that
+      the <a href="/pkg/os/#File.SetDeadline"><code>SetDeadline</code></a>
+      methods will work.
+    </p>
+
+</dl><!-- os -->
+
+<dl id="os/signal"><dt><a href="/pkg/os/signal/">os/signal</a></dt>
+  <dd>
+    <p><!-- CL 108376 -->
+      The new <a href="/pkg/os/signal/#Ignored"><code>Ignored</code></a> function reports
+      whether a signal is currently ignored.
+    </p>
+
+</dl><!-- os/signal -->
+
+<dl id="os/user"><dt><a href="/pkg/os/user/">os/user</a></dt>
+  <dd>
+    <p><!-- CL 92456 -->
+      The <code>os/user</code> package can now be built in pure Go
+      mode using the build tag "<code>osusergo</code>",
+      independent of the use of the environment
+      variable <code>CGO_ENABLED=0</code>. Previously the only way to use
+      the package's pure Go implementation was to disable <code>cgo</code>
+      support across the entire program.
+    </p>
+
+</dl><!-- os/user -->
+
+<!-- CL 101715 was reverted -->
+
+<dl id="pkg-runtime"><dt id="runtime-again"><a href="/pkg/runtime/">runtime</a></dt>
+  <dd>
+
+    <p><!-- CL 70993 -->
+      Setting the <code>GODEBUG=tracebackancestors=<em>N</em></code>
+      environment variable now extends tracebacks with the stacks at
+      which goroutines were created, where <em>N</em> limits the
+      number of ancestor goroutines to report.
+    </p>
+
+</dl><!-- runtime -->
+
+<dl id="runtime/pprof"><dt><a href="/pkg/runtime/pprof/">runtime/pprof</a></dt>
+  <dd>
+    <p><!-- CL 102696 -->
+      This release adds a new "allocs" profile type that profiles
+      total number of bytes allocated since the program began
+      (including garbage-collected bytes). This is identical to the
+      existing "heap" profile viewed in <code>-alloc_space</code> mode.
+      Now <code>go test -memprofile=...</code> reports an "allocs" profile
+      instead of "heap" profile.
+    </p>
+
+</dl><!-- runtime/pprof -->
+
+<dl id="sync"><dt><a href="/pkg/sync/">sync</a></dt>
+  <dd>
+    <p><!-- CL 87095 -->
+      The mutex profile now includes reader/writer contention
+      for <a href="/pkg/sync/#RWMutex"><code>RWMutex</code></a>.
+      Writer/writer contention was already included in the mutex
+      profile.
+    </p>
+
+</dl><!-- sync -->
+
+<dl id="syscall"><dt><a href="/pkg/syscall/">syscall</a></dt>
+  <dd>
+    <p><!-- CL 106275 -->
+      On Windows, several fields were changed from <code>uintptr</code> to a new
+      <a href="/pkg/syscall/?GOOS=windows&GOARCH=amd64#Pointer"><code>Pointer</code></a>
+      type to avoid problems with Go's garbage collector. The same change was made
+      to the <a href="https://godoc.org/golang.org/x/sys/windows"><code>golang.org/x/sys/windows</code></a>
+      package. For any code affected, users should first migrate away from the <code>syscall</code>
+      package to the <code>golang.org/x/sys/windows</code> package, and then change
+      to using the <code>Pointer</code>, while obeying the
+      <a href="/pkg/unsafe/#Pointer"><code>unsafe.Pointer</code> conversion rules</a>.
+    </p>
+
+    <p><!-- CL 118658 -->
+      On Linux, the <code>flags</code> parameter to
+      <a href="/pkg/syscall/?GOOS=linux&GOARCH=amd64#Faccessat"><code>Faccessat</code></a>
+      is now implemented just as in glibc. In earlier Go releases the
+      flags parameter was ignored.
+    </p>
+
+    <p><!-- CL 118658 -->
+      On Linux, the <code>flags</code> parameter to
+      <a href="/pkg/syscall/?GOOS=linux&GOARCH=amd64#Fchmodat"><code>Fchmodat</code></a>
+      is now validated. Linux's <code>fchmodat</code> doesn't support the <code>flags</code> parameter
+      so we now mimic glibc's behavior and return an error if it's non-zero.
+    </p>
+
+</dl><!-- syscall -->
+
+<dl id="text/scanner"><dt><a href="/pkg/text/scanner/">text/scanner</a></dt>
+  <dd>
+    <p><!-- CL 112037 -->
+      The <a href="/pkg/text/scanner/#Scanner.Scan"><code>Scanner.Scan</code></a> method now returns
+      the <a href="/pkg/text/scanner/#RawString"><code>RawString</code></a> token
+      instead of <a href="/pkg/text/scanner/#String"><code>String</code></a>
+      for raw string literals.
+    </p>
+
+</dl><!-- text/scanner -->
+
+<dl id="text/template"><dt><a href="/pkg/text/template/">text/template</a></dt>
+  <dd>
+    <p><!-- CL 84480 -->
+      Modifying template variables via assignments is now permitted via the <code>=</code> token:
+    </p>
+    <pre>
+  {{"{{"}} $v := "init" {{"}}"}}
+  {{"{{"}} if true {{"}}"}}
+    {{"{{"}} $v = "changed" {{"}}"}}
+  {{"{{"}} end {{"}}"}}
+  v: {{"{{"}} $v {{"}}"}} {{"{{"}}/* "changed" */{{"}}"}}</pre>
+
+    <p><!-- CL 95215 -->
+      In previous versions untyped <code>nil</code> values passed to
+      template functions were ignored. They are now passed as normal
+      arguments.
+    </p>
+
+</dl><!-- text/template -->
+
+<dl id="time"><dt><a href="/pkg/time/">time</a></dt>
+  <dd>
+    <p><!-- CL 98157 -->
+	  Parsing of timezones denoted by sign and offset is now
+	  supported. In previous versions, numeric timezone names
+	  (such as <code>+03</code>) were not considered valid, and only
+	  three-letter abbreviations (such as <code>MST</code>) were accepted
+	  when expecting a timezone name.
+    </p>
+</dl><!-- time -->
diff --git a/_content/doc/go1.12.html b/_content/doc/go1.12.html
new file mode 100644
index 0000000..a8b0c87
--- /dev/null
+++ b/_content/doc/go1.12.html
@@ -0,0 +1,949 @@
+<!--{
+        "Title": "Go 1.12 Release Notes",
+        "Path":  "/doc/go1.12",
+        "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.12</h2>
+
+<p>
+  The latest Go release, version 1.12, arrives six months after <a href="go1.11">Go 1.11</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">promise of compatibility</a>.
+  We expect almost all Go programs to continue to compile and run as before.
+</p>
+
+<h2 id="language">Changes to the language</h2>
+
+<p>
+  There are no changes to the language specification.
+</p>
+
+<h2 id="ports">Ports</h2>
+
+<p><!-- CL 138675 -->
+  The race detector is now supported on <code>linux/arm64</code>.
+</p>
+
+<p id="freebsd">
+  Go 1.12 is the last release that is supported on FreeBSD 10.x, which has
+  already reached end-of-life. Go 1.13 will require FreeBSD 11.2+ or FreeBSD
+  12.0+.
+  FreeBSD 12.0+ requires a kernel with the COMPAT_FREEBSD11 option set (this is the default).
+</p>
+
+<p><!-- CL 146898 -->
+  cgo is now supported on <code>linux/ppc64</code>.
+</p>
+
+<p id="hurd"><!-- CL 146023 -->
+  <code>hurd</code> is now a recognized value for <code>GOOS</code>, reserved
+  for the GNU/Hurd system for use with <code>gccgo</code>.
+</p>
+
+<h3 id="windows">Windows</h3>
+
+<p>
+  Go's new <code>windows/arm</code> port supports running Go on Windows 10
+  IoT Core on 32-bit ARM chips such as the Raspberry Pi 3.
+</p>
+
+<h3 id="aix">AIX</h3>
+
+<p>
+  Go now supports AIX 7.2 and later on POWER8 architectures (<code>aix/ppc64</code>). External linking, cgo, pprof and the race detector aren't yet supported.
+</p>
+
+<h3 id="darwin">Darwin</h3>
+
+<p>
+  Go 1.12 is the last release that will run on macOS 10.10 Yosemite.
+  Go 1.13 will require macOS 10.11 El Capitan or later.
+</p>
+
+<p><!-- CL 141639 -->
+  <code>libSystem</code> is now used when making syscalls on Darwin,
+  ensuring forward-compatibility with future versions of macOS and iOS.
+  <!-- CL 153338 -->
+  The switch to <code>libSystem</code> triggered additional App Store
+  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>
+
+<h3 id="vet"><code>go tool vet</code> no longer supported</h3>
+
+<p>
+  The <code>go vet</code> command has been rewritten to serve as the
+  base for a range of different source code analysis tools. See
+  the <a href="https://godoc.org/golang.org/x/tools/go/analysis">golang.org/x/tools/go/analysis</a>
+  package for details. A side-effect is that <code>go tool vet</code>
+  is no longer supported. External tools that use <code>go tool
+  vet</code> must be changed to use <code>go
+  vet</code>. Using <code>go vet</code> instead of <code>go tool
+  vet</code> should work with all supported versions of Go.
+</p>
+
+<p>
+  As part of this change, the experimental <code>-shadow</code> option
+  is no longer available with <code>go vet</code>. Checking for
+  variable shadowing may now be done using
+<pre>
+go get -u golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
+go vet -vettool=$(which shadow)
+</pre>
+</p>
+
+<h3 id="tour">Tour</h3>
+
+<p> <!-- CL 152657 -->
+The Go tour is no longer included in the main binary distribution. To
+run the tour locally, instead of running <code>go</code> <code>tool</code> <code>tour</code>,
+manually install it:
+<pre>
+go get -u golang.org/x/tour
+tour
+</pre>
+</p>
+
+<h3 id="gocache">Build cache requirement</h3>
+
+<p>
+  The <a href="/cmd/go/#hdr-Build_and_test_caching">build cache</a> is now
+  required as a step toward eliminating
+  <code>$GOPATH/pkg</code>. Setting the environment variable
+  <code>GOCACHE=off</code> will cause <code>go</code> commands that write to the
+  cache to fail.
+</p>
+
+<h3 id="binary-only">Binary-only packages</h3>
+
+<p>
+  Go 1.12 is the last release that will support binary-only packages.
+</p>
+
+<h3 id="cgo">Cgo</h3>
+
+<p>
+	Go 1.12 will translate the C type <code>EGLDisplay</code> to the Go type <code>uintptr</code>.
+	This change is similar to how Go 1.10 and newer treats Darwin's CoreFoundation
+	and Java's JNI types. See the
+	<a href="/cmd/cgo/#hdr-Special_cases">cgo documentation</a>
+	for more information.
+</p>
+
+<p><!-- CL 152657 -->
+  Mangled C names are no longer accepted in packages that use Cgo. Use the Cgo
+  names instead. For example, use the documented cgo name <code>C.char</code>
+  rather than the mangled name <code>_Ctype_char</code> that cgo generates.
+</p>
+
+<h3 id="modules">Modules</h3>
+
+<p><!-- CL 148517 -->
+  When <code>GO111MODULE</code> is set to <code>on</code>, the <code>go</code>
+  command now supports module-aware operations outside of a module directory,
+  provided that those operations do not need to resolve import paths relative to
+  the current directory or explicitly edit the <code>go.mod</code> file.
+  Commands such as <code>go</code> <code>get</code>,
+  <code>go</code> <code>list</code>, and
+  <code>go</code> <code>mod</code> <code>download</code> behave as if in a
+  module with initially-empty requirements.
+  In this mode, <code>go</code> <code>env</code> <code>GOMOD</code> reports
+  the system's null device (<code>/dev/null</code> or <code>NUL</code>).
+</p>
+
+<p><!-- CL 146382 -->
+  <code>go</code> commands that download and extract modules are now safe to
+  invoke concurrently.
+  The module cache (<code>GOPATH/pkg/mod</code>) must reside in a filesystem that
+  supports file locking.
+</p>
+
+<p><!-- CL 147282, 147281 -->
+  The <code>go</code> directive in a <code>go.mod</code> file now indicates the
+  version of the language used by the files within that module.
+  It will be set to the current release
+  (<code>go</code> <code>1.12</code>) if no existing version is
+  present.
+  If the <code>go</code> directive for a module specifies a
+  version <em>newer</em> than the toolchain in use, the <code>go</code> command
+  will attempt to build the packages regardless, and will note the mismatch only if
+  that build fails.
+</p>
+
+<p><!-- CL 147282, 147281 -->
+  This changed use of the <code>go</code> directive means that if you
+  use Go 1.12 to build a module, thus recording <code>go 1.12</code>
+  in the <code>go.mod</code> file, you will get an error when
+  attempting to build the same module with Go 1.11 through Go 1.11.3.
+  Go 1.11.4 or later will work fine, as will releases older than Go 1.11.
+  If you must use Go 1.11 through 1.11.3, you can avoid the problem by
+  setting the language version to 1.11, using the Go 1.12 go tool,
+  via <code>go mod edit -go=1.11</code>.
+</p>
+
+<p><!-- CL 152739 -->
+  When an import cannot be resolved using the active modules,
+  the <code>go</code> command will now try to use the modules mentioned in the
+  main module's <code>replace</code> directives before consulting the module
+  cache and the usual network sources.
+  If a matching replacement is found but the <code>replace</code> directive does
+  not specify a version, the <code>go</code> command uses a pseudo-version
+  derived from the zero <code>time.Time</code> (such
+  as <code>v0.0.0-00010101000000-000000000000</code>).
+</p>
+
+<h3 id="compiler">Compiler toolchain</h3>
+
+<p><!-- CL 134155, 134156 -->
+  The compiler's live variable analysis has improved. This may mean that
+  finalizers will be executed sooner in this release than in previous
+  releases. If that is a problem, consider the appropriate addition of a
+  <a href="/pkg/runtime/#KeepAlive"><code>runtime.KeepAlive</code></a> call.
+</p>
+
+<p><!-- CL 147361 -->
+  More functions are now eligible for inlining by default, including
+  functions that do nothing but call another function.
+  This extra inlining makes it additionally important to use
+  <a href="/pkg/runtime/#CallersFrames"><code>runtime.CallersFrames</code></a>
+  instead of iterating over the result of
+  <a href="/pkg/runtime/#Callers"><code>runtime.Callers</code></a> directly.
+<pre>
+// Old code which no longer works correctly (it will miss inlined call frames).
+var pcs [10]uintptr
+n := runtime.Callers(1, pcs[:])
+for _, pc := range pcs[:n] {
+	f := runtime.FuncForPC(pc)
+	if f != nil {
+		fmt.Println(f.Name())
+	}
+}
+</pre>
+<pre>
+// New code which will work correctly.
+var pcs [10]uintptr
+n := runtime.Callers(1, pcs[:])
+frames := runtime.CallersFrames(pcs[:n])
+for {
+	frame, more := frames.Next()
+	fmt.Println(frame.Function)
+	if !more {
+		break
+	}
+}
+</pre>
+</p>
+
+<p><!-- CL 153477 -->
+  Wrappers generated by the compiler to implement method expressions
+  are no longer reported
+  by <a href="/pkg/runtime/#CallersFrames"><code>runtime.CallersFrames</code></a>
+  and <a href="/pkg/runtime/#Stack"><code>runtime.Stack</code></a>. They
+  are also not printed in panic stack traces.
+
+  This change aligns the <code>gc</code> toolchain to match
+  the <code>gccgo</code> toolchain, which already elided such wrappers
+  from stack traces.
+
+  Clients of these APIs might need to adjust for the missing
+  frames. For code that must interoperate between 1.11 and 1.12
+  releases, you can replace the method expression <code>x.M</code>
+  with the function literal <code>func (...) { x.M(...) } </code>.
+</p>
+
+<p><!-- CL 144340 -->
+  The compiler now accepts a <code>-lang</code> flag to set the Go language
+  version to use. For example, <code>-lang=go1.8</code> causes the compiler to
+  emit an error if the program uses type aliases, which were added in Go 1.9.
+  Language changes made before Go 1.12 are not consistently enforced.
+</p>
+
+<p><!-- CL 147160 -->
+  The compiler toolchain now uses different conventions to call Go
+  functions and assembly functions. This should be invisible to users,
+  except for calls that simultaneously cross between Go and
+  assembly <em>and</em> cross a package boundary. If linking results
+  in an error like "relocation target not defined for ABIInternal (but
+  is defined for ABI0)", please refer to the
+  <a href="https://github.com/golang/proposal/blob/master/design/27539-internal-abi.md#compatibility">compatibility section</a>
+  of the ABI design document.
+</p>
+
+<p><!-- CL 145179 -->
+  There have been many improvements to the DWARF debug information
+  produced by the compiler, including improvements to argument
+  printing and variable location information.
+</p>
+
+<p><!-- CL 61511 -->
+  Go programs now also maintain stack frame pointers on <code>linux/arm64</code>
+  for the benefit of profiling tools like <code>perf</code>. The frame pointer
+  maintenance has a small run-time overhead that varies but averages around 3%.
+  To build a toolchain that does not use frame pointers, set
+  <code>GOEXPERIMENT=noframepointer</code> when running <code>make.bash</code>.
+</p>
+
+<p><!-- CL 142717 -->
+  The obsolete "safe" compiler mode (enabled by the <code>-u</code> gcflag) has been removed.
+</p>
+
+<h3 id="godoc"><code>godoc</code> and <code>go</code> <code>doc</code></h3>
+
+<p>
+  In Go 1.12, <code>godoc</code> no longer has a command-line interface and
+  is only a web server. Users should use <code>go</code> <code>doc</code>
+  for command-line help output instead. Go 1.12 is the last release that will
+  include the <code>godoc</code> webserver; in Go 1.13 it will be available
+  via <code>go</code> <code>get</code>.
+</p>
+
+<p><!-- CL 141977 -->
+  <code>go</code> <code>doc</code> now supports the <code>-all</code> flag,
+  which will cause it to print all exported APIs and their documentation,
+  as the <code>godoc</code> command line used to do.
+</p>
+
+<p><!-- CL 140959 -->
+  <code>go</code> <code>doc</code> also now includes the <code>-src</code> flag,
+  which will show the target's source code.
+</p>
+
+<h3 id="trace">Trace</h3>
+
+<p><!-- CL 60790 -->
+  The trace tool now supports plotting mutator utilization curves,
+  including cross-references to the execution trace. These are useful
+  for analyzing the impact of the garbage collector on application
+  latency and throughput.
+</p>
+
+<h3 id="assembler">Assembler</h3>
+
+<p><!-- CL 147218 -->
+  On <code>arm64</code>, the platform register was renamed from
+  <code>R18</code> to <code>R18_PLATFORM</code> to prevent accidental
+  use, as the OS could choose to reserve this register.
+</p>
+
+<h2 id="runtime">Runtime</h2>
+
+<p><!-- CL 138959 -->
+  Go 1.12 significantly improves the performance of sweeping when a
+  large fraction of the heap remains live. This reduces allocation
+  latency immediately following a garbage collection.
+</p>
+
+<p><!-- CL 139719 -->
+  The Go runtime now releases memory back to the operating system more
+  aggressively, particularly in response to large allocations that
+  can't reuse existing heap space.
+</p>
+
+<p><!-- CL 146342, CL 146340, CL 146345, CL 146339, CL 146343, CL 146337, CL 146341, CL 146338 -->
+  The Go runtime's timer and deadline code is faster and scales better
+  with higher numbers of CPUs. In particular, this improves the
+  performance of manipulating network connection deadlines.
+</p>
+
+<p><!-- CL 135395 -->
+  On Linux, the runtime now uses <code>MADV_FREE</code> to release unused
+  memory. This is more efficient but may result in higher reported
+  RSS. The kernel will reclaim the unused data when it is needed.
+  To revert to the Go 1.11 behavior (<code>MADV_DONTNEED</code>), set the
+  environment variable <code>GODEBUG=madvdontneed=1</code>.
+</p>
+
+<p><!-- CL 149578 -->
+  Adding cpu.<em>extension</em>=off to the
+  <a href="/doc/diagnostics.html#godebug">GODEBUG</a> environment
+  variable now disables the use of optional CPU instruction
+  set extensions in the standard library and runtime. This is not
+  yet supported on Windows.
+</p>
+
+<p><!-- CL 158337 -->
+  Go 1.12 improves the accuracy of memory profiles by fixing
+  overcounting of large heap allocations.
+</p>
+
+<p><!-- CL 159717 -->
+  Tracebacks, <code>runtime.Caller</code>,
+  and <code>runtime.Callers</code> no longer include
+  compiler-generated initialization functions.  Doing a traceback
+  during the initialization of a global variable will now show a
+  function named <code>PKG.init.ializers</code>.
+</p>
+
+<h2 id="library">Core library</h2>
+
+<h3 id="tls_1_3">TLS 1.3</h3>
+
+<p>
+  Go 1.12 adds opt-in support for TLS 1.3 in the <code>crypto/tls</code> package as
+  specified by <a href="https://www.rfc-editor.org/info/rfc8446">RFC 8446</a>. It can
+  be enabled by adding the value <code>tls13=1</code> to the <code>GODEBUG</code>
+  environment variable. It will be enabled by default in Go 1.13.
+</p>
+
+<p>
+  To negotiate TLS 1.3, make sure you do not set an explicit <code>MaxVersion</code> in
+  <a href="/pkg/crypto/tls/#Config"><code>Config</code></a> and run your program with
+  the environment variable <code>GODEBUG=tls13=1</code> set.
+</p>
+
+<p>
+  All TLS 1.2 features except <code>TLSUnique</code> in
+  <a href="/pkg/crypto/tls/#ConnectionState"><code>ConnectionState</code></a>
+  and renegotiation are available in TLS 1.3 and provide equivalent or
+  better security and performance. Note that even though TLS 1.3 is backwards
+  compatible with previous versions, certain legacy systems might not work
+  correctly when attempting to negotiate it. RSA certificate keys too small
+  to be secure (including 512-bit keys) will not work with TLS 1.3.
+</p>
+
+<p>
+  TLS 1.3 cipher suites are not configurable. All supported cipher suites are
+  safe, and if <code>PreferServerCipherSuites</code> is set in
+  <a href="/pkg/crypto/tls/#Config"><code>Config</code></a> the preference order
+  is based on the available hardware.
+</p>
+
+<p>
+  Early data (also called "0-RTT mode") is not currently supported as a
+  client or server. Additionally, a Go 1.12 server does not support skipping
+  unexpected early data if a client sends it. Since TLS 1.3 0-RTT mode
+  involves clients keeping state regarding which servers support 0-RTT,
+  a Go 1.12 server cannot be part of a load-balancing pool where some other
+  servers do support 0-RTT. If switching a domain from a server that supported
+  0-RTT to a Go 1.12 server, 0-RTT would have to be disabled for at least the
+  lifetime of the issued session tickets before the switch to ensure
+  uninterrupted operation.
+</p>
+
+<p>
+  In TLS 1.3 the client is the last one to speak in the handshake, so if it causes
+  an error to occur on the server, it will be returned on the client by the first
+  <a href="/pkg/crypto/tls/#Conn.Read"><code>Read</code></a>, not by
+  <a href="/pkg/crypto/tls/#Conn.Handshake"><code>Handshake</code></a>. For
+  example, that will be the case if the server rejects the client certificate.
+  Similarly, session tickets are now post-handshake messages, so are only
+  received by the client upon its first
+  <a href="/pkg/crypto/tls/#Conn.Read"><code>Read</code></a>.
+</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>
+
+<!-- TODO: CL 115677: https://golang.org/cl/115677: cmd/vet: check embedded field tags too -->
+
+<dl id="bufio"><dt><a href="/pkg/bufio/">bufio</a></dt>
+  <dd>
+    <p><!-- CL 149297 -->
+      <code>Reader</code>'s <a href="/pkg/bufio/#Reader.UnreadRune"><code>UnreadRune</code></a> and
+      <a href="/pkg/bufio/#Reader.UnreadByte"><code>UnreadByte</code></a> methods will now return an error
+      if they are called after <a href="/pkg/bufio/#Reader.Peek"><code>Peek</code></a>.
+    </p>
+
+</dl><!-- bufio -->
+
+<dl id="bytes"><dt><a href="/pkg/bytes/">bytes</a></dt>
+  <dd>
+    <p><!-- CL 137855 -->
+      The new function <a href="/pkg/bytes/#ReplaceAll"><code>ReplaceAll</code></a> returns a copy of
+      a byte slice with all non-overlapping instances of a value replaced by another.
+    </p>
+
+    <p><!-- CL 145098 -->
+      A pointer to a zero-value <a href="/pkg/bytes/#Reader"><code>Reader</code></a> is now
+      functionally equivalent to <a href="/pkg/bytes/#NewReader"><code>NewReader</code></a><code>(nil)</code>.
+      Prior to Go 1.12, the former could not be used as a substitute for the latter in all cases.
+    </p>
+
+</dl><!-- bytes -->
+
+<dl id="crypto/rand"><dt><a href="/pkg/crypto/rand/">crypto/rand</a></dt>
+  <dd>
+    <p><!-- CL 139419 -->
+      A warning will now be printed to standard error the first time
+      <code>Reader.Read</code> is blocked for more than 60 seconds waiting
+      to read entropy from the kernel.
+    </p>
+
+    <p><!-- CL 120055 -->
+      On FreeBSD, <code>Reader</code> now uses the <code>getrandom</code>
+      system call if available, <code>/dev/urandom</code> otherwise.
+    </p>
+
+</dl><!-- crypto/rand -->
+
+<dl id="crypto/rc4"><dt><a href="/pkg/crypto/rc4/">crypto/rc4</a></dt>
+  <dd>
+    <p><!-- CL 130397 -->
+      This release removes the assembly implementations, leaving only
+      the pure Go version. The Go compiler generates code that is
+      either slightly better or slightly worse, depending on the exact
+      CPU. RC4 is insecure and should only be used for compatibility
+      with legacy systems.
+    </p>
+
+</dl><!-- crypto/rc4 -->
+
+<dl id="crypto/tls"><dt><a href="/pkg/crypto/tls/">crypto/tls</a></dt>
+  <dd>
+    <p><!-- CL 143177 -->
+      If a client sends an initial message that does not look like TLS, the server
+      will no longer reply with an alert, and it will expose the underlying
+      <code>net.Conn</code> in the new field <code>Conn</code> of
+      <a href="/pkg/crypto/tls/#RecordHeaderError"><code>RecordHeaderError</code></a>.
+    </p>
+
+</dl><!-- crypto/tls -->
+
+<dl id="database/sql"><dt><a href="/pkg/database/sql/">database/sql</a></dt>
+  <dd>
+    <p><!-- CL 145738 -->
+      A query cursor can now be obtained by passing a
+      <a href="/pkg/database/sql/#Rows"><code>*Rows</code></a>
+      value to the <a href="/pkg/database/sql/#Row.Scan"><code>Row.Scan</code></a> method.
+    </p>
+
+</dl><!-- database/sql -->
+
+<dl id="expvar"><dt><a href="/pkg/expvar/">expvar</a></dt>
+  <dd>
+    <p><!-- CL 139537 -->
+      The new <a href="/pkg/expvar/#Map.Delete"><code>Delete</code></a> method allows
+      for deletion of key/value pairs from a <a href="/pkg/expvar/#Map"><code>Map</code></a>.
+    </p>
+
+</dl><!-- expvar -->
+
+<dl id="fmt"><dt><a href="/pkg/fmt/">fmt</a></dt>
+  <dd>
+    <p><!-- CL 142737 -->
+      Maps are now printed in key-sorted order to ease testing. The ordering rules are:
+      <ul>
+        <li>When applicable, nil compares low
+        <li>ints, floats, and strings order by <
+        <li>NaN compares less than non-NaN floats
+        <li>bool compares false before true
+        <li>Complex compares real, then imaginary
+        <li>Pointers compare by machine address
+        <li>Channel values compare by machine address
+        <li>Structs compare each field in turn
+        <li>Arrays compare each element in turn
+        <li>Interface values compare first by <code>reflect.Type</code> describing the concrete type
+            and then by concrete value as described in the previous rules.
+      </ul>
+    </p>
+
+    <p><!-- CL 129777 -->
+      When printing maps, non-reflexive key values like <code>NaN</code> were previously
+      displayed as <code>&lt;nil&gt;</code>. As of this release, the correct values are printed.
+    </p>
+
+</dl><!-- fmt -->
+
+<dl id="go/doc"><dt><a href="/pkg/go/doc/">go/doc</a></dt>
+  <dd>
+    <p><!-- CL 140958 -->
+      To address some outstanding issues in <a href="/cmd/doc/"><code>cmd/doc</code></a>,
+      this package has a new <a href="/pkg/go/doc/#Mode"><code>Mode</code></a> bit,
+      <code>PreserveAST</code>, which controls whether AST data is cleared.
+    </p>
+
+</dl><!-- go/doc -->
+
+<dl id="go/token"><dt><a href="/pkg/go/token/">go/token</a></dt>
+  <dd>
+    <p><!-- CL 134075 -->
+      The <a href="/pkg/go/token#File"><code>File</code></a> type has a new
+      <a href="/pkg/go/token#File.LineStart"><code>LineStart</code></a> field,
+      which returns the position of the start of a given line. This is especially useful
+      in programs that occasionally handle non-Go files, such as assembly, but wish to use
+      the <code>token.Pos</code> mechanism to identify file positions.
+    </p>
+
+</dl><!-- go/token -->
+
+<dl id="image"><dt><a href="/pkg/image/">image</a></dt>
+  <dd>
+    <p><!-- CL 118755 -->
+      The <a href="/pkg/image/#RegisterFormat"><code>RegisterFormat</code></a> function is now safe for concurrent use.
+    </p>
+
+</dl><!-- image -->
+
+<dl id="image/png"><dt><a href="/pkg/image/png/">image/png</a></dt>
+  <dd>
+    <p><!-- CL 134235 -->
+      Paletted images with fewer than 16 colors now encode to smaller outputs.
+    </p>
+
+</dl><!-- image/png -->
+
+<dl id="io"><dt><a href="/pkg/io/">io</a></dt>
+  <dd>
+    <p><!-- CL 139457 -->
+      The new <a href="/pkg/io#StringWriter"><code>StringWriter</code></a> interface wraps the
+      <a href="/pkg/io/#WriteString"><code>WriteString</code></a> function.
+    </p>
+
+</dl><!-- io -->
+
+<dl id="math"><dt><a href="/pkg/math/">math</a></dt>
+  <dd>
+    <p><!-- CL 153059 -->
+      The functions
+      <a href="/pkg/math/#Sin"><code>Sin</code></a>,
+      <a href="/pkg/math/#Cos"><code>Cos</code></a>,
+      <a href="/pkg/math/#Tan"><code>Tan</code></a>,
+      and <a href="/pkg/math/#Sincos"><code>Sincos</code></a> now
+      apply Payne-Hanek range reduction to huge arguments. This
+      produces more accurate answers, but they will not be bit-for-bit
+      identical with the results in earlier releases.
+    </p>
+</dl><!-- math -->
+
+<dl id="math/bits"><dt><a href="/pkg/math/bits/">math/bits</a></dt>
+  <dd>
+    <p><!-- CL 123157 -->
+    New extended precision operations <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>, and <a href="/pkg/math/bits/#Div"><code>Div</code></a> are available in <code>uint</code>, <code>uint32</code>, and <code>uint64</code> versions.
+    </p>
+
+</dl><!-- math/bits -->
+
+<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
+  <dd>
+    <p><!-- CL 146659 -->
+      The
+      <a href="/pkg/net/#Dialer.DualStack"><code>Dialer.DualStack</code></a> setting is now ignored and deprecated;
+      RFC 6555 Fast Fallback ("Happy Eyeballs") is now enabled by default. To disable, set
+      <a href="/pkg/net/#Dialer.FallbackDelay"><code>Dialer.FallbackDelay</code></a> to a negative value.
+    </p>
+
+    <p><!-- CL 107196 -->
+      Similarly, TCP keep-alives are now enabled by default if
+      <a href="/pkg/net/#Dialer.KeepAlive"><code>Dialer.KeepAlive</code></a> is zero.
+      To disable, set it to a negative value.
+    </p>
+
+    <p><!-- CL 113997 -->
+      On Linux, the <a href="http://man7.org/linux/man-pages/man2/splice.2.html"><code>splice</code> system call</a> is now used when copying from a
+      <a href="/pkg/net/#UnixConn"><code>UnixConn</code></a> to a
+      <a href="/pkg/net/#TCPConn"><code>TCPConn</code></a>.
+    </p>
+</dl><!-- net -->
+
+<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
+  <dd>
+    <p><!-- CL 143177 -->
+      The HTTP server now rejects misdirected HTTP requests to HTTPS servers with a plaintext "400 Bad Request" response.
+    </p>
+
+    <p><!-- CL 130115 -->
+      The new <a href="/pkg/net/http/#Client.CloseIdleConnections"><code>Client.CloseIdleConnections</code></a>
+      method calls the <code>Client</code>'s underlying <code>Transport</code>'s <code>CloseIdleConnections</code>
+      if it has one.
+    </p>
+
+    <p><!-- CL 145398 -->
+      The <a href="/pkg/net/http/#Transport"><code>Transport</code></a> no longer rejects HTTP responses which declare
+      HTTP Trailers but don't use chunked encoding. Instead, the declared trailers are now just ignored.
+    </p>
+
+    <p><!-- CL 152080 --> <!-- CL 151857 -->
+      The <a href="/pkg/net/http/#Transport"><code>Transport</code></a> no longer handles <code>MAX_CONCURRENT_STREAMS</code> values
+      advertised from HTTP/2 servers as strictly as it did during Go 1.10 and Go 1.11. The default behavior is now back
+      to how it was in Go 1.9: each connection to a server can have up to <code>MAX_CONCURRENT_STREAMS</code> requests
+      active and then new TCP connections are created as needed. In Go 1.10 and Go 1.11 the <code>http2</code> package
+      would block and wait for requests to finish instead of creating new connections.
+      To get the stricter behavior back, import the
+      <a href="https://godoc.org/golang.org/x/net/http2"><code>golang.org/x/net/http2</code></a> package
+      directly and set
+      <a href="https://godoc.org/golang.org/x/net/http2#Transport.StrictMaxConcurrentStreams"><code>Transport.StrictMaxConcurrentStreams</code></a> to
+      <code>true</code>.
+    </p>
+
+</dl><!-- net/http -->
+
+<dl id="net/url"><dt><a href="/pkg/net/url/">net/url</a></dt>
+  <dd>
+    <p><!-- CL 159157, CL 160178 -->
+      <a href="/pkg/net/url/#Parse"><code>Parse</code></a>,
+      <a href="/pkg/net/url/#ParseRequestURI"><code>ParseRequestURI</code></a>,
+      and
+      <a href="/pkg/net/url/#URL.Parse"><code>URL.Parse</code></a>
+      now return an
+      error for URLs containing ASCII control characters, which includes NULL,
+      tab, and newlines.
+    </p>
+
+</dl><!-- net/url -->
+
+<dl id="net/http/httputil"><dt><a href="/pkg/net/http/httputil/">net/http/httputil</a></dt>
+  <dd>
+    <p><!-- CL 146437 -->
+      The <a href="/pkg/net/http/httputil/#ReverseProxy"><code>ReverseProxy</code></a> now automatically
+      proxies WebSocket requests.
+    </p>
+
+</dl><!-- net/http/httputil -->
+
+<dl id="os"><dt><a href="/pkg/os/">os</a></dt>
+  <dd>
+    <p><!-- CL 125443 -->
+      The new <a href="/pkg/os/#ProcessState.ExitCode"><code>ProcessState.ExitCode</code></a> method
+      returns the process's exit code.
+    </p>
+
+    <p><!-- CL 135075 -->
+      <code>ModeCharDevice</code> has been added to the <code>ModeType</code> bitmask, allowing for
+      <code>ModeDevice | ModeCharDevice</code> to be recovered when masking a
+      <a href="/pkg/os/#FileMode"><code>FileMode</code></a> with <code>ModeType</code>.
+    </p>
+
+    <p><!-- CL 139418 -->
+      The new function <a href="/pkg/os/#UserHomeDir"><code>UserHomeDir</code></a> returns the
+      current user's home directory.
+    </p>
+
+    <p><!-- CL 146020 -->
+      <a href="/pkg/os/#RemoveAll"><code>RemoveAll</code></a> now supports paths longer than 4096 characters
+      on most Unix systems.
+    </p>
+
+    <p><!-- CL 130676 -->
+      <a href="/pkg/os/#File.Sync"><code>File.Sync</code></a> now uses <code>F_FULLFSYNC</code> on macOS
+      to correctly flush the file contents to permanent storage.
+      This may cause the method to run more slowly than in previous releases.
+    </p>
+
+    <p><!--CL 155517 -->
+      <a href="/pkg/os/#File"><code>File</code></a> now supports
+      a <a href="/pkg/os/#File.SyscallConn"><code>SyscallConn</code></a>
+      method returning
+      a <a href="/pkg/syscall/#RawConn"><code>syscall.RawConn</code></a>
+      interface value. This may be used to invoke system-specific
+      operations on the underlying file descriptor.
+    </p>
+
+</dl><!-- os -->
+
+<dl id="path/filepath"><dt><a href="/pkg/path/filepath/">path/filepath</a></dt>
+  <dd>
+    <p><!-- CL 145220 -->
+      The <a href="/pkg/path/filepath/#IsAbs"><code>IsAbs</code></a> function now returns true when passed
+      a reserved filename on Windows such as <code>NUL</code>.
+      <a href="https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file#naming-conventions">List of reserved names.</a>
+    </p>
+
+</dl><!-- path/filepath -->
+
+<dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
+  <dd>
+    <p><!-- CL 33572 -->
+      A new <a href="/pkg/reflect#MapIter"><code>MapIter</code></a> type is
+      an iterator for ranging over a map. This type is exposed through the
+      <a href="/pkg/reflect#Value"><code>Value</code></a> type's new
+      <a href="/pkg/reflect#Value.MapRange"><code>MapRange</code></a> method.
+      This follows the same iteration semantics as a range statement, with <code>Next</code>
+      to advance the iterator, and <code>Key</code>/<code>Value</code> to access each entry.
+    </p>
+
+</dl><!-- reflect -->
+
+<dl id="regexp"><dt><a href="/pkg/regexp/">regexp</a></dt>
+  <dd>
+    <p><!-- CL 139784 -->
+      <a href="/pkg/regexp/#Regexp.Copy"><code>Copy</code></a> is no longer necessary
+      to avoid lock contention, so it has been given a partial deprecation comment.
+      <a href="/pkg/regexp/#Regexp.Copy"><code>Copy</code></a>
+      may still be appropriate if the reason for its use is to make two copies with
+      different <a href="/pkg/regexp/#Regexp.Longest"><code>Longest</code></a> settings.
+    </p>
+
+</dl><!-- regexp -->
+
+<dl id="runtime/debug"><dt><a href="/pkg/runtime/debug/">runtime/debug</a></dt>
+  <dd>
+    <p><!-- CL 144220 -->
+      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 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>
+
+</dl><!-- runtime/debug -->
+
+<dl id="strings"><dt><a href="/pkg/strings/">strings</a></dt>
+  <dd>
+    <p><!-- CL 137855 -->
+      The new function <a href="/pkg/strings/#ReplaceAll"><code>ReplaceAll</code></a> returns a copy of
+      a string with all non-overlapping instances of a value replaced by another.
+    </p>
+
+    <p><!-- CL 145098 -->
+      A pointer to a zero-value <a href="/pkg/strings/#Reader"><code>Reader</code></a> is now
+      functionally equivalent to <a href="/pkg/strings/#NewReader"><code>NewReader</code></a><code>(nil)</code>.
+      Prior to Go 1.12, the former could not be used as a substitute for the latter in all cases.
+    </p>
+
+    <p><!-- CL 122835 -->
+      The new <a href="/pkg/strings/#Builder.Cap"><code>Builder.Cap</code></a> method returns the capacity of the builder's underlying byte slice.
+    </p>
+
+    <p><!-- CL 131495 -->
+      The character mapping functions <a href="/pkg/strings/#Map"><code>Map</code></a>,
+      <a href="/pkg/strings/#Title"><code>Title</code></a>,
+      <a href="/pkg/strings/#ToLower"><code>ToLower</code></a>,
+      <a href="/pkg/strings/#ToLowerSpecial"><code>ToLowerSpecial</code></a>,
+      <a href="/pkg/strings/#ToTitle"><code>ToTitle</code></a>,
+      <a href="/pkg/strings/#ToTitleSpecial"><code>ToTitleSpecial</code></a>,
+      <a href="/pkg/strings/#ToUpper"><code>ToUpper</code></a>, and
+      <a href="/pkg/strings/#ToUpperSpecial"><code>ToUpperSpecial</code></a>
+      now always guarantee to return valid UTF-8. In earlier releases, if the input was invalid UTF-8 but no character replacements
+      needed to be applied, these routines incorrectly returned the invalid UTF-8 unmodified.
+    </p>
+
+</dl><!-- strings -->
+
+<dl id="syscall"><dt><a href="/pkg/syscall/">syscall</a></dt>
+  <dd>
+    <p><!-- CL 138595 -->
+      64-bit inodes are now supported on FreeBSD 12. Some types have been adjusted accordingly.
+    </p>
+
+    <p><!-- CL 125456 -->
+      The Unix socket
+      (<a href="https://blogs.msdn.microsoft.com/commandline/2017/12/19/af_unix-comes-to-windows/"><code>AF_UNIX</code></a>)
+      address family is now supported for compatible versions of Windows.
+    </p>
+
+    <p><!-- CL 147117 -->
+      The new function  <a href="/pkg/syscall/?GOOS=windows&GOARCH=amd64#Syscall18"><code>Syscall18</code></a>
+      has been introduced for Windows, allowing for calls with up to 18 arguments.
+    </p>
+
+</dl><!-- syscall -->
+
+<dl id="syscall/js"><dt><a href="/pkg/syscall/js/">syscall/js</a></dt>
+  <dd>
+    <p><!-- CL 153559 -->
+    <p>
+      The <code>Callback</code> type and <code>NewCallback</code> function have been renamed;
+      they are now called
+      <a href="/pkg/syscall/js/?GOOS=js&GOARCH=wasm#Func"><code>Func</code></a> and
+      <a href="/pkg/syscall/js/?GOOS=js&GOARCH=wasm#FuncOf"><code>FuncOf</code></a>, respectively.
+      This is a breaking change, but WebAssembly support is still experimental
+      and not yet subject to the
+      <a href="/doc/go1compat">Go 1 compatibility promise</a>. Any code using the
+      old names will need to be updated.
+    </p>
+
+    <p><!-- CL 141644 -->
+      If a type implements the new
+      <a href="/pkg/syscall/js/?GOOS=js&GOARCH=wasm#Wrapper"><code>Wrapper</code></a>
+      interface,
+      <a href="/pkg/syscall/js/?GOOS=js&GOARCH=wasm#ValueOf"><code>ValueOf</code></a>
+      will use it to return the JavaScript value for that type.
+    </p>
+
+    <p><!-- CL 143137 -->
+      The meaning of the zero
+      <a href="/pkg/syscall/js/?GOOS=js&GOARCH=wasm#Value"><code>Value</code></a>
+      has changed. It now represents the JavaScript <code>undefined</code> value
+      instead of the number zero.
+      This is a breaking change, but WebAssembly support is still experimental
+      and not yet subject to the
+      <a href="/doc/go1compat">Go 1 compatibility promise</a>. Any code relying on
+      the zero <a href="/pkg/syscall/js/?GOOS=js&GOARCH=wasm#Value"><code>Value</code></a>
+      to mean the number zero will need to be updated.
+    </p>
+
+    <p><!-- CL 144384 -->
+      The new
+      <a href="/pkg/syscall/js/?GOOS=js&GOARCH=wasm#Value.Truthy"><code>Value.Truthy</code></a>
+      method reports the
+      <a href="https://developer.mozilla.org/en-US/docs/Glossary/Truthy">JavaScript "truthiness"</a>
+      of a given value.
+    </p>
+
+</dl><!-- syscall/js -->
+
+<dl id="testing"><dt><a href="/pkg/testing/">testing</a></dt>
+  <dd>
+    <p><!-- CL 139258 -->
+    The <a href="/cmd/go/#hdr-Testing_flags"><code>-benchtime</code></a> flag now supports setting an explicit iteration count instead of a time when the value ends with an "<code>x</code>". For example, <code>-benchtime=100x</code> runs the benchmark 100 times.
+    </p>
+
+</dl><!-- testing -->
+
+<dl id="text/template"><dt><a href="/pkg/text/template/">text/template</a></dt>
+  <dd>
+    <p><!-- CL 142217 -->
+      When executing a template, long context values are no longer truncated in errors.
+    </p>
+    <p>
+      <code>executing "tmpl" at <.very.deep.context.v...>: map has no entry for key "notpresent"</code>
+    </p>
+    <p>
+      is now
+    </p>
+    <p>
+      <code>executing "tmpl" at <.very.deep.context.value.notpresent>: map has no entry for key "notpresent"</code>
+    </p>
+
+  <dd>
+    <p><!-- CL 143097 -->
+      If a user-defined function called by a template panics, the
+      panic is now caught and returned as an error by
+      the <code>Execute</code> or <code>ExecuteTemplate</code> method.
+    </p>
+</dl><!-- text/template -->
+
+<dl id="time"><dt><a href="/pkg/time/">time</a></dt>
+  <dd>
+    <p><!-- CL 151299 -->
+      The time zone database in <code>$GOROOT/lib/time/zoneinfo.zip</code>
+      has been updated to version 2018i. Note that this ZIP file is
+      only used if a time zone database is not provided by the operating
+      system.
+    </p>
+
+</dl><!-- time -->
+
+<dl id="unsafe"><dt><a href="/pkg/unsafe/">unsafe</a></dt>
+  <dd>
+    <p><!-- CL 146058 -->
+      It is invalid to convert a nil <code>unsafe.Pointer</code> to <code>uintptr</code> and back with arithmetic.
+      (This was already invalid, but will now cause the compiler to misbehave.)
+    </p>
+
+</dl><!-- unsafe -->
diff --git a/_content/doc/go1.13.html b/_content/doc/go1.13.html
new file mode 100644
index 0000000..8f4035d
--- /dev/null
+++ b/_content/doc/go1.13.html
@@ -0,0 +1,1066 @@
+<!--{
+        "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>&lt;&lt;</code> and <code>&gt;&gt;</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 id="nacl">
+  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>&lt;script&gt;</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> interface.
+    </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="pkg-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>
+
+    <p><!-- CL 191337 -->
+      Values of type <code>Errno</code> can be tested against error values in
+      the <code>os</code> package,
+      like <a href="/pkg/os/#ErrExist"><code>ErrExist</code></a>, using
+      <a href="/pkg/errors/#Is"><code>errors.Is</code></a>.
+    </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/_content/doc/go1.14.html b/_content/doc/go1.14.html
new file mode 100644
index 0000000..410e0cb
--- /dev/null
+++ b/_content/doc/go1.14.html
@@ -0,0 +1,924 @@
+<!--{
+        "Title": "Go 1.14 Release Notes",
+        "Path":  "/doc/go1.14"
+}-->
+
+<!--
+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.14</h2>
+
+<p>
+  The latest Go release, version 1.14, arrives six months after <a href="go1.13">Go 1.13</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>
+  Module support in the <code>go</code> command is now ready for production use,
+  and we encourage all users to <a href="https://blog.golang.org/migrating-to-go-modules">migrate to Go
+  modules for dependency management</a>. If you are unable to migrate due to a problem in the Go
+  toolchain, please ensure that the problem has an
+  <a href="https://golang.org/issue?q=is%3Aissue+is%3Aopen+label%3Amodules">open issue</a>
+  filed. (If the issue is not on the <code>Go1.15</code> milestone, please let us
+  know why it prevents you from migrating so that we can prioritize it
+  appropriately.)
+</p>
+
+<h2 id="language">Changes to the language</h2>
+
+<p>
+  Per the <a href="https://github.com/golang/proposal/blob/master/design/6977-overlapping-interfaces.md">overlapping interfaces proposal</a>,
+  Go 1.14 now permits embedding of interfaces with overlapping method sets:
+  methods from an embedded interface may have the same names and identical signatures
+  as methods already present in the (embedding) interface. This solves problems that typically
+  (but not exclusively) occur with diamond-shaped embedding graphs.
+  Explicitly declared methods in an interface must remain
+  <a href="https://tip.golang.org/ref/spec#Uniqueness_of_identifiers">unique</a>, as before.
+</p>
+
+<h2 id="ports">Ports</h2>
+
+<h3 id="darwin">Darwin</h3>
+
+<p>
+  Go 1.14 is the last release that will run on macOS 10.11 El Capitan.
+  Go 1.15 will require macOS 10.12 Sierra or later.
+</p>
+
+<p><!-- golang.org/issue/34749 -->
+  Go 1.14 is the last Go release to support 32-bit binaries on
+  macOS (the <code>darwin/386</code> port). They are no longer
+  supported by macOS, starting with macOS 10.15 (Catalina).
+  Go continues to support the 64-bit <code>darwin/amd64</code> port.
+</p>
+
+<p><!-- golang.org/issue/34751 -->
+  Go 1.14 will likely be the last Go release to support 32-bit
+  binaries on iOS, iPadOS, watchOS, and tvOS
+  (the <code>darwin/arm</code> port). Go continues to support the
+  64-bit <code>darwin/arm64</code> port.
+</p>
+
+<h3 id="windows">Windows</h3>
+
+<p><!-- CL 203601 -->
+  Go binaries on Windows now
+  have <a href="https://docs.microsoft.com/en-us/windows/win32/memory/data-execution-prevention">DEP
+  (Data Execution Prevention)</a> enabled.
+</p>
+
+<p><!-- CL 202439 -->
+  On Windows, creating a file
+  via <a href="/pkg/os#CreateFile"><code>os.OpenFile</code></a> with
+  the <a href="/pkg/os/#O_CREATE"><code>os.O_CREATE</code></a> flag, or
+  via <a href="/pkg/syscall#Open"><code>syscall.Open</code></a> with
+  the <a href="/pkg/syscall#O_CREAT"><code>syscall.O_CREAT</code></a>
+  flag, will now create the file as read-only if the
+  bit <code>0o200</code> (owner write permission) is not set in the
+  permission argument. This makes the behavior on Windows more like
+  that on Unix systems.
+</p>
+
+<h3 id="wasm">WebAssembly</h3>
+
+<p><!-- CL 203600 -->
+  JavaScript values referenced from Go via <code>js.Value</code>
+  objects can now be garbage collected.
+</p>
+
+<p><!-- CL 203600 -->
+  <code>js.Value</code> values can no longer be compared using
+  the <code>==</code> operator, and instead must be compared using
+  their <code>Equal</code> method.
+</p>
+
+<p><!-- CL 203600 -->
+  <code>js.Value</code> now
+  has <code>IsUndefined</code>, <code>IsNull</code>,
+  and <code>IsNaN</code> methods.
+</p>
+
+<h3 id="riscv">RISC-V</h3>
+
+<p><!-- Issue 27532 -->
+  Go 1.14 contains experimental support for 64-bit RISC-V on Linux
+  (<code>GOOS=linux</code>, <code>GOARCH=riscv64</code>). Be aware
+  that performance, assembly syntax stability, and possibly
+  correctness are a work in progress.
+</p>
+
+<h3 id="freebsd">FreeBSD</h3>
+
+<p><!-- CL 199919 -->
+  Go now supports the 64-bit ARM architecture on FreeBSD 12.0 or later (the
+  <code>freebsd/arm64</code> port).
+</p>
+
+<h3 id="nacl">Native Client (NaCl)</h3>
+
+<p><!-- golang.org/issue/30439 -->
+  As <a href="go1.13#ports">announced</a> in the Go 1.13 release notes,
+  Go 1.14 drops support for the Native Client platform (<code>GOOS=nacl</code>).
+</p>
+
+<h3 id="illumos">Illumos</h3>
+
+<p><!-- CL 203758 -->
+  The runtime now respects zone CPU caps
+  (the <code>zone.cpu-cap</code> resource control)
+  for <code>runtime.NumCPU</code> and the default value
+  of <code>GOMAXPROCS</code>.
+</p>
+
+<h2 id="tools">Tools</h2>
+
+<h3 id="go-command">Go command</h3>
+
+<h4 id="vendor">Vendoring</h4>
+<!-- golang.org/issue/33848 -->
+
+<p>
+  When the main module contains a top-level <code>vendor</code> directory and
+  its <code>go.mod</code> file specifies <code>go</code> <code>1.14</code> or
+  higher, the <code>go</code> command now defaults to <code>-mod=vendor</code>
+  for operations that accept that flag. A new value for that flag,
+  <code>-mod=mod</code>, causes the <code>go</code> command to instead load
+  modules from the module cache (as when no <code>vendor</code> directory is
+  present).
+</p>
+
+<p>
+  When <code>-mod=vendor</code> is set (explicitly or by default), the
+  <code>go</code> command now verifies that the main module's
+  <code>vendor/modules.txt</code> file is consistent with its
+  <code>go.mod</code> file.
+</p>
+
+<p>
+  <code>go</code> <code>list</code> <code>-m</code> no longer silently omits
+  transitive dependencies that do not provide packages in
+  the <code>vendor</code> directory. It now fails explicitly if
+  <code>-mod=vendor</code> is set and information is requested for a module not
+  mentioned in <code>vendor/modules.txt</code>.
+</p>
+
+<h4 id="go-flags">Flags</h4>
+
+<p><!-- golang.org/issue/32502, golang.org/issue/30345 -->
+  The <code>go</code> <code>get</code> command no longer accepts
+  the <code>-mod</code> flag. Previously, the flag's setting either
+  <a href="https://golang.org/issue/30345">was ignored</a> or
+  <a href="https://golang.org/issue/32502">caused the build to fail</a>.
+</p>
+
+<p><!-- golang.org/issue/33326 -->
+  <code>-mod=readonly</code> is now set by default when the <code>go.mod</code>
+  file is read-only and no top-level <code>vendor</code> directory is present.
+</p>
+
+<p><!-- golang.org/issue/31481 -->
+  <code>-modcacherw</code> is a new flag that instructs the <code>go</code>
+  command to leave newly-created directories in the module cache at their
+  default permissions rather than making them read-only.
+  The use of this flag makes it more likely that tests or other tools will
+  accidentally add files not included in the module's verified checksum.
+  However, it allows the use of <code>rm</code> <code>-rf</code>
+  (instead of <code>go</code> <code>clean</code> <code>-modcache</code>)
+  to remove the module cache.
+</p>
+
+<p><!-- golang.org/issue/34506 -->
+  <code>-modfile=file</code> is a new flag that instructs the <code>go</code>
+  command to read (and possibly write) an alternate <code>go.mod</code> file
+  instead of the one in the module root directory. A file
+  named <code>go.mod</code> must still be present in order to determine the
+  module root directory, but it is not accessed. When <code>-modfile</code> is
+  specified, an alternate <code>go.sum</code> file is also used: its path is
+  derived from the <code>-modfile</code> flag by trimming the <code>.mod</code>
+  extension and appending <code>.sum</code>.
+</p>
+
+<h4 id="go-env-vars">Environment variables</h4>
+
+<p><!-- golang.org/issue/32966 -->
+  <code>GOINSECURE</code> is a new environment variable that instructs
+  the <code>go</code> command to not require an HTTPS connection, and to skip
+  certificate validation, when fetching certain modules directly from their
+  origins. Like the existing <code>GOPRIVATE</code> variable, the value
+  of <code>GOINSECURE</code> is a comma-separated list of glob patterns.
+</p>
+
+<h4 id="commands-outside-modules">Commands outside modules</h4>
+
+<p><!-- golang.org/issue/32027 -->
+  When module-aware mode is enabled explicitly (by setting
+  <code>GO111MODULE=on</code>), most module commands have more
+  limited functionality if no <code>go.mod</code> file is present. For
+  example, <code>go</code> <code>build</code>,
+  <code>go</code> <code>run</code>, and other build commands can only build
+  packages in the standard library and packages specified as <code>.go</code>
+  files on the command line.
+</p>
+
+<p>
+  Previously, the <code>go</code> command would resolve each package path
+  to the latest version of a module but would not record the module path
+  or version. This resulted in <a href="https://golang.org/issue/32027">slow,
+  non-reproducible builds</a>.
+</p>
+
+<p>
+  <code>go</code> <code>get</code> continues to work as before, as do
+  <code>go</code> <code>mod</code> <code>download</code> and
+  <code>go</code> <code>list</code> <code>-m</code> with explicit versions.
+</p>
+
+<h4 id="incompatible-versions"><code>+incompatible</code> versions</h4>
+<!-- golang.org/issue/34165 -->
+
+<p>
+  If the latest version of a module contains a <code>go.mod</code> file,
+  <code>go</code> <code>get</code> will no longer upgrade to an
+  <a href="/cmd/go/#hdr-Module_compatibility_and_semantic_versioning">incompatible</a>
+  major version of that module unless such a version is requested explicitly
+  or is already required.
+  <code>go</code> <code>list</code> also omits incompatible major versions
+  for such a module when fetching directly from version control, but may
+  include them if reported by a proxy.
+</p>
+
+
+<h4 id="go.mod"><code>go.mod</code> file maintenance</h4>
+<!-- golang.org/issue/34822 -->
+
+<p>
+  <code>go</code> commands other than
+  <code>go</code> <code>mod</code> <code>tidy</code> no longer
+  remove a <code>require</code> directive that specifies a version of an indirect dependency
+  that is already implied by other (transitive) dependencies of the main
+  module.
+</p>
+
+<p>
+  <code>go</code> commands other than
+  <code>go</code> <code>mod</code> <code>tidy</code> no longer
+  edit the <code>go.mod</code> file if the changes are only cosmetic.
+</p>
+
+<p>
+  When <code>-mod=readonly</code> is set, <code>go</code> commands will no
+  longer fail due to a missing <code>go</code> directive or an erroneous
+  <code>//&nbsp;indirect</code> comment.
+</p>
+
+<h4 id="module-downloading">Module downloading</h4>
+
+<p><!-- golang.org/issue/26092 -->
+  The <code>go</code> command now supports Subversion repositories in module mode.
+</p>
+
+<p><!-- golang.org/issue/30748 -->
+  The <code>go</code> command now includes snippets of plain-text error messages
+  from module proxies and other HTTP servers.
+  An error message will only be shown if it is valid UTF-8 and consists of only
+  graphic characters and spaces.
+</p>
+
+<h4 id="go-test">Testing</h4>
+
+<p><!-- golang.org/issue/24929 -->
+  <code>go test -v</code> now streams <code>t.Log</code> output as it happens,
+  rather than at the end of all tests.
+</p>
+
+<h2 id="runtime">Runtime</h2>
+
+<p><!-- CL 190098 -->
+  This release improves the performance of most uses
+  of <code>defer</code> to incur almost zero overhead compared to
+  calling the deferred function directly.
+  As a result, <code>defer</code> can now be used in
+  performance-critical code without overhead concerns.
+</p>
+
+<p><!-- CL 201760, CL 201762 and many others -->
+  Goroutines are now asynchronously preemptible.
+  As a result, loops without function calls no longer potentially
+  deadlock the scheduler or significantly delay garbage collection.
+  This is supported on all platforms except <code>windows/arm</code>,
+  <code>darwin/arm</code>, <code>js/wasm</code>, and
+  <code>plan9/*</code>.
+</p>
+
+<p>
+  A consequence of the implementation of preemption is that on Unix
+  systems, including Linux and macOS systems, programs built with Go
+  1.14 will receive more signals than programs built with earlier
+  releases.
+  This means that programs that use packages
+  like <a href="/pkg/syscall/"><code>syscall</code></a>
+  or <a href="https://godoc.org/golang.org/x/sys/unix"><code>golang.org/x/sys/unix</code></a>
+  will see more slow system calls fail with <code>EINTR</code> errors.
+  Those programs will have to handle those errors in some way, most
+  likely looping to try the system call again.  For more
+  information about this
+  see <a href="http://man7.org/linux/man-pages/man7/signal.7.html"><code>man
+  7 signal</code></a> for Linux systems or similar documentation for
+  other systems.
+</p>
+
+<p><!-- CL 201765, CL 195701 and many others -->
+  The page allocator is more efficient and incurs significantly less
+  lock contention at high values of <code>GOMAXPROCS</code>.
+  This is most noticeable as lower latency and higher throughput for
+  large allocations being done in parallel and at a high rate.
+</p>
+
+<p><!-- CL 171844 and many others -->
+  Internal timers, used by
+  <a href="/pkg/time/#After"><code>time.After</code></a>,
+  <a href="/pkg/time/#Tick"><code>time.Tick</code></a>,
+  <a href="/pkg/net/#Conn"><code>net.Conn.SetDeadline</code></a>,
+  and friends, are more efficient, with less lock contention and fewer
+  context switches.
+  This is a performance improvement that should not cause any user
+  visible changes.
+</p>
+
+<h2 id="compiler">Compiler</h2>
+
+<p><!-- CL 162237 -->
+  This release adds <code>-d=checkptr</code> as a compile-time option
+  for adding instrumentation to check that Go code is following
+  <code>unsafe.Pointer</code> safety rules dynamically.
+  This option is enabled by default (except on Windows) with
+  the <code>-race</code> or <code>-msan</code> flags, and can be
+  disabled with <code>-gcflags=all=-d=checkptr=0</code>.
+  Specifically, <code>-d=checkptr</code> checks the following:
+</p>
+
+<ol>
+  <li>
+    When converting <code>unsafe.Pointer</code> to <code>*T</code>,
+    the resulting pointer must be aligned appropriately
+    for <code>T</code>.
+  </li>
+  <li>
+    If the result of pointer arithmetic points into a Go heap object,
+    one of the <code>unsafe.Pointer</code>-typed operands must point
+    into the same object.
+  </li>
+</ol>
+
+<p>
+  Using <code>-d=checkptr</code> is not currently recommended on
+  Windows because it causes false alerts in the standard library.
+</p>
+
+<p><!-- CL 204338 -->
+  The compiler can now emit machine-readable logs of key optimizations
+  using the <code>-json</code> flag, including inlining, escape
+  analysis, bounds-check elimination, and nil-check elimination.
+</p>
+
+<p><!-- CL 196959 -->
+  Detailed escape analysis diagnostics (<code>-m=2</code>) now work again.
+  This had been dropped from the new escape analysis implementation in
+  the previous release.
+</p>
+
+<p><!-- CL 196217 -->
+  All Go symbols in macOS binaries now begin with an underscore,
+  following platform conventions.
+</p>
+
+<p><!-- CL 202117 -->
+  This release includes experimental support for compiler-inserted
+  coverage instrumentation for fuzzing.
+  See <a href="https://golang.org/issue/14565">issue 14565</a> for more
+  details.
+  This API may change in future releases.
+</p>
+
+<p><!-- CL 174704 --><!-- CL 196784 -->
+  Bounds check elimination now uses information from slice creation and can
+  eliminate checks for indexes with types smaller than <code>int</code>.
+</p>
+
+<h2 id="library">Core library</h2>
+
+<h3 id="hash/maphash">New byte sequence hashing package</h3>
+
+<p> <!-- golang.org/issue/28322, CL 186877 -->
+  Go 1.14 includes a new package,
+  <a href="/pkg/hash/maphash/"><code>hash/maphash</code></a>,
+  which provides hash functions on byte sequences.
+  These hash functions are intended to be used to implement hash tables or
+  other data structures that need to map arbitrary strings or byte
+  sequences to a uniform distribution on unsigned 64-bit integers.
+</p>
+<p>
+  The hash functions are collision-resistant but not cryptographically secure.
+</p>
+<p>
+  The hash value of a given byte sequence is consistent within a
+  single process, but will be different in different processes.
+</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="crypto/tls"><dt><a href="/pkg/crypto/tls/">crypto/tls</a></dt>
+  <dd>
+    <p><!-- CL 191976 -->
+      Support for SSL version 3.0 (SSLv3) has been removed. Note that SSLv3 is the
+      <a href="https://tools.ietf.org/html/rfc7568">cryptographically broken</a>
+      protocol predating TLS.
+    </p>
+
+    <p><!-- CL 191999 -->
+      TLS 1.3 can't be disabled via the <code>GODEBUG</code> environment
+      variable anymore. Use the
+      <a href="/pkg/crypto/tls/#Config.MaxVersion"><code>Config.MaxVersion</code></a>
+      field to configure TLS versions.
+    </p>
+
+    <p><!-- CL 205059 -->
+      When multiple certificate chains are provided through the
+      <a href="/pkg/crypto/tls/#Config.Certificates"><code>Config.Certificates</code></a>
+      field, the first one compatible with the peer is now automatically
+      selected. This allows for example providing an ECDSA and an RSA
+      certificate, and letting the package automatically select the best one.
+      Note that the performance of this selection is going to be poor unless the
+      <a href="/pkg/crypto/tls/#Certificate.Leaf"><code>Certificate.Leaf</code></a>
+      field is set. The
+      <a href="/pkg/crypto/tls/#Config.NameToCertificate"><code>Config.NameToCertificate</code></a>
+      field, which only supports associating a single certificate with
+      a give name, is now deprecated and should be left as <code>nil</code>.
+      Similarly the
+      <a href="/pkg/crypto/tls/#Config.BuildNameToCertificate"><code>Config.BuildNameToCertificate</code></a>
+      method, which builds the <code>NameToCertificate</code> field
+      from the leaf certificates, is now deprecated and should not be
+      called.
+    </p>
+
+    <p><!-- CL 175517 -->
+      The new <a href="/pkg/crypto/tls/#CipherSuites"><code>CipherSuites</code></a>
+      and <a href="/pkg/crypto/tls/#InsecureCipherSuites"><code>InsecureCipherSuites</code></a>
+      functions return a list of currently implemented cipher suites.
+      The new <a href="/pkg/crypto/tls/#CipherSuiteName"><code>CipherSuiteName</code></a>
+      function returns a name for a cipher suite ID.
+    </p>
+
+    <p><!-- CL 205058, 205057 -->
+      The new <a href="/pkg/crypto/tls/#ClientHelloInfo.SupportsCertificate">
+      <code>(*ClientHelloInfo).SupportsCertificate</code></a> and
+      <a href="/pkg/crypto/tls/#CertificateRequestInfo.SupportsCertificate">
+      <code>(*CertificateRequestInfo).SupportsCertificate</code></a>
+      methods expose whether a peer supports a certain certificate.
+    </p>
+
+    <p><!-- CL 174329 -->
+      The <code>tls</code> package no longer supports the legacy Next Protocol
+      Negotiation (NPN) extension and now only supports ALPN. In previous
+      releases it supported both. There are no API changes and applications
+      should function identically as before. Most other clients and servers have
+      already removed NPN support in favor of the standardized ALPN.
+    </p>
+
+    <p><!-- CL 205063, 205062 -->
+      RSA-PSS signatures are now used when supported in TLS 1.2 handshakes. This
+      won't affect most applications, but custom
+      <a href="/pkg/crypto/tls/#Certificate.PrivateKey"><code>Certificate.PrivateKey</code></a>
+      implementations that don't support RSA-PSS signatures will need to use the new
+      <a href="/pkg/crypto/tls/#Certificate.SupportedSignatureAlgorithms">
+      <code>Certificate.SupportedSignatureAlgorithms</code></a>
+      field to disable them.
+    </p>
+
+    <p><!-- CL 205059, 205059 -->
+      <a href="/pkg/crypto/tls/#Config.Certificates"><code>Config.Certificates</code></a> and
+      <a href="/pkg/crypto/tls/#Config.GetCertificate"><code>Config.GetCertificate</code></a>
+      can now both be nil if
+      <a href="/pkg/crypto/tls/#Config.GetConfigForClient"><code>Config.GetConfigForClient</code></a>
+      is set. If the callbacks return neither certificates nor an error, the
+      <code>unrecognized_name</code> is now sent.
+    </p>
+
+    <p><!-- CL 205058 -->
+      The new <a href="/pkg/crypto/tls/#CertificateRequestInfo.Version"><code>CertificateRequestInfo.Version</code></a>
+      field provides the TLS version to client certificates callbacks.
+    </p>
+
+    <p><!-- CL 205068 -->
+      The new <code>TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256</code> and
+      <code>TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256</code> constants use
+      the final names for the cipher suites previously referred to as
+      <code>TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305</code> and
+      <code>TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305</code>.
+    </p>
+  </dd>
+</dl><!-- crypto/tls -->
+
+<dl id="crypto/x509"><dt><a href="/pkg/crypto/x509/">crypto/x509</a></dt>
+  <dd>
+    <p><!-- CL 204046 -->
+      <a href="/pkg/crypto/x509/#Certificate.CreateCRL"><code>Certificate.CreateCRL</code></a>
+      now supports Ed25519 issuers.
+    </p>
+  </dd>
+</dl>
+
+<dl id="debug/dwarf"><dt><a href="/pkg/debug/dwarf/">debug/dwarf</a></dt>
+  <dd>
+    <p><!-- CL 175138 -->
+      The <code>debug/dwarf</code> package now supports reading DWARF
+      version 5.
+    </p>
+    <p>
+      The new
+      method <a href="/pkg/debug/dwarf/#Data.AddSection"><code>(*Data).AddSection</code></a>
+      supports adding arbitrary new DWARF sections from the input file
+      to the DWARF <code>Data</code>.
+    </p>
+
+    <p><!-- CL 192698 -->
+      The new
+      method <a href="/pkg/debug/dwarf/#Reader.ByteOrder"><code>(*Reader).ByteOrder</code></a>
+      returns the byte order of the current compilation unit.
+      This may be used to interpret attributes that are encoded in the
+      native ordering, such as location descriptions.
+    </p>
+
+    <p><!-- CL 192699 -->
+      The new
+      method <a href="/pkg/debug/dwarf/#LineReader.Files"><code>(*LineReader).Files</code></a>
+      returns the file name table from a line reader.
+      This may be used to interpret the value of DWARF attributes such
+      as <code>AttrDeclFile</code>.
+    </p>
+  </dd>
+</dl><!-- debug/dwarf -->
+
+<dl id="encoding/asn1"><dt><a href="/pkg/encoding/asn1/">encoding/asn1</a></dt>
+  <dd>
+    <p><!-- CL 126624 -->
+      <a href="/pkg/encoding/asn1/#Unmarshal"><code>Unmarshal</code></a>
+      now supports ASN.1 string type BMPString, represented by the new
+      <a href="/pkg/encoding/asn1/#TagBMPString"><code>TagBMPString</code></a>
+      constant.
+    </p>
+  </dd>
+</dl><!-- encoding/asn1 -->
+
+<dl id="encoding/json"><dt><a href="/pkg/encoding/json/">encoding/json</a></dt>
+  <dd>
+    <p><!-- CL 200677 -->
+      The <a href="/pkg/encoding/json/#Decoder"><code>Decoder</code></a>
+      type supports a new
+      method <a href="/pkg/encoding/json/#Decoder.InputOffset"><code>InputOffset</code></a>
+      that returns the input stream byte offset of the current
+      decoder position.
+    </p>
+
+    <p><!-- CL 200217 -->
+      <a href="/pkg/encoding/json/#Compact"><code>Compact</code></a> no longer
+      escapes the <code>U+2028</code> and <code>U+2029</code> characters, which
+      was never a documented feature. For proper escaping, see <a
+      href="/pkg/encoding/json/#HTMLEscape"><code>HTMLEscape</code></a>.
+    </p>
+
+    <p><!-- CL 195045 -->
+      <a href="/pkg/encoding/json/#Number"><code>Number</code></a> no longer
+      accepts invalid numbers, to follow the documented behavior more closely.
+      If a program needs to accept invalid numbers like the empty string,
+      consider wrapping the type with <a href="/pkg/encoding/json/#Unmarshaler"><code>Unmarshaler</code></a>.
+    </p>
+
+    <p><!-- CL 200237 -->
+      <a href="/pkg/encoding/json/#Unmarshal"><code>Unmarshal</code></a>
+      can now support map keys with string underlying type which implement
+      <a href="/pkg/encoding/#TextUnmarshaler"><code>encoding.TextUnmarshaler</code></a>.
+    </p>
+  </dd>
+</dl><!-- encoding/json -->
+
+<dl id="go/build"><dt><a href="/pkg/go/build/">go/build</a></dt>
+  <dd>
+    <p><!-- CL 203820, 211657 -->
+      The <a href="/pkg/go/build/#Context"><code>Context</code></a>
+      type has a new field <code>Dir</code> which may be used to set
+      the working directory for the build.
+      The default is the current directory of the running process.
+      In module mode, this is used to locate the main module.
+    </p>
+  </dd>
+</dl><!-- go/build -->
+
+<dl id="go/doc"><dt><a href="/pkg/go/doc/">go/doc</a></dt>
+  <dd>
+    <p><!-- CL 204830 -->
+      The new
+      function <a href="/pkg/go/doc/#NewFromFiles"><code>NewFromFiles</code></a>
+      computes package documentation from a list
+      of <code>*ast.File</code>'s and associates examples with the
+      appropriate package elements.
+      The new information is available in a new <code>Examples</code>
+      field
+      in the <a href="/pkg/go/doc/#Package"><code>Package</code></a>, <a href="/pkg/go/doc/#Type"><code>Type</code></a>,
+      and <a href="/pkg/go/doc/#Func"><code>Func</code></a> types, and a
+      new <a href="/pkg/go/doc/#Example.Suffix"><code>Suffix</code></a>
+      field in
+      the <a href="/pkg/go/doc/#Example"><code>Example</code></a>
+      type.
+    </p>
+  </dd>
+</dl><!-- go/doc -->
+
+<dl id="io/ioutil"><dt><a href="/pkg/io/ioutil/">io/ioutil</a></dt>
+  <dd>
+    <p><!-- CL 198488 -->
+      <a href="/pkg/io/ioutil/#TempDir"><code>TempDir</code></a> can now create directories
+      whose names have predictable prefixes and suffixes.
+      As with <a href="/pkg/io/ioutil/#TempFile"><code>TempFile</code></a>, if the pattern
+      contains a '*', the random string replaces the last '*'.
+    </p>
+  </dd>
+</dl>
+
+<dl id="log"><dt><a href="/pkg/log/">log</a></dt>
+  <dd>
+    <p><!-- CL 186182 -->
+      The
+      new <a href="https://tip.golang.org/pkg/log/#pkg-constants"><code>Lmsgprefix</code></a>
+      flag may be used to tell the logging functions to emit the
+      optional output prefix immediately before the log message rather
+      than at the start of the line.
+    </p>
+  </dd>
+</dl><!-- log -->
+
+<dl id="math"><dt><a href="/pkg/math/">math</a></dt>
+  <dd>
+    <p><!-- CL 127458 -->
+      The new <a href="/pkg/math/#FMA"><code>FMA</code></a> function
+      computes <code>x*y+z</code> in floating point with no
+      intermediate rounding of the <code>x*y</code>
+      computation. Several architectures implement this computation
+      using dedicated hardware instructions for additional performance.
+    </p>
+  </dd>
+</dl><!-- math -->
+
+<dl id="math/big"><dt><a href="/pkg/math/big/">math/big</a></dt>
+  <dd>
+    <p><!-- CL 164972 -->
+      The <a href="/pkg/math/big/#Int.GCD"><code>GCD</code></a> method
+      now allows the inputs <code>a</code> and <code>b</code> to be
+      zero or negative.
+    </p>
+  </dd>
+</dl><!-- math/big -->
+
+<dl id="math/bits"><dt><a href="/pkg/math/bits/">math/bits</a></dt>
+  <dd>
+    <p><!-- CL 197838 -->
+      The new functions
+      <a href="/pkg/math/bits/#Rem"><code>Rem</code></a>,
+      <a href="/pkg/math/bits/#Rem32"><code>Rem32</code></a>, and
+      <a href="/pkg/math/bits/#Rem64"><code>Rem64</code></a>
+      support computing a remainder even when the quotient overflows.
+    </p>
+  </dd>
+</dl><!-- math/bits -->
+
+<dl id="mime"><dt><a href="/pkg/mime/">mime</a></dt>
+  <dd>
+    <p><!-- CL 186927 -->
+      The default type of <code>.js</code> and <code>.mjs</code> files
+      is now <code>text/javascript</code> rather
+      than <code>application/javascript</code>.
+      This is in accordance
+      with <a href="https://datatracker.ietf.org/doc/draft-ietf-dispatch-javascript-mjs/">an
+      IETF draft</a> that treats <code>application/javascript</code> as obsolete.
+    </p>
+  </dd>
+</dl><!-- mime -->
+
+<dl id="mime/multipart"><dt><a href="/pkg/mime/multipart/">mime/multipart</a></dt>
+  <dd>
+    <p>
+      The
+      new <a href="/pkg/mime/multipart/#Reader"><code>Reader</code></a>
+      method <a href="/pkg/mime/multipart/#Reader.NextRawPart"><code>NextRawPart</code></a>
+      supports fetching the next MIME part without transparently
+      decoding <code>quoted-printable</code> data.
+    </p>
+  </dd>
+</dl><!-- mime/multipart -->
+
+<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
+  <dd>
+    <p><!-- CL 200760 -->
+      The new <a href="/pkg/net/http/#Header"><code>Header</code></a>
+      method <a href="/pkg/net/http/#Header.Values"><code>Values</code></a>
+      can be used to fetch all values associated with a
+      canonicalized key.
+    </p>
+
+    <p><!-- CL 61291 -->
+      The
+      new <a href="/pkg/net/http/#Transport"><code>Transport</code></a>
+      field <a href="/pkg/net/http/#Transport.DialTLSContext"><code>DialTLSContext</code></a>
+      can be used to specify an optional dial function for creating
+      TLS connections for non-proxied HTTPS requests.
+      This new field can be used instead
+      of <a href="/pkg/net/http/#Transport.DialTLS"><code>DialTLS</code></a>,
+      which is now considered deprecated; <code>DialTLS</code> will
+      continue to work, but new code should
+      use <code>DialTLSContext</code>, which allows the transport to
+      cancel dials as soon as they are no longer needed.
+    </p>
+
+    <p><!-- CL 192518, CL 194218 -->
+      On Windows, <a href="/pkg/net/http/#ServeFile"><code>ServeFile</code></a> now correctly
+      serves files larger than 2GB.
+    </p>
+  </dd>
+</dl><!-- net/http -->
+
+<dl id="net/http/httptest"><dt><a href="/pkg/net/http/httptest/">net/http/httptest</a></dt>
+  <dd>
+    <p><!-- CL 201557 -->
+      The
+      new <a href="/pkg/net/http/httptest/#Server"><code>Server</code></a>
+      field <a href="/pkg/net/http/httptest/#Server.EnableHTTP2"><code>EnableHTTP2</code></a>
+      supports enabling HTTP/2 on the test server.
+    </p>
+  </dd>
+</dl><!-- net/http/httptest -->
+
+<dl id="net/textproto"><dt><a href="/pkg/net/textproto/">net/textproto</a></dt>
+  <dd>
+    <p><!-- CL 200760 -->
+      The
+      new <a href="/pkg/net/textproto/#MIMEHeader"><code>MIMEHeader</code></a>
+      method <a href="/pkg/net/textproto/#MIMEHeader.Values"><code>Values</code></a>
+      can be used to fetch all values associated with a canonicalized
+      key.
+    </p>
+  </dd>
+</dl><!-- net/textproto -->
+
+<dl id="net/url"><dt><a href="/pkg/net/url/">net/url</a></dt>
+  <dd>
+    <p><!-- CL 185117 -->
+      When parsing of a URL fails
+      (for example by <a href="/pkg/net/url/#Parse"><code>Parse</code></a>
+      or <a href="/pkg/net/url/#ParseRequestURI"><code>ParseRequestURI</code></a>),
+      the resulting <a href="/pkg/net/url/#Error.Error"><code>Error</code></a> message
+      will now quote the unparsable URL.
+      This provides clearer structure and consistency with other parsing errors.
+    </p>
+  </dd>
+</dl><!-- net/url -->
+
+<dl id="os/signal"><dt><a href="/pkg/os/signal/">os/signal</a></dt>
+  <dd>
+    <p><!-- CL 187739 -->
+      On Windows,
+      the <code>CTRL_CLOSE_EVENT</code>, <code>CTRL_LOGOFF_EVENT</code>,
+      and <code>CTRL_SHUTDOWN_EVENT</code> events now generate
+      a <code>syscall.SIGTERM</code> signal, similar to how Control-C
+      and Control-Break generate a <code>syscall.SIGINT</code> signal.
+    </p>
+  </dd>
+</dl><!-- os/signal -->
+
+<dl id="plugin"><dt><a href="/pkg/plugin/">plugin</a></dt>
+  <dd>
+    <p><!-- CL 191617 -->
+      The <code>plugin</code> package now supports <code>freebsd/amd64</code>.
+    </p>
+  </dd>
+</dl><!-- plugin -->
+
+<dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
+  <dd>
+    <p><!-- CL 85661 -->
+      <a href="/pkg/reflect#StructOf"><code>StructOf</code></a> now
+      supports creating struct types with unexported fields, by
+      setting the <code>PkgPath</code> field in
+      a <code>StructField</code> element.
+    </p>
+  </dd>
+</dl><!-- reflect -->
+
+<dl id="pkg-runtime"><dt><a href="/pkg/runtime/">runtime</a></dt>
+  <dd>
+    <p><!-- CL 200081 -->
+      <code>runtime.Goexit</code> can no longer be aborted by a
+      recursive <code>panic</code>/<code>recover</code>.
+    </p>
+
+    <p><!-- CL 188297, CL 191785 -->
+      On macOS, <code>SIGPIPE</code> is no longer forwarded to signal
+      handlers installed before the Go runtime is initialized.
+      This is necessary because macOS delivers <code>SIGPIPE</code>
+      <a href="https://golang.org/issue/33384">to the main thread</a>
+      rather than the thread writing to the closed pipe.
+    </p>
+  </dd>
+</dl><!-- runtime -->
+
+<dl id="runtime/pprof"><dt><a href="/pkg/runtime/pprof/">runtime/pprof</a></dt>
+  <dd>
+    <p><!-- CL 204636, 205097 -->
+    The generated profile no longer includes the pseudo-PCs used for inline
+    marks. Symbol information of inlined functions is encoded in
+    <a href="https://github.com/google/pprof/blob/5e96527/proto/profile.proto#L177-L184">the format</a>
+    the pprof tool expects. This is a fix for the regression introduced
+    during recent releases.
+    </p>
+  </dd>
+</dl><!-- runtime/pprof -->
+
+<dl id="strconv"><dt><a href="/pkg/strconv/">strconv</a></dt>
+  <dd>
+    <p>
+      The <a href="/pkg/strconv/#NumError"><code>NumError</code></a>
+      type now has
+      an <a href="/pkg/strconv/#NumError.Unwrap"><code>Unwrap</code></a>
+      method that may be used to retrieve the reason that a conversion
+      failed.
+      This supports using <code>NumError</code> values
+      with <a href="/pkg/errors/#Is"><code>errors.Is</code></a> to see
+      if the underlying error
+      is <a href="/pkg/strconv/#pkg-variables"><code>strconv.ErrRange</code></a>
+      or <a href="/pkg/strconv/#pkg-variables"><code>strconv.ErrSyntax</code></a>.
+    </p>
+  </dd>
+</dl><!-- strconv -->
+
+<dl id="sync"><dt><a href="/pkg/sync/">sync</a></dt>
+  <dd>
+    <p><!-- CL 200577 -->
+      Unlocking a highly contended <code>Mutex</code> now directly
+      yields the CPU to the next goroutine waiting for
+      that <code>Mutex</code>. This significantly improves the
+      performance of highly contended mutexes on high CPU count
+      machines.
+    </p>
+  </dd>
+</dl><!-- sync -->
+
+<dl id="testing"><dt><a href="/pkg/testing/">testing</a></dt>
+  <dd>
+    <p><!-- CL 201359 -->
+       The testing package now supports cleanup functions, called after
+       a test or benchmark has finished, by calling
+       <a href="/pkg/testing#T.Cleanup"><code>T.Cleanup</code></a> or
+       <a href="/pkg/testing#B.Cleanup"><code>B.Cleanup</code></a> respectively.
+    </p>
+  </dd>
+</dl><!-- testing -->
+
+<dl id="text/template"><dt><a href="/pkg/text/template/">text/template</a></dt>
+  <dd>
+    <p><!-- CL 206124 -->
+      The text/template package now correctly reports errors when a
+      parenthesized argument is used as a function.
+      This most commonly shows up in erroneous cases like
+      <code>{{if (eq .F "a") or (eq .F "b")}}</code>.
+      This should be written as <code>{{if or (eq .F "a") (eq .F "b")}}</code>.
+      The erroneous case never worked as expected, and will now be
+      reported with an error <code>can't give argument to non-function</code>.
+    </p>
+  </dd>
+</dl><!-- text/template -->
+
+<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 11.0 to
+      <a href="https://www.unicode.org/versions/Unicode12.0.0/">Unicode 12.0</a>,
+      which adds 554 new characters, including four new scripts, and 61 new emoji.
+    </p>
+  </dd>
+</dl><!-- unicode -->
diff --git a/_content/doc/go1.15.html b/_content/doc/go1.15.html
new file mode 100644
index 0000000..c9997c0
--- /dev/null
+++ b/_content/doc/go1.15.html
@@ -0,0 +1,1064 @@
+<!--{
+        "Title": "Go 1.15 Release Notes",
+        "Path":  "/doc/go1.15"
+}-->
+
+<!--
+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.15</h2>
+
+<p>
+  The latest Go release, version 1.15, arrives six months after <a href="go1.14">Go 1.14</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>
+  Go 1.15 includes <a href="#linker">substantial improvements to the linker</a>,
+  improves <a href="#runtime">allocation for small objects at high core counts</a>, and
+  deprecates <a href="#commonname">X.509 CommonName</a>.
+  <code>GOPROXY</code> now supports skipping proxies that return errors and
+  a new <a href="#time/tzdata">embedded tzdata package</a> has been added.
+</p>
+
+<h2 id="language">Changes to the language</h2>
+
+<p>
+  There are no changes to the language.
+</p>
+
+<h2 id="ports">Ports</h2>
+
+<h3 id="darwin">Darwin</h3>
+
+<p>
+  As <a href="go1.14#darwin">announced</a> in the Go 1.14 release
+  notes, Go 1.15 requires macOS 10.12 Sierra or later; support for
+  previous versions has been discontinued.
+</p>
+
+<p> <!-- golang.org/issue/37610, golang.org/issue/37611, CL 227582, and CL 227198  -->
+  As <a href="/doc/go1.14#darwin">announced</a> in the Go 1.14 release
+  notes, Go 1.15 drops support for 32-bit binaries on macOS, iOS,
+  iPadOS, watchOS, and tvOS (the <code>darwin/386</code>
+  and <code>darwin/arm</code> ports). Go continues to support the
+  64-bit <code>darwin/amd64</code> and <code>darwin/arm64</code> ports.
+</p>
+
+<h3 id="windows">Windows</h3>
+
+<p> <!-- CL 214397 and CL 230217 -->
+  Go now generates Windows ASLR executables when <code>-buildmode=pie</code>
+  cmd/link flag is provided. Go command uses <code>-buildmode=pie</code>
+  by default on Windows.
+</p>
+
+<p><!-- CL 227003 -->
+  The <code>-race</code> and <code>-msan</code> flags now always
+  enable <code>-d=checkptr</code>, which checks uses
+  of <code>unsafe.Pointer</code>. This was previously the case on all
+  OSes except Windows.
+</p>
+
+<p><!-- CL 211139 -->
+  Go-built DLLs no longer cause the process to exit when it receives a
+  signal (such as Ctrl-C at a terminal).
+</p>
+
+<h3 id="android">Android</h3>
+
+<p> <!-- CL 235017, golang.org/issue/38838 -->
+  When linking binaries for Android, Go 1.15 explicitly selects
+  the <code>lld</code> linker available in recent versions of the NDK.
+  The <code>lld</code> linker avoids crashes on some devices, and is
+  planned to become the default NDK linker in a future NDK version.
+</p>
+
+<h3 id="openbsd">OpenBSD</h3>
+
+<p><!-- CL 234381 -->
+  Go 1.15 adds support for OpenBSD 6.7 on <code>GOARCH=arm</code>
+  and <code>GOARCH=arm64</code>. Previous versions of Go already
+  supported OpenBSD 6.7 on <code>GOARCH=386</code>
+  and <code>GOARCH=amd64</code>.
+</p>
+
+<h3 id="riscv">RISC-V</h3>
+
+<p> <!-- CL 226400, CL 226206, and others -->
+  There has been progress in improving the stability and performance
+  of the 64-bit RISC-V port on Linux (<code>GOOS=linux</code>,
+  <code>GOARCH=riscv64</code>). It also now supports asynchronous
+  preemption.
+</p>
+
+<h3 id="386">386</h3>
+
+<p><!-- golang.org/issue/40255 -->
+  Go 1.15 is the last release to support x87-only floating-point
+  hardware (<code>GO386=387</code>). Future releases will require at
+  least SSE2 support on 386, raising Go's
+  minimum <code>GOARCH=386</code> requirement to the Intel Pentium 4
+  (released in 2000) or AMD Opteron/Athlon 64 (released in 2003).
+</p>
+
+<h2 id="tools">Tools</h2>
+
+<h3 id="go-command">Go command</h3>
+
+<p><!-- golang.org/issue/37367 -->
+  The <code>GOPROXY</code> environment variable now supports skipping proxies
+  that return errors. Proxy URLs may now be separated with either commas
+  (<code>,</code>) or pipe characters (<code>|</code>). If a proxy URL is
+  followed by a comma, the <code>go</code> command will only try the next proxy
+  in the list after a 404 or 410 HTTP response. If a proxy URL is followed by a
+  pipe character, the <code>go</code> command will try the next proxy in the
+  list after any error. Note that the default value of <code>GOPROXY</code>
+  remains <code>https://proxy.golang.org,direct</code>, which does not fall
+  back to <code>direct</code> in case of errors.
+</p>
+
+<h4 id="go-test"><code>go</code> <code>test</code></h4>
+
+<p><!-- https://golang.org/issue/36134 -->
+  Changing the <code>-timeout</code> flag now invalidates cached test results. A
+  cached result for a test run with a long timeout will no longer count as
+  passing when <code>go</code> <code>test</code> is re-invoked with a short one.
+</p>
+
+<h4 id="go-flag-parsing">Flag parsing</h4>
+
+<p><!-- https://golang.org/cl/211358 -->
+  Various flag parsing issues in <code>go</code> <code>test</code> and
+  <code>go</code> <code>vet</code> have been fixed. Notably, flags specified
+  in <code>GOFLAGS</code> are handled more consistently, and
+  the <code>-outputdir</code> flag now interprets relative paths relative to the
+  working directory of the <code>go</code> command (rather than the working
+  directory of each individual test).
+</p>
+
+<h4 id="module-cache">Module cache</h4>
+
+<p><!-- https://golang.org/cl/219538 -->
+  The location of the module cache may now be set with
+  the <code>GOMODCACHE</code> environment variable. The default value of
+  <code>GOMODCACHE</code> is <code>GOPATH[0]/pkg/mod</code>, the location of the
+  module cache before this change.
+</p>
+
+<p><!-- https://golang.org/cl/221157 -->
+  A workaround is now available for Windows "Access is denied" errors in
+  <code>go</code> commands that access the module cache, caused by external
+  programs concurrently scanning the file system (see
+  <a href="https://golang.org/issue/36568">issue #36568</a>). The workaround is
+  not enabled by default because it is not safe to use when Go versions lower
+  than 1.14.2 and 1.13.10 are running concurrently with the same module cache.
+  It can be enabled by explicitly setting the environment variable
+  <code>GODEBUG=modcacheunzipinplace=1</code>.
+</p>
+
+<h3 id="vet">Vet</h3>
+
+<h4 id="vet-string-int">New warning for string(x)</h4>
+
+<p><!-- CL 212919, 232660 -->
+  The vet tool now warns about conversions of the
+  form <code>string(x)</code> where <code>x</code> has an integer type
+  other than <code>rune</code> or <code>byte</code>.
+  Experience with Go has shown that many conversions of this form
+  erroneously assume that <code>string(x)</code> evaluates to the
+  string representation of the integer <code>x</code>.
+  It actually evaluates to a string containing the UTF-8 encoding of
+  the value of <code>x</code>.
+  For example, <code>string(9786)</code> does not evaluate to the
+  string <code>"9786"</code>; it evaluates to the
+  string <code>"\xe2\x98\xba"</code>, or <code>"☺"</code>.
+</p>
+
+<p>
+  Code that is using <code>string(x)</code> correctly can be rewritten
+  to <code>string(rune(x))</code>.
+  Or, in some cases, calling <code>utf8.EncodeRune(buf, x)</code> with
+  a suitable byte slice <code>buf</code> may be the right solution.
+  Other code should most likely use <code>strconv.Itoa</code>
+  or <code>fmt.Sprint</code>.
+</p>
+
+<p>
+  This new vet check is enabled by default when
+  using <code>go</code> <code>test</code>.
+</p>
+
+<p>
+  We are considering prohibiting the conversion in a future release of Go.
+  That is, the language would change to only
+  permit <code>string(x)</code> for integer <code>x</code> when the
+  type of <code>x</code> is <code>rune</code> or <code>byte</code>.
+  Such a language change would not be backward compatible.
+  We are using this vet check as a first trial step toward changing
+  the language.
+</p>
+
+<h4 id="vet-impossible-interface">New warning for impossible interface conversions</h4>
+
+<p><!-- CL 218779, 232660 -->
+  The vet tool now warns about type assertions from one interface type
+  to another interface type when the type assertion will always fail.
+  This will happen if both interface types implement a method with the
+  same name but with a different type signature.
+</p>
+
+<p>
+  There is no reason to write a type assertion that always fails, so
+  any code that triggers this vet check should be rewritten.
+</p>
+
+<p>
+  This new vet check is enabled by default when
+  using <code>go</code> <code>test</code>.
+</p>
+
+<p>
+  We are considering prohibiting impossible interface type assertions
+  in a future release of Go.
+  Such a language change would not be backward compatible.
+  We are using this vet check as a first trial step toward changing
+  the language.
+</p>
+
+<h2 id="runtime">Runtime</h2>
+
+<p><!-- CL 221779 -->
+  If <code>panic</code> is invoked with a value whose type is derived from any
+  of: <code>bool</code>, <code>complex64</code>, <code>complex128</code>, <code>float32</code>, <code>float64</code>,
+  <code>int</code>, <code>int8</code>, <code>int16</code>, <code>int32</code>, <code>int64</code>, <code>string</code>,
+  <code>uint</code>, <code>uint8</code>, <code>uint16</code>, <code>uint32</code>, <code>uint64</code>, <code>uintptr</code>,
+  then the value will be printed, instead of just its address.
+  Previously, this was only true for values of exactly these types.
+</p>
+
+<p><!-- CL 228900 -->
+  On a Unix system, if the <code>kill</code> command
+  or <code>kill</code> system call is used to send
+  a <code>SIGSEGV</code>, <code>SIGBUS</code>,
+  or <code>SIGFPE</code> signal to a Go program, and if the signal
+  is not being handled via
+  <a href="/pkg/os/signal/#Notify"><code>os/signal.Notify</code></a>,
+  the Go program will now reliably crash with a stack trace.
+  In earlier releases the behavior was unpredictable.
+</p>
+
+<p><!-- CL 221182, CL 229998 -->
+  Allocation of small objects now performs much better at high core
+  counts, and has lower worst-case latency.
+</p>
+
+<p><!-- CL 216401 -->
+  Converting a small integer value into an interface value no longer
+  causes allocation.
+</p>
+
+<p><!-- CL 216818 -->
+  Non-blocking receives on closed channels now perform as well as
+  non-blocking receives on open channels.
+</p>
+
+<h2 id="compiler">Compiler</h2>
+
+<p><!-- CL 229578 -->
+  Package <code>unsafe</code>'s <a href="/pkg/unsafe/#Pointer">safety
+  rules</a> allow converting an <code>unsafe.Pointer</code>
+  into <code>uintptr</code> when calling certain
+  functions. Previously, in some cases, the compiler allowed multiple
+  chained conversions (for example, <code>syscall.Syscall(…,</code>
+  <code>uintptr(uintptr(ptr)),</code> <code>…)</code>). The compiler
+  now requires exactly one conversion. Code that used multiple
+  conversions should be updated to satisfy the safety rules.
+</p>
+
+<p><!-- CL 230544, CL 231397 -->
+  Go 1.15 reduces typical binary sizes by around 5% compared to Go
+  1.14 by eliminating certain types of GC metadata and more
+  aggressively eliminating unused type metadata.
+</p>
+
+<p><!-- CL 219357, CL 231600 -->
+  The toolchain now mitigates
+  <a href="https://www.intel.com/content/www/us/en/support/articles/000055650/processors.html">Intel
+  CPU erratum SKX102</a> on <code>GOARCH=amd64</code> by aligning
+  functions to 32 byte boundaries and padding jump instructions. While
+  this padding increases binary sizes, this is more than made up for
+  by the binary size improvements mentioned above.
+</p>
+
+<p><!-- CL 222661 -->
+  Go 1.15 adds a <code>-spectre</code> flag to both the
+  compiler and the assembler, to allow enabling Spectre mitigations.
+  These should almost never be needed and are provided mainly as a
+  “defense in depth” mechanism.
+  See the <a href="https://github.com/golang/go/wiki/Spectre">Spectre wiki page</a> for details.
+</p>
+
+<p><!-- CL 228578 -->
+  The compiler now rejects <code>//go:</code> compiler directives that
+  have no meaning for the declaration they are applied to with a
+  "misplaced compiler directive" error. Such misapplied directives
+  were broken before, but were silently ignored by the compiler.
+</p>
+
+<p><!-- CL 206658, CL 205066 -->
+  The compiler's <code>-json</code> optimization logging now reports
+  large (>= 128 byte) copies and includes explanations of escape
+  analysis decisions.
+</p>
+
+<h2 id="linker">Linker</h2>
+
+<p>
+  This release includes substantial improvements to the Go linker,
+  which reduce linker resource usage (both time and memory) and
+  improve code robustness/maintainability.
+</p>
+
+<p>
+  For a representative set of large Go programs, linking is 20% faster
+  and requires 30% less memory on average, for <code>ELF</code>-based
+  OSes (Linux, FreeBSD, NetBSD, OpenBSD, Dragonfly, and Solaris)
+  running on <code>amd64</code> architectures, with more modest
+  improvements for other architecture/OS combinations.
+</p>
+
+<p>
+  The key contributors to better linker performance are a newly
+  redesigned object file format, and a revamping of internal
+  phases to increase concurrency (for example, applying relocations to
+  symbols in parallel). Object files in Go 1.15 are slightly larger
+  than their 1.14 equivalents.
+</p>
+
+<p>
+  These changes are part of a multi-release project
+  to <a href="https://golang.org/s/better-linker">modernize the Go
+  linker</a>, meaning that there will be additional linker
+  improvements expected in future releases.
+</p>
+
+<p><!-- CL 207877 -->
+  The linker now defaults to internal linking mode
+  for <code>-buildmode=pie</code> on
+  <code>linux/amd64</code> and <code>linux/arm64</code>, so these
+  configurations no longer require a C linker. External linking
+  mode (which was the default in Go 1.14 for
+  <code>-buildmode=pie</code>) can still be requested with
+  <code>-ldflags=-linkmode=external</code> flag.
+</p>
+
+<h2 id="objdump">Objdump</h2>
+
+<p><!-- CL 225459 -->
+  The <a href="/cmd/objdump/">objdump</a> tool now supports
+  disassembling in GNU assembler syntax with the <code>-gnu</code>
+  flag.
+</p>
+
+<h2 id="library">Core library</h2>
+
+<h3 id="time/tzdata">New embedded tzdata package</h3>
+
+<p> <!-- CL 224588 -->
+  Go 1.15 includes a new package,
+  <a href="/pkg/time/tzdata/"><code>time/tzdata</code></a>,
+  that permits embedding the timezone database into a program.
+  Importing this package (as <code>import _ "time/tzdata"</code>)
+  permits the program to find timezone information even if the
+  timezone database is not available on the local system.
+  You can also embed the timezone database by building
+  with <code>-tags timetzdata</code>.
+  Either approach increases the size of the program by about 800 KB.
+</p>
+
+<h3 id="cgo">Cgo</h3>
+
+<p><!-- CL 235817 -->
+  Go 1.15 will translate the C type <code>EGLConfig</code> to the
+  Go type <code>uintptr</code>. This change is similar to how Go
+  1.12 and newer treats <code>EGLDisplay</code>, Darwin's CoreFoundation and
+  Java's JNI types. See the <a href="/cmd/cgo/#hdr-Special_cases">cgo
+  documentation</a> for more information.
+</p>
+
+<p><!-- CL 250940 -->
+  In Go 1.15.3 and later, cgo will not permit Go code to allocate an
+  undefined struct type (a C struct defined as just <code>struct
+  S;</code> or similar) on the stack or heap.
+  Go code will only be permitted to use pointers to those types.
+  Allocating an instance of such a struct and passing a pointer, or a
+  full struct value, to C code was always unsafe and unlikely to work
+  correctly; it is now forbidden.
+  The fix is to either rewrite the Go code to use only pointers, or to
+  ensure that the Go code sees the full definition of the struct by
+  including the appropriate C header file.
+</p>
+
+<h3 id="commonname">X.509 CommonName deprecation</h3>
+
+<p><!-- CL 231379 -->
+  The deprecated, legacy behavior of treating the <code>CommonName</code>
+  field on X.509 certificates as a host name when no Subject Alternative Names
+  are present is now disabled by default. It can be temporarily re-enabled by
+  adding the value <code>x509ignoreCN=0</code> to the <code>GODEBUG</code>
+  environment variable.
+</p>
+
+<p>
+  Note that if the <code>CommonName</code> is an invalid host name, it's always
+  ignored, regardless of <code>GODEBUG</code> settings. Invalid names include
+  those with any characters other than letters, digits, hyphens and underscores,
+  and those with empty labels or trailing dots.
+</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="bufio"><dt><a href="/pkg/bufio/">bufio</a></dt>
+  <dd>
+    <p><!-- CL 225357, CL 225557 -->
+      When a <a href="/pkg/bufio/#Scanner"><code>Scanner</code></a> is
+      used with an invalid
+      <a href="/pkg/io/#Reader"><code>io.Reader</code></a> that
+      incorrectly returns a negative number from <code>Read</code>,
+      the <code>Scanner</code> will no longer panic, but will instead
+      return the new error
+      <a href="/pkg/bufio/#ErrBadReadCount"><code>ErrBadReadCount</code></a>.
+    </p>
+  </dd>
+</dl><!-- bufio -->
+
+<dl id="context"><dt><a href="/pkg/context/">context</a></dt>
+  <dd>
+    <p><!-- CL 223777 -->
+      Creating a derived <code>Context</code> using a nil parent is now explicitly
+      disallowed. Any attempt to do so with the
+      <a href="/pkg/context/#WithValue"><code>WithValue</code></a>,
+      <a href="/pkg/context/#WithDeadline"><code>WithDeadline</code></a>, or
+      <a href="/pkg/context/#WithCancel"><code>WithCancel</code></a> functions
+      will cause a panic.
+    </p>
+  </dd>
+</dl><!-- context -->
+
+<dl id="crypto"><dt><a href="/pkg/crypto/">crypto</a></dt>
+  <dd>
+    <p><!-- CL 231417, CL 225460 -->
+      The <code>PrivateKey</code> and <code>PublicKey</code> types in the
+      <a href="/pkg/crypto/rsa/"><code>crypto/rsa</code></a>,
+      <a href="/pkg/crypto/ecdsa/"><code>crypto/ecdsa</code></a>, and
+      <a href="/pkg/crypto/ed25519/"><code>crypto/ed25519</code></a> packages
+      now have an <code>Equal</code> method to compare keys for equivalence
+      or to make type-safe interfaces for public keys. The method signature
+      is compatible with
+      <a href="https://pkg.go.dev/github.com/google/go-cmp/cmp#Equal"><code>go-cmp</code>'s
+      definition of equality</a>.
+    </p>
+
+    <p><!-- CL 224937 -->
+      <a href="/pkg/crypto/#Hash"><code>Hash</code></a> now implements
+      <a href="/pkg/fmt/#Stringer"><code>fmt.Stringer</code></a>.
+    </p>
+  </dd>
+</dl><!-- crypto -->
+
+<dl id="crypto/ecdsa"><dt><a href="/pkg/crypto/ecdsa/">crypto/ecdsa</a></dt>
+  <dd>
+    <p><!-- CL 217940 -->
+      The new <a href="/pkg/crypto/ecdsa/#SignASN1"><code>SignASN1</code></a>
+      and <a href="/pkg/crypto/ecdsa/#VerifyASN1"><code>VerifyASN1</code></a>
+      functions allow generating and verifying ECDSA signatures in the standard
+      ASN.1 DER encoding.
+    </p>
+  </dd>
+</dl><!-- crypto/ecdsa -->
+
+<dl id="crypto/elliptic"><dt><a href="/pkg/crypto/elliptic/">crypto/elliptic</a></dt>
+  <dd>
+    <p><!-- CL 202819 -->
+      The new <a href="/pkg/crypto/elliptic/#MarshalCompressed"><code>MarshalCompressed</code></a>
+      and <a href="/pkg/crypto/elliptic/#UnmarshalCompressed"><code>UnmarshalCompressed</code></a>
+      functions allow encoding and decoding NIST elliptic curve points in compressed format.
+    </p>
+  </dd>
+</dl><!-- crypto/elliptic -->
+
+<dl id="crypto/rsa"><dt><a href="/pkg/crypto/rsa/">crypto/rsa</a></dt>
+  <dd>
+    <p><!-- CL 226203 -->
+      <a href="/pkg/crypto/rsa/#VerifyPKCS1v15"><code>VerifyPKCS1v15</code></a>
+      now rejects invalid short signatures with missing leading zeroes, according to RFC 8017.
+    </p>
+  </dd>
+</dl><!-- crypto/rsa -->
+
+<dl id="crypto/tls"><dt><a href="/pkg/crypto/tls/">crypto/tls</a></dt>
+  <dd>
+    <p><!-- CL 214977 -->
+      The new
+      <a href="/pkg/crypto/tls/#Dialer"><code>Dialer</code></a>
+      type and its
+      <a href="/pkg/crypto/tls/#Dialer.DialContext"><code>DialContext</code></a>
+      method permit using a context to both connect and handshake with a TLS server.
+    </p>
+
+    <p><!-- CL 229122 -->
+      The new
+      <a href="/pkg/crypto/tls/#Config.VerifyConnection"><code>VerifyConnection</code></a>
+      callback on the <a href="/pkg/crypto/tls/#Config"><code>Config</code></a> type
+      allows custom verification logic for every connection. It has access to the
+      <a href="/pkg/crypto/tls/#ConnectionState"><code>ConnectionState</code></a>
+      which includes peer certificates, SCTs, and stapled OCSP responses.
+    </p>
+
+    <p><!-- CL 230679 -->
+      Auto-generated session ticket keys are now automatically rotated every 24 hours,
+      with a lifetime of 7 days, to limit their impact on forward secrecy.
+    </p>
+
+    <p><!-- CL 231317 -->
+      Session ticket lifetimes in TLS 1.2 and earlier, where the session keys
+      are reused for resumed connections, are now limited to 7 days, also to
+      limit their impact on forward secrecy.
+    </p>
+
+    <p><!-- CL 231038 -->
+      The client-side downgrade protection checks specified in RFC 8446 are now
+      enforced. This has the potential to cause connection errors for clients
+      encountering middleboxes that behave like unauthorized downgrade attacks.
+    </p>
+
+    <p><!-- CL 208226 -->
+      <a href="/pkg/crypto/tls/#SignatureScheme"><code>SignatureScheme</code></a>,
+      <a href="/pkg/crypto/tls/#CurveID"><code>CurveID</code></a>, and
+      <a href="/pkg/crypto/tls/#ClientAuthType"><code>ClientAuthType</code></a>
+      now implement <a href="/pkg/fmt/#Stringer"><code>fmt.Stringer</code></a>.
+    </p>
+
+    <p><!-- CL 236737 -->
+      The <a href="/pkg/crypto/tls/#ConnectionState"><code>ConnectionState</code></a>
+      fields <code>OCSPResponse</code> and <code>SignedCertificateTimestamps</code>
+      are now repopulated on client-side resumed connections.
+    </p>
+
+    <p><!-- CL 227840 -->
+      <a href="/pkg/crypto/tls/#Conn"><code>tls.Conn</code></a>
+      now returns an opaque error on permanently broken connections, wrapping
+      the temporary
+      <a href="/pkg/net/http/#Error"><code>net.Error</code></a>. To access the
+      original <code>net.Error</code>, use
+      <a href="/pkg/errors/#As"><code>errors.As</code></a> (or
+      <a href="/pkg/errors/#Unwrap"><code>errors.Unwrap</code></a>) instead of a
+      type assertion.
+    </p>
+  </dd>
+</dl><!-- crypto/tls -->
+
+<dl id="crypto/x509"><dt><a href="/pkg/crypto/x509/">crypto/x509</a></dt>
+  <dd>
+    <p><!-- CL 231378, CL 231380, CL 231381 -->
+      If either the name on the certificate or the name being verified (with
+      <a href="/pkg/crypto/x509/#VerifyOptions.DNSName"><code>VerifyOptions.DNSName</code></a>
+      or <a href="/pkg/crypto/x509/#Certificate.VerifyHostname"><code>VerifyHostname</code></a>)
+      are invalid, they will now be compared case-insensitively without further
+      processing (without honoring wildcards or stripping trailing dots).
+      Invalid names include those with any characters other than letters,
+      digits, hyphens and underscores, those with empty labels, and names on
+      certificates with trailing dots.
+    </p>
+
+    <p><!-- CL 217298 -->
+      The new <a href="/pkg/crypto/x509/#CreateRevocationList"><code>CreateRevocationList</code></a>
+      function and <a href="/pkg/crypto/x509/#RevocationList"><code>RevocationList</code></a> type
+      allow creating RFC 5280-compliant X.509 v2 Certificate Revocation Lists.
+    </p>
+
+    <p><!-- CL 227098 -->
+      <a href="/pkg/crypto/x509/#CreateCertificate"><code>CreateCertificate</code></a>
+      now automatically generates the <code>SubjectKeyId</code> if the template
+      is a CA and doesn't explicitly specify one.
+    </p>
+
+    <p><!-- CL 228777 -->
+      <a href="/pkg/crypto/x509/#CreateCertificate"><code>CreateCertificate</code></a>
+      now returns an error if the template specifies <code>MaxPathLen</code> but is not a CA.
+    </p>
+
+    <p><!-- CL 205237 -->
+      On Unix systems other than macOS, the <code>SSL_CERT_DIR</code>
+      environment variable can now be a colon-separated list.
+    </p>
+
+    <p><!-- CL 227037 -->
+      On macOS, binaries are now always linked against
+      <code>Security.framework</code> to extract the system trust roots,
+      regardless of whether cgo is available. The resulting behavior should be
+      more consistent with the OS verifier.
+    </p>
+  </dd>
+</dl><!-- crypto/x509 -->
+
+<dl id="crypto/x509/pkix"><dt><a href="/pkg/crypto/x509/pkix/">crypto/x509/pkix</a></dt>
+  <dd>
+    <p><!-- CL 229864, CL 240543 -->
+      <a href="/pkg/crypto/x509/pkix/#Name.String"><code>Name.String</code></a>
+      now prints non-standard attributes from
+      <a href="/pkg/crypto/x509/pkix/#Name.Names"><code>Names</code></a> if
+      <a href="/pkg/crypto/x509/pkix/#Name.ExtraNames"><code>ExtraNames</code></a> is nil.
+    </p>
+  </dd>
+</dl><!-- crypto/x509/pkix -->
+
+<dl id="database/sql"><dt><a href="/pkg/database/sql/">database/sql</a></dt>
+  <dd>
+    <p><!-- CL 145758 -->
+      The new <a href="/pkg/database/sql/#DB.SetConnMaxIdleTime"><code>DB.SetConnMaxIdleTime</code></a>
+      method allows removing a connection from the connection pool after
+      it has been idle for a period of time, without regard to the total
+      lifespan of the connection.  The <a href="/pkg/database/sql/#DBStats.MaxIdleTimeClosed"><code>DBStats.MaxIdleTimeClosed</code></a>
+      field shows the total number of connections closed due to
+      <code>DB.SetConnMaxIdleTime</code>.
+    </p>
+
+    <p><!-- CL 214317 -->
+      The new <a href="/pkg/database/sql/#Row.Err"><code>Row.Err</code></a> getter
+      allows checking for query errors without calling
+      <code>Row.Scan</code>.
+    </p>
+  </dd>
+</dl><!-- database/sql -->
+
+<dl id="database/sql/driver"><dt><a href="/pkg/database/sql/driver/">database/sql/driver</a></dt>
+  <dd>
+    <p><!-- CL 174122 -->
+      The new <a href="/pkg/database/sql/driver/#Validator"><code>Validator</code></a>
+      interface may be implemented by <code>Conn</code> to allow drivers
+      to signal if a connection is valid or if it should be discarded.
+    </p>
+  </dd>
+</dl><!-- database/sql/driver -->
+
+<dl id="debug/pe"><dt><a href="/pkg/debug/pe/">debug/pe</a></dt>
+  <dd>
+    <p><!-- CL 222637 -->
+      The package now defines the
+      <code>IMAGE_FILE</code>, <code>IMAGE_SUBSYSTEM</code>,
+      and <code>IMAGE_DLLCHARACTERISTICS</code> constants used by the
+      PE file format.
+    </p>
+  </dd>
+</dl><!-- debug/pe -->
+
+<dl id="encoding/asn1"><dt><a href="/pkg/encoding/asn1/">encoding/asn1</a></dt>
+  <dd>
+    <p><!-- CL 226984 -->
+      <a href="/pkg/encoding/asn1/#Marshal"><code>Marshal</code></a> now sorts the components
+      of SET OF according to X.690 DER.
+    </p>
+
+    <p><!-- CL 227320 -->
+      <a href="/pkg/encoding/asn1/#Unmarshal"><code>Unmarshal</code></a> now rejects tags and
+      Object Identifiers which are not minimally encoded according to X.690 DER.
+    </p>
+  </dd>
+</dl><!-- encoding/asn1 -->
+
+<dl id="encoding/json"><dt><a href="/pkg/encoding/json/">encoding/json</a></dt>
+  <dd>
+    <p><!-- CL 199837 -->
+      The package now has an internal limit to the maximum depth of
+      nesting when decoding. This reduces the possibility that a
+      deeply nested input could use large quantities of stack memory,
+      or even cause a "goroutine stack exceeds limit" panic.
+    </p>
+  </dd>
+</dl><!-- encoding/json -->
+
+<dl id="flag"><dt><a href="/pkg/flag/">flag</a></dt>
+  <dd>
+    <p><!-- CL 221427 -->
+      When the <code>flag</code> package sees <code>-h</code> or <code>-help</code>,
+      and those flags are not defined, it now prints a usage message.
+      If the <a href="/pkg/flag/#FlagSet"><code>FlagSet</code></a> was created with
+      <a href="/pkg/flag/#ExitOnError"><code>ExitOnError</code></a>,
+      <a href="/pkg/flag/#FlagSet.Parse"><code>FlagSet.Parse</code></a> would then
+      exit with a status of 2. In this release, the exit status for <code>-h</code>
+      or <code>-help</code> has been changed to 0. In particular, this applies to
+      the default handling of command line flags.
+    </p>
+  </dd>
+</dl>
+
+<dl id="fmt"><dt><a href="/pkg/fmt/">fmt</a></dt>
+  <dd>
+    <p><!-- CL 215001 -->
+      The printing verbs <code>%#g</code> and <code>%#G</code> now preserve
+      trailing zeros for floating-point values.
+    </p>
+  </dd>
+</dl><!-- fmt -->
+
+<dl id="go/format"><dt><a href="/pkg/go/format/">go/format</a></dt>
+  <dd>
+    <p><!-- golang.org/issue/37476, CL 231461, CL 240683 -->
+      The <a href="/pkg/go/format/#Source"><code>Source</code></a> and
+      <a href="/pkg/go/format/#Node"><code>Node</code></a> functions
+      now canonicalize number literal prefixes and exponents as part
+      of formatting Go source code. This matches the behavior of the
+      <a href="/pkg/cmd/gofmt/"><code>gofmt</code></a> command as it
+      was implemented <a href="/doc/go1.13#gofmt">since Go 1.13</a>.
+    </p>
+  </dd>
+</dl><!-- go/format -->
+
+<dl id="html/template"><dt><a href="/pkg/html/template/">html/template</a></dt>
+  <dd>
+    <p><!-- CL 226097 -->
+      The package now uses Unicode escapes (<code>\uNNNN</code>) in all
+      JavaScript and JSON contexts. This fixes escaping errors in
+      <code>application/ld+json</code> and <code>application/json</code>
+      contexts.
+    </p>
+  </dd>
+</dl><!-- html/template -->
+
+<dl id="io/ioutil"><dt><a href="/pkg/io/ioutil/">io/ioutil</a></dt>
+  <dd>
+    <p><!-- CL 212597 -->
+      <a href="/pkg/io/ioutil/#TempDir"><code>TempDir</code></a> and
+      <a href="/pkg/io/ioutil/#TempFile"><code>TempFile</code></a>
+      now reject patterns that contain path separators.
+      That is, calls such as <code>ioutil.TempFile("/tmp",</code> <code>"../base*")</code> will no longer succeed.
+      This prevents unintended directory traversal.
+    </p>
+  </dd>
+</dl><!-- io/ioutil -->
+
+<dl id="math/big"><dt><a href="/pkg/math/big/">math/big</a></dt>
+  <dd>
+    <p><!-- CL 230397 -->
+      The new <a href="/pkg/math/big/#Int.FillBytes"><code>Int.FillBytes</code></a>
+      method allows serializing to fixed-size pre-allocated byte slices.
+    </p>
+  </dd>
+</dl><!-- math/big -->
+
+<dl id="math/cmplx"><dt><a href="/pkg/math/cmplx/">math/cmplx</a></dt>
+  <dd>
+    <p><!-- CL 220689 -->
+      The functions in this package were updated to conform to the C99 standard
+      (Annex G IEC 60559-compatible complex arithmetic) with respect to handling
+      of special arguments such as infinity, NaN and signed zero.
+    </p>
+  </dd>
+</dl><!-- math/cmplx-->
+
+<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
+  <dd>
+    <p><!-- CL 228645 -->
+      If an I/O operation exceeds a deadline set by
+      the <a href="/pkg/net/#Conn"><code>Conn.SetDeadline</code></a>,
+      <code>Conn.SetReadDeadline</code>,
+      or <code>Conn.SetWriteDeadline</code> methods, it will now
+      return an error that is or wraps
+      <a href="/pkg/os/#ErrDeadlineExceeded"><code>os.ErrDeadlineExceeded</code></a>.
+      This may be used to reliably detect whether an error is due to
+      an exceeded deadline.
+      Earlier releases recommended calling the <code>Timeout</code>
+      method on the error, but I/O operations can return errors for
+      which <code>Timeout</code> returns <code>true</code> although a
+      deadline has not been exceeded.
+    </p>
+
+    <p><!-- CL 228641 -->
+      The new <a href="/pkg/net/#Resolver.LookupIP"><code>Resolver.LookupIP</code></a>
+      method supports IP lookups that are both network-specific and accept a context.
+    </p>
+  </dd>
+</dl>
+
+<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
+  <dd>
+    <p><!-- CL 231418, CL 231419 -->
+      Parsing is now stricter as a hardening measure against request smuggling attacks:
+      non-ASCII white space is no longer trimmed like SP and HTAB, and support for the
+      "<code>identity</code>" <code>Transfer-Encoding</code> was dropped.
+    </p>
+  </dd>
+</dl><!-- net/http -->
+
+<dl id="net/http/httputil"><dt><a href="/pkg/net/http/httputil/">net/http/httputil</a></dt>
+  <dd>
+    <p><!-- CL 230937 -->
+      <a href="/pkg/net/http/httputil/#ReverseProxy"><code>ReverseProxy</code></a>
+      now supports not modifying the <code>X-Forwarded-For</code>
+      header when the incoming <code>Request.Header</code> map entry
+      for that field is <code>nil</code>.
+    </p>
+
+    <p><!-- CL 224897 -->
+      When a Switching Protocol (like WebSocket) request handled by
+      <a href="/pkg/net/http/httputil/#ReverseProxy"><code>ReverseProxy</code></a>
+      is canceled, the backend connection is now correctly closed.
+    </p>
+  </dd>
+</dl>
+
+<dl id="net/http/pprof"><dt><a href="/pkg/net/http/pprof/">net/http/pprof</a></dt>
+  <dd>
+    <p><!-- CL 147598, CL 229537 -->
+      All profile endpoints now support a "<code>seconds</code>" parameter. When present,
+      the endpoint profiles for the specified number of seconds and reports the difference.
+      The meaning of the "<code>seconds</code>" parameter in the <code>cpu</code> profile and
+      the trace endpoints is unchanged.
+    </p>
+  </dd>
+</dl>
+
+<dl id="net/url"><dt><a href="/pkg/net/url/">net/url</a></dt>
+  <dd>
+    <p><!-- CL 227645 -->
+      The new <a href="/pkg/net/url/#URL"><code>URL</code></a> field
+      <code>RawFragment</code> and method <a href="/pkg/net/url/#URL.EscapedFragment"><code>EscapedFragment</code></a>
+      provide detail about and control over the exact encoding of a particular fragment.
+      These are analogous to
+      <code>RawPath</code> and <a href="/pkg/net/url/#URL.EscapedPath"><code>EscapedPath</code></a>.
+    </p>
+    <p><!-- CL 207082 -->
+      The new <a href="/pkg/net/url/#URL"><code>URL</code></a>
+      method <a href="/pkg/net/url/#URL.Redacted"><code>Redacted</code></a>
+      returns the URL in string form with any password replaced with <code>xxxxx</code>.
+    </p>
+  </dd>
+</dl>
+
+<dl id="os"><dt><a href="/pkg/os/">os</a></dt>
+  <dd>
+    <p><!-- CL -->
+      If an I/O operation exceeds a deadline set by
+      the <a href="/pkg/os/#File.SetDeadline"><code>File.SetDeadline</code></a>,
+      <a href="/pkg/os/#File.SetReadDeadline"><code>File.SetReadDeadline</code></a>,
+      or <a href="/pkg/os/#File.SetWriteDeadline"><code>File.SetWriteDeadline</code></a>
+      methods, it will now return an error that is or wraps
+      <a href="/pkg/os/#ErrDeadlineExceeded"><code>os.ErrDeadlineExceeded</code></a>.
+      This may be used to reliably detect whether an error is due to
+      an exceeded deadline.
+      Earlier releases recommended calling the <code>Timeout</code>
+      method on the error, but I/O operations can return errors for
+      which <code>Timeout</code> returns <code>true</code> although a
+      deadline has not been exceeded.
+    </p>
+
+    <p><!-- CL 232862 -->
+      Packages <code>os</code> and <code>net</code> now automatically
+      retry system calls that fail with <code>EINTR</code>. Previously
+      this led to spurious failures, which became more common in Go
+      1.14 with the addition of asynchronous preemption. Now this is
+      handled transparently.
+    </p>
+
+    <p><!-- CL 229101 -->
+      The <a href="/pkg/os/#File"><code>os.File</code></a> type now
+      supports a <a href="/pkg/os/#File.ReadFrom"><code>ReadFrom</code></a>
+      method. This permits the use of the <code>copy_file_range</code>
+      system call on some systems when using
+      <a href="/pkg/io/#Copy"><code>io.Copy</code></a> to copy data
+      from one <code>os.File</code> to another. A consequence is that
+      <a href="/pkg/io/#CopyBuffer"><code>io.CopyBuffer</code></a>
+      will not always use the provided buffer when copying to a
+      <code>os.File</code>. If a program wants to force the use of
+      the provided buffer, it can be done by writing
+      <code>io.CopyBuffer(struct{ io.Writer }{dst}, src, buf)</code>.
+    </p>
+  </dd>
+</dl>
+
+<dl id="plugin"><dt><a href="/pkg/plugin/">plugin</a></dt>
+  <dd>
+    <p><!-- CL 182959 -->
+      DWARF generation is now supported (and enabled by default) for <code>-buildmode=plugin</code> on macOS.
+    </p>
+  </dd>
+  <dd>
+    <p><!-- CL 191617 -->
+      Building with <code>-buildmode=plugin</code> is now supported on <code>freebsd/amd64</code>.
+    </p>
+  </dd>
+</dl>
+
+<dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
+  <dd>
+    <p><!-- CL 228902 -->
+      Package <code>reflect</code> now disallows accessing methods of all
+      non-exported fields, whereas previously it allowed accessing
+      those of non-exported, embedded fields. Code that relies on the
+      previous behavior should be updated to instead access the
+      corresponding promoted method of the enclosing variable.
+    </p>
+  </dd>
+</dl>
+
+<dl id="regexp"><dt><a href="/pkg/regexp/">regexp</a></dt>
+  <dd>
+    <p><!-- CL 187919 -->
+      The new <a href="/pkg/regexp/#Regexp.SubexpIndex"><code>Regexp.SubexpIndex</code></a>
+      method returns the index of the first subexpression with the given name
+      within the regular expression.
+    </p>
+  </dd>
+</dl><!-- regexp -->
+
+<dl id="pkg-runtime"><dt><a href="/pkg/runtime/">runtime</a></dt>
+  <dd>
+    <p><!-- CL 216557 -->
+      Several functions, including
+      <a href="/pkg/runtime/#ReadMemStats"><code>ReadMemStats</code></a>
+      and
+      <a href="/pkg/runtime/#GoroutineProfile"><code>GoroutineProfile</code></a>,
+      no longer block if a garbage collection is in progress.
+    </p>
+  </dd>
+</dl>
+
+<dl id="pkg-runtime-pprof"><dt><a href="/pkg/runtime/pprof/">runtime/pprof</a></dt>
+  <dd>
+    <p><!-- CL 189318 -->
+      The goroutine profile now includes the profile labels associated with each
+      goroutine at the time of profiling. This feature is not yet implemented for
+      the profile reported with <code>debug=2</code>.
+    </p>
+  </dd>
+</dl>
+
+<dl id="strconv"><dt><a href="/pkg/strconv/">strconv</a></dt>
+  <dd>
+    <p><!-- CL 216617 -->
+      <a href="/pkg/strconv/#FormatComplex"><code>FormatComplex</code></a> and <a href="/pkg/strconv/#ParseComplex"><code>ParseComplex</code></a> are added for working with complex numbers.
+    </p>
+    <p>
+      <a href="/pkg/strconv/#FormatComplex"><code>FormatComplex</code></a> converts a complex number into a string of the form (a+bi), where a and b are the real and imaginary parts.
+    </p>
+    <p>
+      <a href="/pkg/strconv/#ParseComplex"><code>ParseComplex</code></a> converts a string into a complex number of a specified precision. <code>ParseComplex</code> accepts complex numbers in the format <code>N+Ni</code>.
+    </p>
+  </dd>
+</dl><!-- strconv -->
+
+<dl id="sync"><dt><a href="/pkg/sync/">sync</a></dt>
+  <dd>
+    <p><!-- CL 205899, golang.org/issue/33762 -->
+      The new method
+      <a href="/pkg/sync/#Map.LoadAndDelete"><code>Map.LoadAndDelete</code></a>
+      atomically deletes a key and returns the previous value if present.
+    </p>
+    <p><!-- CL 205899 -->
+      The method
+      <a href="/pkg/sync/#Map.Delete"><code>Map.Delete</code></a>
+      is more efficient.
+    </p>
+  </dd>
+</dl><!-- sync -->
+
+<dl id="syscall"><dt><a href="/pkg/syscall/">syscall</a></dt>
+  <dd>
+    <p><!-- CL 231638 -->
+      On Unix systems, functions that use
+      <a href="/pkg/syscall/#SysProcAttr"><code>SysProcAttr</code></a>
+      will now reject attempts to set both the <code>Setctty</code>
+      and <code>Foreground</code> fields, as they both use
+      the <code>Ctty</code> field but do so in incompatible ways.
+      We expect that few existing programs set both fields.
+    </p>
+    <p>
+      Setting the <code>Setctty</code> field now requires that the
+      <code>Ctty</code> field be set to a file descriptor number in the
+      child process, as determined by the <code>ProcAttr.Files</code> field.
+      Using a child descriptor always worked, but there were certain
+      cases where using a parent file descriptor also happened to work.
+      Some programs that set <code>Setctty</code> will need to change
+      the value of <code>Ctty</code> to use a child descriptor number.
+    </p>
+
+    <p><!-- CL 220578 -->
+      It is <a href="/pkg/syscall/#Proc.Call">now possible</a> to call
+      system calls that return floating point values
+      on <code>windows/amd64</code>.
+    </p>
+  </dd>
+</dl>
+
+<dl id="testing"><dt><a href="/pkg/testing/">testing</a></dt>
+  <dd>
+    <p><!-- golang.org/issue/28135 -->
+      The <code>testing.T</code> type now has a
+      <a href="/pkg/testing/#T.Deadline"><code>Deadline</code></a> method
+      that reports the time at which the test binary will have exceeded its
+      timeout.
+    </p>
+
+    <p><!-- golang.org/issue/34129 -->
+      A <code>TestMain</code> function is no longer required to call
+      <code>os.Exit</code>. If a <code>TestMain</code> function returns,
+      the test binary will call <code>os.Exit</code> with the value returned
+      by <code>m.Run</code>.
+    </p>
+
+    <p><!-- CL 226877, golang.org/issue/35998 -->
+       The new methods
+       <a href="/pkg/testing/#T.TempDir"><code>T.TempDir</code></a> and
+       <a href="/pkg/testing/#B.TempDir"><code>B.TempDir</code></a>
+       return temporary directories that are automatically cleaned up
+       at the end of the test.
+    </p>
+
+    <p><!-- CL 229085 -->
+      <code>go</code> <code>test</code> <code>-v</code> now groups output by
+      test name, rather than printing the test name on each line.
+    </p>
+  </dd>
+</dl><!-- testing -->
+
+<dl id="text/template"><dt><a href="/pkg/text/template/">text/template</a></dt>
+  <dd>
+    <p><!-- CL 226097 -->
+      <a href="/pkg/text/template/#JSEscape"><code>JSEscape</code></a> now
+      consistently uses Unicode escapes (<code>\u00XX</code>), which are
+      compatible with JSON.
+    </p>
+  </dd>
+</dl><!-- text/template -->
+
+<dl id="time"><dt><a href="/pkg/time/">time</a></dt>
+  <dd>
+    <p><!-- CL 220424, CL 217362, golang.org/issue/33184 -->
+       The new method
+       <a href="/pkg/time/#Ticker.Reset"><code>Ticker.Reset</code></a>
+       supports changing the duration of a ticker.
+    </p>
+
+    <p><!-- CL 227878 -->
+      When returning an error, <a href="/pkg/time/#ParseDuration"><code>ParseDuration</code></a> now quotes the original value.
+    </p>
+  </dd>
+</dl><!-- time -->
diff --git a/_content/doc/go1.2.html b/_content/doc/go1.2.html
new file mode 100644
index 0000000..1f60514
--- /dev/null
+++ b/_content/doc/go1.2.html
@@ -0,0 +1,979 @@
+<!--{
+	"Title": "Go 1.2 Release Notes",
+	"Path":  "/doc/go1.2",
+	"Template": true
+}-->
+
+<h2 id="introduction">Introduction to Go 1.2</h2>
+
+<p>
+Since the release of <a href="/doc/go1.1.html">Go version 1.1</a> in April, 2013,
+the release schedule has been shortened to make the release process more efficient.
+This release, Go version 1.2 or Go 1.2 for short, arrives roughly six months after 1.1,
+while 1.1 took over a year to appear after 1.0.
+Because of the shorter time scale, 1.2 is a smaller delta than the step from 1.0 to 1.1,
+but it still has some significant developments, including
+a better scheduler and one new language feature.
+Of course, Go 1.2 keeps the <a href="/doc/go1compat.html">promise
+of compatibility</a>.
+The overwhelming majority of programs built with Go 1.1 (or 1.0 for that matter)
+will run without any changes whatsoever when moved to 1.2,
+although the introduction of one restriction
+to a corner of the language may expose already-incorrect code
+(see the discussion of the <a href="#use_of_nil">use of nil</a>).
+</p>
+
+<h2 id="language">Changes to the language</h2>
+
+<p>
+In the interest of firming up the specification, one corner case has been clarified,
+with consequences for programs.
+There is also one new language feature.
+</p>
+
+<h3 id="use_of_nil">Use of nil</h3>
+
+<p>
+The language now specifies that, for safety reasons,
+certain uses of nil pointers are guaranteed to trigger a run-time panic.
+For instance, in Go 1.0, given code like
+</p>
+
+<pre>
+type T struct {
+    X [1<<24]byte
+    Field int32
+}
+
+func main() {
+    var x *T
+    ...
+}
+</pre>
+
+<p>
+the <code>nil</code> pointer <code>x</code> could be used to access memory incorrectly:
+the expression <code>x.Field</code> could access memory at address <code>1<<24</code>.
+To prevent such unsafe behavior, in Go 1.2 the compilers now guarantee that any indirection through
+a nil pointer, such as illustrated here but also in nil pointers to arrays, nil interface values,
+nil slices, and so on, will either panic or return a correct, safe non-nil value.
+In short, any expression that explicitly or implicitly requires evaluation of a nil address is an error.
+The implementation may inject extra tests into the compiled program to enforce this behavior.
+</p>
+
+<p>
+Further details are in the
+<a href="//golang.org/s/go12nil">design document</a>.
+</p>
+
+<p>
+<em>Updating</em>:
+Most code that depended on the old behavior is erroneous and will fail when run.
+Such programs will need to be updated by hand.
+</p>
+
+<h3 id="three_index">Three-index slices</h3>
+
+<p>
+Go 1.2 adds the ability to specify the capacity as well as the length when using a slicing operation
+on an existing array or slice.
+A slicing operation creates a new slice by describing a contiguous section of an already-created array or slice:
+</p>
+
+<pre>
+var array [10]int
+slice := array[2:4]
+</pre>
+
+<p>
+The capacity of the slice is the maximum number of elements that the slice may hold, even after reslicing;
+it reflects the size of the underlying array.
+In this example, the capacity of the <code>slice</code> variable is 8.
+</p>
+
+<p>
+Go 1.2 adds new syntax to allow a slicing operation to specify the capacity as well as the length.
+A second
+colon introduces the capacity value, which must be less than or equal to the capacity of the
+source slice or array, adjusted for the origin. For instance,
+</p>
+
+<pre>
+slice = array[2:4:7]
+</pre>
+
+<p>
+sets the slice to have the same length as in the earlier example but its capacity is now only 5 elements (7-2).
+It is impossible to use this new slice value to access the last three elements of the original array.
+</p>
+
+<p>
+In this three-index notation, a missing first index (<code>[:i:j]</code>) defaults to zero but the other
+two indices must always be specified explicitly.
+It is possible that future releases of Go may introduce default values for these indices.
+</p>
+
+<p>
+Further details are in the
+<a href="//golang.org/s/go12slice">design document</a>.
+</p>
+
+<p>
+<em>Updating</em>:
+This is a backwards-compatible change that affects no existing programs.
+</p>
+
+<h2 id="impl">Changes to the implementations and tools</h2>
+
+<h3 id="preemption">Pre-emption in the scheduler</h3>
+
+<p>
+In prior releases, a goroutine that was looping forever could starve out other
+goroutines on the same thread, a serious problem when GOMAXPROCS
+provided only one user thread.
+In Go 1.2, this is partially addressed: The scheduler is invoked occasionally
+upon entry to a function.
+This means that any loop that includes a (non-inlined) function call can
+be pre-empted, allowing other goroutines to run on the same thread.
+</p>
+
+<h3 id="thread_limit">Limit on the number of threads</h3>
+
+<p>
+Go 1.2 introduces a configurable limit (default 10,000) to the total number of threads
+a single program may have in its address space, to avoid resource starvation
+issues in some environments.
+Note that goroutines are multiplexed onto threads so this limit does not directly
+limit the number of goroutines, only the number that may be simultaneously blocked
+in a system call.
+In practice, the limit is hard to reach.
+</p>
+
+<p>
+The new <a href="/pkg/runtime/debug/#SetMaxThreads"><code>SetMaxThreads</code></a> function in the
+<a href="/pkg/runtime/debug/"><code>runtime/debug</code></a> package controls the thread count limit.
+</p>
+
+<p>
+<em>Updating</em>:
+Few functions will be affected by the limit, but if a program dies because it hits the
+limit, it could be modified to call <code>SetMaxThreads</code> to set a higher count.
+Even better would be to refactor the program to need fewer threads, reducing consumption
+of kernel resources.
+</p>
+
+<h3 id="stack_size">Stack size</h3>
+
+<p>
+In Go 1.2, the minimum size of the stack when a goroutine is created has been lifted from 4KB to 8KB.
+Many programs were suffering performance problems with the old size, which had a tendency
+to introduce expensive stack-segment switching in performance-critical sections.
+The new number was determined by empirical testing.
+</p>
+
+<p>
+At the other end, the new function <a href="/pkg/runtime/debug/#SetMaxStack"><code>SetMaxStack</code></a>
+in the <a href="/pkg/runtime/debug"><code>runtime/debug</code></a> package controls
+the <em>maximum</em> size of a single goroutine's stack.
+The default is 1GB on 64-bit systems and 250MB on 32-bit systems.
+Before Go 1.2, it was too easy for a runaway recursion to consume all the memory on a machine.
+</p>
+
+<p>
+<em>Updating</em>:
+The increased minimum stack size may cause programs with many goroutines to use
+more memory. There is no workaround, but plans for future releases
+include new stack management technology that should address the problem better.
+</p>
+
+<h3 id="cgo_and_cpp">Cgo and C++</h3>
+
+<p>
+The <a href="/cmd/cgo/"><code>cgo</code></a> command will now invoke the C++
+compiler to build any pieces of the linked-to library that are written in C++;
+<a href="/cmd/cgo/">the documentation</a> has more detail.
+</p>
+
+<h3 id="go_tools_godoc">Godoc and vet moved to the go.tools subrepository</h3>
+
+<p>
+Both binaries are still included with the distribution, but the source code for the
+godoc and vet commands has moved to the
+<a href="//code.google.com/p/go.tools">go.tools</a> subrepository.
+</p>
+
+<p>
+Also, the core of the godoc program has been split into a
+<a href="https://code.google.com/p/go/source/browse/?repo=tools#hg%2Fgodoc">library</a>,
+while the command itself is in a separate
+<a href="https://code.google.com/p/go/source/browse/?repo=tools#hg%2Fcmd%2Fgodoc">directory</a>.
+The move allows the code to be updated easily and the separation into a library and command
+makes it easier to construct custom binaries for local sites and different deployment methods.
+</p>
+
+<p>
+<em>Updating</em>:
+Since godoc and vet are not part of the library,
+no client Go code depends on the their source and no updating is required.
+</p>
+
+<p>
+The binary distributions available from <a href="//golang.org">golang.org</a>
+include these binaries, so users of these distributions are unaffected.
+</p>
+
+<p>
+When building from source, users must use "go get" to install godoc and vet.
+(The binaries will continue to be installed in their usual locations, not
+<code>$GOPATH/bin</code>.)
+</p>
+
+<pre>
+$ go get code.google.com/p/go.tools/cmd/godoc
+$ go get code.google.com/p/go.tools/cmd/vet
+</pre>
+
+<h3 id="gccgo">Status of gccgo</h3>
+
+<p>
+We expect the future GCC 4.9 release to include gccgo with full
+support for Go 1.2.
+In the current (4.8.2) release of GCC, gccgo implements Go 1.1.2.
+</p>
+
+<h3 id="gc_changes">Changes to the gc compiler and linker</h3>
+
+<p>
+Go 1.2 has several semantic changes to the workings of the gc compiler suite.
+Most users will be unaffected by them.
+</p>
+
+<p>
+The <a href="/cmd/cgo/"><code>cgo</code></a> command now
+works when C++ is included in the library being linked against.
+See the <a href="/cmd/cgo/"><code>cgo</code></a> documentation
+for details.
+</p>
+
+<p>
+The gc compiler displayed a vestigial detail of its origins when
+a program had no <code>package</code> clause: it assumed
+the file was in package <code>main</code>.
+The past has been erased, and a missing <code>package</code> clause
+is now an error.
+</p>
+
+<p>
+On the ARM, the toolchain supports "external linking", which
+is a step towards being able to build shared libraries with the gc
+toolchain and to provide dynamic linking support for environments
+in which that is necessary.
+</p>
+
+<p>
+In the runtime for the ARM, with <code>5a</code>, it used to be possible to refer
+to the runtime-internal <code>m</code> (machine) and <code>g</code>
+(goroutine) variables using <code>R9</code> and <code>R10</code> directly.
+It is now necessary to refer to them by their proper names.
+</p>
+
+<p>
+Also on the ARM, the <code>5l</code> linker (sic) now defines the
+<code>MOVBS</code> and <code>MOVHS</code> instructions
+as synonyms of <code>MOVB</code> and <code>MOVH</code>,
+to make clearer the separation between signed and unsigned
+sub-word moves; the unsigned versions already existed with a
+<code>U</code> suffix.
+</p>
+
+<h3 id="cover">Test coverage</h3>
+
+<p>
+One major new feature of <a href="/pkg/go/"><code>go test</code></a> is
+that it can now compute and, with help from a new, separately installed
+"go tool cover" program, display test coverage results.
+</p>
+
+<p>
+The cover tool is part of the
+<a href="https://code.google.com/p/go/source/checkout?repo=tools"><code>go.tools</code></a>
+subrepository.
+It can be installed by running
+</p>
+
+<pre>
+$ go get code.google.com/p/go.tools/cmd/cover
+</pre>
+
+<p>
+The cover tool does two things.
+First, when "go test" is given the <code>-cover</code> flag, it is run automatically 
+to rewrite the source for the package and insert instrumentation statements.
+The test is then compiled and run as usual, and basic coverage statistics are reported:
+</p>
+
+<pre>
+$ go test -cover fmt
+ok  	fmt	0.060s	coverage: 91.4% of statements
+$
+</pre>
+
+<p>
+Second, for more detailed reports, different flags to "go test" can create a coverage profile file,
+which the cover program, invoked with "go tool cover", can then analyze.
+</p>
+
+<p>
+Details on how to generate and analyze coverage statistics can be found by running the commands
+</p>
+
+<pre>
+$ go help testflag
+$ go tool cover -help
+</pre>
+
+<h3 id="go_doc">The go doc command is deleted</h3>
+
+<p>
+The "go doc" command is deleted.
+Note that the <a href="/cmd/godoc/"><code>godoc</code></a> tool itself is not deleted,
+just the wrapping of it by the <a href="/cmd/go/"><code>go</code></a> command.
+All it did was show the documents for a package by package path,
+which godoc itself already does with more flexibility.
+It has therefore been deleted to reduce the number of documentation tools and,
+as part of the restructuring of godoc, encourage better options in future.
+</p>
+
+<p>
+<em>Updating</em>: For those who still need the precise functionality of running
+</p>
+
+<pre>
+$ go doc
+</pre>
+
+<p>
+in a directory, the behavior is identical to running
+</p>
+
+<pre>
+$ godoc .
+</pre>
+
+<h3 id="gocmd">Changes to the go command</h3>
+
+<p>
+The <a href="/cmd/go/"><code>go get</code></a> command
+now has a <code>-t</code> flag that causes it to download the dependencies
+of the tests run by the package, not just those of the package itself.
+By default, as before, dependencies of the tests are not downloaded.
+</p>
+
+<h2 id="performance">Performance</h2>
+
+<p>
+There are a number of significant performance improvements in the standard library; here are a few of them.
+</p>
+
+<ul> 
+
+<li>
+The <a href="/pkg/compress/bzip2/"><code>compress/bzip2</code></a>
+decompresses about 30% faster.
+</li>
+
+<li>
+The <a href="/pkg/crypto/des/"><code>crypto/des</code></a> package
+is about five times faster.
+</li>
+
+<li>
+The <a href="/pkg/encoding/json/"><code>encoding/json</code></a> package
+encodes about 30% faster.
+</li>
+
+<li>
+Networking performance on Windows and BSD systems is about 30% faster through the use
+of an integrated network poller in the runtime, similar to what was done for Linux and OS X
+in Go 1.1.
+</li>
+
+</ul>
+
+<h2 id="library">Changes to the standard library</h2>
+
+
+<h3 id="archive_tar_zip">The archive/tar and archive/zip packages</h3>
+
+<p>
+The
+<a href="/pkg/archive/tar/"><code>archive/tar</code></a>
+and
+<a href="/pkg/archive/zip/"><code>archive/zip</code></a>
+packages have had a change to their semantics that may break existing programs.
+The issue is that they both provided an implementation of the
+<a href="/pkg/os/#FileInfo"><code>os.FileInfo</code></a>
+interface that was not compliant with the specification for that interface.
+In particular, their <code>Name</code> method returned the full
+path name of the entry, but the interface specification requires that
+the method return only the base name (final path element).
+</p>
+
+<p>
+<em>Updating</em>: Since this behavior was newly implemented and
+a bit obscure, it is possible that no code depends on the broken behavior.
+If there are programs that do depend on it, they will need to be identified
+and fixed manually.
+</p>
+
+<h3 id="encoding">The new encoding package</h3>
+
+<p>
+There is a new package, <a href="/pkg/encoding/"><code>encoding</code></a>,
+that defines a set of standard encoding interfaces that may be used to
+build custom marshalers and unmarshalers for packages such as
+<a href="/pkg/encoding/xml/"><code>encoding/xml</code></a>,
+<a href="/pkg/encoding/json/"><code>encoding/json</code></a>,
+and
+<a href="/pkg/encoding/binary/"><code>encoding/binary</code></a>.
+These new interfaces have been used to tidy up some implementations in
+the standard library.
+</p>
+
+<p>
+The new interfaces are called
+<a href="/pkg/encoding/#BinaryMarshaler"><code>BinaryMarshaler</code></a>,
+<a href="/pkg/encoding/#BinaryUnmarshaler"><code>BinaryUnmarshaler</code></a>,
+<a href="/pkg/encoding/#TextMarshaler"><code>TextMarshaler</code></a>,
+and
+<a href="/pkg/encoding/#TextUnmarshaler"><code>TextUnmarshaler</code></a>.
+Full details are in the <a href="/pkg/encoding/">documentation</a> for the package
+and a separate <a href="//golang.org/s/go12encoding">design document</a>.
+</p>
+
+<h3 id="fmt_indexed_arguments">The fmt package</h3>
+
+<p>
+The <a href="/pkg/fmt/"><code>fmt</code></a> package's formatted print
+routines such as <a href="/pkg/fmt/#Printf"><code>Printf</code></a>
+now allow the data items to be printed to be accessed in arbitrary order
+by using an indexing operation in the formatting specifications.
+Wherever an argument is to be fetched from the argument list for formatting,
+either as the value to be formatted or as a width or specification integer,
+a new optional indexing notation <code>[</code><em>n</em><code>]</code>
+fetches argument <em>n</em> instead.
+The value of <em>n</em> is 1-indexed.
+After such an indexing operating, the next argument to be fetched by normal
+processing will be <em>n</em>+1.
+</p>
+
+<p>
+For example, the normal <code>Printf</code> call
+</p>
+
+<pre>
+fmt.Sprintf("%c %c %c\n", 'a', 'b', 'c')
+</pre>
+
+<p>
+would create the string <code>"a b c"</code>, but with indexing operations like this,
+</p>
+
+<pre>
+fmt.Sprintf("%[3]c %[1]c %c\n", 'a', 'b', 'c')
+</pre>
+
+<p>
+the result is "<code>"c a b"</code>. The <code>[3]</code> index accesses the third formatting
+argument, which is <code>'c'</code>, <code>[1]</code> accesses the first, <code>'a'</code>,
+and then the next fetch accesses the argument following that one, <code>'b'</code>.
+</p>
+
+<p>
+The motivation for this feature is programmable format statements to access
+the arguments in different order for localization, but it has other uses:
+</p>
+
+<pre>
+log.Printf("trace: value %v of type %[1]T\n", expensiveFunction(a.b[c]))
+</pre>
+
+<p>
+<em>Updating</em>: The change to the syntax of format specifications
+is strictly backwards compatible, so it affects no working programs.
+</p>
+
+<h3 id="text_template">The text/template and html/template packages</h3>
+
+<p>
+The
+<a href="/pkg/text/template/"><code>text/template</code></a> package
+has a couple of changes in Go 1.2, both of which are also mirrored in the
+<a href="/pkg/html/template/"><code>html/template</code></a> package.
+</p>
+
+<p>
+First, there are new default functions for comparing basic types.
+The functions are listed in this table, which shows their names and
+the associated familiar comparison operator.
+</p>
+
+<table cellpadding="0" summary="Template comparison functions">
+<tr>
+<th width="50"></th><th width="100">Name</th> <th width="50">Operator</th>
+</tr>
+<tr>
+<td></td><td><code>eq</code></td> <td><code>==</code></td>
+</tr>
+<tr>
+<td></td><td><code>ne</code></td> <td><code>!=</code></td>
+</tr>
+<tr>
+<td></td><td><code>lt</code></td> <td><code>&lt;</code></td>
+</tr>
+<tr>
+<td></td><td><code>le</code></td> <td><code>&lt;=</code></td>
+</tr>
+<tr>
+<td></td><td><code>gt</code></td> <td><code>&gt;</code></td>
+</tr>
+<tr>
+<td></td><td><code>ge</code></td> <td><code>&gt;=</code></td>
+</tr>
+</table>
+
+<p>
+These functions behave slightly differently from the corresponding Go operators.
+First, they operate only on basic types (<code>bool</code>, <code>int</code>,
+<code>float64</code>, <code>string</code>, etc.).
+(Go allows comparison of arrays and structs as well, under some circumstances.)
+Second, values can be compared as long as they are the same sort of value:
+any signed integer value can be compared to any other signed integer value for example. (Go
+does not permit comparing an <code>int8</code> and an <code>int16</code>).
+Finally, the <code>eq</code> function (only) allows comparison of the first
+argument with one or more following arguments. The template in this example,
+</p>
+
+<pre>
+{{"{{"}}if eq .A 1 2 3 {{"}}"}} equal {{"{{"}}else{{"}}"}} not equal {{"{{"}}end{{"}}"}}
+</pre>
+
+<p>
+reports "equal" if <code>.A</code> is equal to <em>any</em> of 1, 2, or 3.
+</p>
+
+<p>
+The second change is that a small addition to the grammar makes "if else if" chains easier to write.
+Instead of writing,
+</p>
+
+<pre>
+{{"{{"}}if eq .A 1{{"}}"}} X {{"{{"}}else{{"}}"}} {{"{{"}}if eq .A 2{{"}}"}} Y {{"{{"}}end{{"}}"}} {{"{{"}}end{{"}}"}} 
+</pre>
+
+<p>
+one can fold the second "if" into the "else" and have only one "end", like this:
+</p>
+
+<pre>
+{{"{{"}}if eq .A 1{{"}}"}} X {{"{{"}}else if eq .A 2{{"}}"}} Y {{"{{"}}end{{"}}"}}
+</pre>
+
+<p>
+The two forms are identical in effect; the difference is just in the syntax.
+</p>
+
+<p>
+<em>Updating</em>: Neither the "else if" change nor the comparison functions
+affect existing programs. Those that
+already define functions called <code>eq</code> and so on through a function
+map are unaffected because the associated function map will override the new
+default function definitions.
+</p>
+
+<h3 id="new_packages">New packages</h3>
+
+<p>
+There are two new packages.
+</p>
+
+<ul>
+<li>
+The <a href="/pkg/encoding/"><code>encoding</code></a> package is
+<a href="#encoding">described above</a>.
+</li>
+<li>
+The <a href="/pkg/image/color/palette/"><code>image/color/palette</code></a> package
+provides standard color palettes.
+</li>
+</ul>
+
+<h3 id="minor_library_changes">Minor changes to the library</h3>
+
+<p>
+The following list summarizes a number of minor changes to the library, mostly additions.
+See the relevant package documentation for more information about each change.
+</p>
+
+<ul>
+
+<li>
+The <a href="/pkg/archive/zip/"><code>archive/zip</code></a> package
+adds the
+<a href="/pkg/archive/zip/#File.DataOffset"><code>DataOffset</code></a> accessor
+to return the offset of a file's (possibly compressed) data within the archive.
+</li>
+
+<li>
+The <a href="/pkg/bufio/"><code>bufio</code></a> package
+adds <a href="/pkg/bufio/#Reader.Reset"><code>Reset</code></a>
+methods to <a href="/pkg/bufio/#Reader"><code>Reader</code></a> and
+<a href="/pkg/bufio/#Writer"><code>Writer</code></a>.
+These methods allow the <a href="/pkg/io/#Reader"><code>Readers</code></a>
+and <a href="/pkg/io/#Writer"><code>Writers</code></a>
+to be re-used on new input and output readers and writers, saving
+allocation overhead. 
+</li>
+
+<li>
+The <a href="/pkg/compress/bzip2/"><code>compress/bzip2</code></a>
+can now decompress concatenated archives.
+</li>
+
+<li>
+The <a href="/pkg/compress/flate/"><code>compress/flate</code></a>
+package adds a <a href="/pkg/compress/flate/#Writer.Reset"><code>Reset</code></a> 
+method on the <a href="/pkg/compress/flate/#Writer"><code>Writer</code></a>,
+to make it possible to reduce allocation when, for instance, constructing an
+archive to hold multiple compressed files.
+</li>
+
+<li>
+The <a href="/pkg/compress/gzip/"><code>compress/gzip</code></a> package's
+<a href="/pkg/compress/gzip/#Writer"><code>Writer</code></a> type adds a
+<a href="/pkg/compress/gzip/#Writer.Reset"><code>Reset</code></a>
+so it may be reused.
+</li>
+
+<li>
+The <a href="/pkg/compress/zlib/"><code>compress/zlib</code></a> package's
+<a href="/pkg/compress/zlib/#Writer"><code>Writer</code></a> type adds a
+<a href="/pkg/compress/zlib/#Writer.Reset"><code>Reset</code></a>
+so it may be reused.
+</li>
+
+<li>
+The <a href="/pkg/container/heap/"><code>container/heap</code></a> package
+adds a <a href="/pkg/container/heap/#Fix"><code>Fix</code></a>
+method to provide a more efficient way to update an item's position in the heap.
+</li>
+
+<li>
+The <a href="/pkg/container/list/"><code>container/list</code></a> package
+adds the <a href="/pkg/container/list/#List.MoveBefore"><code>MoveBefore</code></a>
+and
+<a href="/pkg/container/list/#List.MoveAfter"><code>MoveAfter</code></a>
+methods, which implement the obvious rearrangement.
+</li>
+
+<li>
+The <a href="/pkg/crypto/cipher/"><code>crypto/cipher</code></a> package
+adds the a new GCM mode (Galois Counter Mode), which is almost always
+used with AES encryption.
+</li>
+
+<li>
+The 
+<a href="/pkg/crypto/md5/"><code>crypto/md5</code></a> package
+adds a new <a href="/pkg/crypto/md5/#Sum"><code>Sum</code></a> function
+to simplify hashing without sacrificing performance.
+</li>
+
+<li>
+Similarly, the 
+<a href="/pkg/crypto/md5/"><code>crypto/sha1</code></a> package
+adds a new <a href="/pkg/crypto/sha1/#Sum"><code>Sum</code></a> function.
+</li>
+
+<li>
+Also, the
+<a href="/pkg/crypto/sha256/"><code>crypto/sha256</code></a> package
+adds <a href="/pkg/crypto/sha256/#Sum256"><code>Sum256</code></a>
+and <a href="/pkg/crypto/sha256/#Sum224"><code>Sum224</code></a> functions.
+</li>
+
+<li>
+Finally, the <a href="/pkg/crypto/sha512/"><code>crypto/sha512</code></a> package
+adds <a href="/pkg/crypto/sha512/#Sum512"><code>Sum512</code></a> and
+<a href="/pkg/crypto/sha512/#Sum384"><code>Sum384</code></a> functions.
+</li>
+
+<li>
+The <a href="/pkg/crypto/x509/"><code>crypto/x509</code></a> package
+adds support for reading and writing arbitrary extensions.
+</li>
+
+<li>
+The <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package adds
+support for TLS 1.1, 1.2 and AES-GCM.
+</li>
+
+<li>
+The <a href="/pkg/database/sql/"><code>database/sql</code></a> package adds a
+<a href="/pkg/database/sql/#DB.SetMaxOpenConns"><code>SetMaxOpenConns</code></a>
+method on <a href="/pkg/database/sql/#DB"><code>DB</code></a> to limit the
+number of open connections to the database.
+</li>
+
+<li>
+The <a href="/pkg/encoding/csv/"><code>encoding/csv</code></a> package
+now always allows trailing commas on fields.
+</li>
+
+<li>
+The <a href="/pkg/encoding/gob/"><code>encoding/gob</code></a> package
+now treats channel and function fields of structures as if they were unexported,
+even if they are not. That is, it ignores them completely. Previously they would
+trigger an error, which could cause unexpected compatibility problems if an
+embedded structure added such a field.
+The package also now supports the generic <code>BinaryMarshaler</code> and
+<code>BinaryUnmarshaler</code> interfaces of the
+<a href="/pkg/encoding/"><code>encoding</code></a> package
+described above.
+</li>
+
+<li>
+The <a href="/pkg/encoding/json/"><code>encoding/json</code></a> package
+now will always escape ampersands as "\u0026" when printing strings.
+It will now accept but correct invalid UTF-8 in
+<a href="/pkg/encoding/json/#Marshal"><code>Marshal</code></a>
+(such input was previously rejected).
+Finally, it now supports the generic encoding interfaces of the
+<a href="/pkg/encoding/"><code>encoding</code></a> package
+described above.
+</li>
+
+<li>
+The <a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> package
+now allows attributes stored in pointers to be marshaled.
+It also supports the generic encoding interfaces of the
+<a href="/pkg/encoding/"><code>encoding</code></a> package
+described above through the new
+<a href="/pkg/encoding/xml/#Marshaler"><code>Marshaler</code></a>,
+<a href="/pkg/encoding/xml/#Unmarshaler"><code>Unmarshaler</code></a>,
+and related
+<a href="/pkg/encoding/xml/#MarshalerAttr"><code>MarshalerAttr</code></a> and
+<a href="/pkg/encoding/xml/#UnmarshalerAttr"><code>UnmarshalerAttr</code></a>
+interfaces.
+The package also adds a
+<a href="/pkg/encoding/xml/#Encoder.Flush"><code>Flush</code></a> method
+to the
+<a href="/pkg/encoding/xml/#Encoder"><code>Encoder</code></a>
+type for use by custom encoders. See the documentation for
+<a href="/pkg/encoding/xml/#Encoder.EncodeToken"><code>EncodeToken</code></a>
+to see how to use it.
+</li>
+
+<li>
+The <a href="/pkg/flag/"><code>flag</code></a> package now
+has a <a href="/pkg/flag/#Getter"><code>Getter</code></a> interface
+to allow the value of a flag to be retrieved. Due to the
+Go 1 compatibility guidelines, this method cannot be added to the existing
+<a href="/pkg/flag/#Value"><code>Value</code></a>
+interface, but all the existing standard flag types implement it.
+The package also now exports the <a href="/pkg/flag/#CommandLine"><code>CommandLine</code></a>
+flag set, which holds the flags from the command line.
+</li>
+
+<li>
+The <a href="/pkg/go/ast/"><code>go/ast</code></a> package's
+<a href="/pkg/go/ast/#SliceExpr"><code>SliceExpr</code></a> struct
+has a new boolean field, <code>Slice3</code>, which is set to true
+when representing a slice expression with three indices (two colons).
+The default is false, representing the usual two-index form.
+</li>
+
+<li>
+The <a href="/pkg/go/build/"><code>go/build</code></a> package adds
+the <code>AllTags</code> field
+to the <a href="/pkg/go/build/#Package"><code>Package</code></a> type,
+to make it easier to process build tags.
+</li>
+
+<li>
+The <a href="/pkg/image/draw/"><code>image/draw</code></a> package now
+exports an interface, <a href="/pkg/image/draw/#Drawer"><code>Drawer</code></a>,
+that wraps the standard <a href="/pkg/image/draw/#Draw"><code>Draw</code></a> method.
+The Porter-Duff operators now implement this interface, in effect binding an operation to
+the draw operator rather than providing it explicitly.
+Given a paletted image as its destination, the new
+<a href="/pkg/image/draw/#FloydSteinberg"><code>FloydSteinberg</code></a>
+implementation of the
+<a href="/pkg/image/draw/#Drawer"><code>Drawer</code></a>
+interface will use the Floyd-Steinberg error diffusion algorithm to draw the image.
+To create palettes suitable for such processing, the new
+<a href="/pkg/image/draw/#Quantizer"><code>Quantizer</code></a> interface
+represents implementations of quantization algorithms that choose a palette
+given a full-color image.
+There are no implementations of this interface in the library.
+</li>
+
+<li>
+The <a href="/pkg/image/gif/"><code>image/gif</code></a> package
+can now create GIF files using the new
+<a href="/pkg/image/gif/#Encode"><code>Encode</code></a>
+and <a href="/pkg/image/gif/#EncodeAll"><code>EncodeAll</code></a>
+functions.
+Their options argument allows specification of an image
+<a href="/pkg/image/draw/#Quantizer"><code>Quantizer</code></a> to use;
+if it is <code>nil</code>, the generated GIF will use the 
+<a href="/pkg/image/color/palette/#Plan9"><code>Plan9</code></a>
+color map (palette) defined in the new
+<a href="/pkg/image/color/palette/"><code>image/color/palette</code></a> package.
+The options also specify a
+<a href="/pkg/image/draw/#Drawer"><code>Drawer</code></a>
+to use to create the output image;
+if it is <code>nil</code>, Floyd-Steinberg error diffusion is used.
+</li>
+
+<li>
+The <a href="/pkg/io/#Copy"><code>Copy</code></a> method of the
+<a href="/pkg/io/"><code>io</code></a> package now prioritizes its
+arguments differently.
+If one argument implements <a href="/pkg/io/#WriterTo"><code>WriterTo</code></a>
+and the other implements <a href="/pkg/io/#ReaderFrom"><code>ReaderFrom</code></a>,
+<a href="/pkg/io/#Copy"><code>Copy</code></a> will now invoke
+<a href="/pkg/io/#WriterTo"><code>WriterTo</code></a> to do the work,
+so that less intermediate buffering is required in general.
+</li>
+
+<li>
+The <a href="/pkg/net/"><code>net</code></a> package requires cgo by default
+because the host operating system must in general mediate network call setup.
+On some systems, though, it is possible to use the network without cgo, and useful
+to do so, for instance to avoid dynamic linking.
+The new build tag <code>netgo</code> (off by default) allows the construction of a
+<code>net</code> package in pure Go on those systems where it is possible.
+</li>
+
+<li>
+The <a href="/pkg/net/"><code>net</code></a> package adds a new field
+<code>DualStack</code> to the <a href="/pkg/net/#Dialer"><code>Dialer</code></a>
+struct for TCP connection setup using a dual IP stack as described in
+<a href="https://tools.ietf.org/html/rfc6555">RFC 6555</a>.
+</li>
+
+<li>
+The <a href="/pkg/net/http/"><code>net/http</code></a> package will no longer
+transmit cookies that are incorrect according to
+<a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a>.
+It just logs an error and sends nothing.
+Also,
+the <a href="/pkg/net/http/"><code>net/http</code></a> package's
+<a href="/pkg/net/http/#ReadResponse"><code>ReadResponse</code></a>
+function now permits the <code>*Request</code> parameter to be <code>nil</code>,
+whereupon it assumes a GET request.
+Finally, an HTTP server will now serve HEAD
+requests transparently, without the need for special casing in handler code.
+While serving a HEAD request, writes to a 
+<a href="/pkg/net/http/#Handler"><code>Handler</code></a>'s
+<a href="/pkg/net/http/#ResponseWriter"><code>ResponseWriter</code></a>
+are absorbed by the
+<a href="/pkg/net/http/#Server"><code>Server</code></a>
+and the client receives an empty body as required by the HTTP specification.
+</li>
+
+<li>
+The <a href="/pkg/os/exec/"><code>os/exec</code></a> package's 
+<a href="/pkg/os/exec/#Cmd.StdinPipe"><code>Cmd.StdinPipe</code></a> method 
+returns an <code>io.WriteCloser</code>, but has changed its concrete
+implementation from <code>*os.File</code> to an unexported type that embeds
+<code>*os.File</code>, and it is now safe to close the returned value.
+Before Go 1.2, there was an unavoidable race that this change fixes.
+Code that needs access to the methods of <code>*os.File</code> can use an
+interface type assertion, such as <code>wc.(interface{ Sync() error })</code>.
+</li>
+
+<li>
+The <a href="/pkg/runtime/"><code>runtime</code></a> package relaxes
+the constraints on finalizer functions in
+<a href="/pkg/runtime/#SetFinalizer"><code>SetFinalizer</code></a>: the
+actual argument can now be any type that is assignable to the formal type of
+the function, as is the case for any normal function call in Go.
+</li>
+
+<li>
+The <a href="/pkg/sort/"><code>sort</code></a> package has a new
+<a href="/pkg/sort/#Stable"><code>Stable</code></a> function that implements
+stable sorting. It is less efficient than the normal sort algorithm, however.
+</li>
+
+<li>
+The <a href="/pkg/strings/"><code>strings</code></a> package adds
+an <a href="/pkg/strings/#IndexByte"><code>IndexByte</code></a>
+function for consistency with the <a href="/pkg/bytes/"><code>bytes</code></a> package.
+</li>
+
+<li>
+The <a href="/pkg/sync/atomic/"><code>sync/atomic</code></a> package
+adds a new set of swap functions that atomically exchange the argument with the
+value stored in the pointer, returning the old value.
+The functions are
+<a href="/pkg/sync/atomic/#SwapInt32"><code>SwapInt32</code></a>,
+<a href="/pkg/sync/atomic/#SwapInt64"><code>SwapInt64</code></a>,
+<a href="/pkg/sync/atomic/#SwapUint32"><code>SwapUint32</code></a>,
+<a href="/pkg/sync/atomic/#SwapUint64"><code>SwapUint64</code></a>,
+<a href="/pkg/sync/atomic/#SwapUintptr"><code>SwapUintptr</code></a>,
+and
+<a href="/pkg/sync/atomic/#SwapPointer"><code>SwapPointer</code></a>,
+which swaps an <code>unsafe.Pointer</code>.
+</li>
+
+<li>
+The <a href="/pkg/syscall/"><code>syscall</code></a> package now implements
+<a href="/pkg/syscall/#Sendfile"><code>Sendfile</code></a> for Darwin.
+</li>
+
+<li>
+The <a href="/pkg/testing/"><code>testing</code></a> package
+now exports the <a href="/pkg/testing/#TB"><code>TB</code></a> interface.
+It records the methods in common with the
+<a href="/pkg/testing/#T"><code>T</code></a>
+and
+<a href="/pkg/testing/#B"><code>B</code></a> types,
+to make it easier to share code between tests and benchmarks.
+Also, the
+<a href="/pkg/testing/#AllocsPerRun"><code>AllocsPerRun</code></a>
+function now quantizes the return value to an integer (although it
+still has type <code>float64</code>), to round off any error caused by
+initialization and make the result more repeatable. 
+</li>
+
+<li>
+The <a href="/pkg/text/template/"><code>text/template</code></a> package
+now automatically dereferences pointer values when evaluating the arguments
+to "escape" functions such as "html", to bring the behavior of such functions
+in agreement with that of other printing functions such as "printf".
+</li>
+
+<li>
+In the <a href="/pkg/time/"><code>time</code></a> package, the
+<a href="/pkg/time/#Parse"><code>Parse</code></a> function
+and
+<a href="/pkg/time/#Time.Format"><code>Format</code></a>
+method
+now handle time zone offsets with seconds, such as in the historical
+date "1871-01-01T05:33:02+00:34:08".
+Also, pattern matching in the formats for those routines is stricter: a non-lowercase letter
+must now follow the standard words such as "Jan" and "Mon".
+</li>
+
+<li>
+The <a href="/pkg/unicode/"><code>unicode</code></a> package
+adds <a href="/pkg/unicode/#In"><code>In</code></a>,
+a nicer-to-use but equivalent version of the original
+<a href="/pkg/unicode/#IsOneOf"><code>IsOneOf</code></a>,
+to see whether a character is a member of a Unicode category.
+</li>
+
+</ul>
diff --git a/_content/doc/go1.3.html b/_content/doc/go1.3.html
new file mode 100644
index 0000000..18b3ec6
--- /dev/null
+++ b/_content/doc/go1.3.html
@@ -0,0 +1,608 @@
+<!--{
+	"Title": "Go 1.3 Release Notes",
+	"Path":  "/doc/go1.3",
+	"Template": true
+}-->
+
+<h2 id="introduction">Introduction to Go 1.3</h2>
+
+<p>
+The latest Go release, version 1.3, arrives six months after 1.2,
+and contains no language changes.
+It focuses primarily on implementation work, providing 
+precise garbage collection,
+a major refactoring of the compiler toolchain that results in
+faster builds, especially for large projects,
+significant performance improvements across the board,
+and support for DragonFly BSD, Solaris, Plan 9 and Google's Native Client architecture (NaCl).
+It also has an important refinement to the memory model regarding synchronization.
+As always, Go 1.3 keeps the <a href="/doc/go1compat.html">promise
+of compatibility</a>,
+and almost everything 
+will continue to compile and run without change when moved to 1.3.
+</p>
+
+<h2 id="os">Changes to the supported operating systems and architectures</h2>
+
+<h3 id="win2000">Removal of support for Windows 2000</h3>
+
+<p>
+Microsoft stopped supporting Windows 2000 in 2010.
+Since it has <a href="https://codereview.appspot.com/74790043">implementation difficulties</a>
+regarding exception handling (signals in Unix terminology),
+as of Go 1.3 it is not supported by Go either.
+</p>
+
+<h3 id="dragonfly">Support for DragonFly BSD</h3>
+
+<p>
+Go 1.3 now includes experimental support for DragonFly BSD on the <code>amd64</code> (64-bit x86) and <code>386</code> (32-bit x86) architectures.
+It uses DragonFly BSD 3.6 or above.
+</p>
+
+<h3 id="freebsd">Support for FreeBSD</h3>
+
+<p>
+It was not announced at the time, but since the release of Go 1.2, support for Go on FreeBSD
+requires FreeBSD 8 or above.
+</p>
+
+<p>
+As of Go 1.3, support for Go on FreeBSD requires that the kernel be compiled with the
+<code>COMPAT_FREEBSD32</code> flag configured.
+</p>
+
+<p>
+In concert with the switch to EABI syscalls for ARM platforms, Go 1.3 will run only on FreeBSD 10.
+The x86 platforms, 386 and amd64, are unaffected.
+</p>
+
+<h3 id="nacl">Support for Native Client</h3>
+
+<p>
+Support for the Native Client virtual machine architecture has returned to Go with the 1.3 release.
+It runs on the 32-bit Intel architectures (<code>GOARCH=386</code>) and also on 64-bit Intel, but using
+32-bit pointers (<code>GOARCH=amd64p32</code>).
+There is not yet support for Native Client on ARM.
+Note that this is Native Client (NaCl), not Portable Native Client (PNaCl).
+Details about Native Client are <a href="https://developers.google.com/native-client/dev/">here</a>;
+how to set up the Go version is described <a href="//golang.org/wiki/NativeClient">here</a>.
+</p>
+
+<h3 id="netbsd">Support for NetBSD</h3>
+
+<p>
+As of Go 1.3, support for Go on NetBSD requires NetBSD 6.0 or above.
+</p>
+
+<h3 id="openbsd">Support for OpenBSD</h3>
+
+<p>
+As of Go 1.3, support for Go on OpenBSD requires OpenBSD 5.5 or above.
+</p>
+
+<h3 id="plan9">Support for Plan 9</h3>
+
+<p>
+Go 1.3 now includes experimental support for Plan 9 on the <code>386</code> (32-bit x86) architecture.
+It requires the <code>Tsemacquire</code> syscall, which has been in Plan 9 since June, 2012.
+</p>
+
+<h3 id="solaris">Support for Solaris</h3>
+
+<p>
+Go 1.3 now includes experimental support for Solaris on the <code>amd64</code> (64-bit x86) architecture.
+It requires illumos, Solaris 11 or above.
+</p>
+
+<h2 id="memory">Changes to the memory model</h2>
+
+<p>
+The Go 1.3 memory model <a href="https://codereview.appspot.com/75130045">adds a new rule</a>
+concerning sending and receiving on buffered channels,
+to make explicit that a buffered channel can be used as a simple
+semaphore, using a send into the
+channel to acquire and a receive from the channel to release.
+This is not a language change, just a clarification about an expected property of communication.
+</p>
+
+<h2 id="impl">Changes to the implementations and tools</h2>
+
+<h3 id="stacks">Stack</h3>
+
+<p>
+Go 1.3 has changed the implementation of goroutine stacks away from the old,
+"segmented" model to a contiguous model.
+When a goroutine needs more stack
+than is available, its stack is transferred to a larger single block of memory.
+The overhead of this transfer operation amortizes well and eliminates the old "hot spot"
+problem when a calculation repeatedly steps across a segment boundary.
+Details including performance numbers are in this
+<a href="//golang.org/s/contigstacks">design document</a>.
+</p>
+
+<h3 id="garbage_collector">Changes to the garbage collector</h3>
+
+<p>
+For a while now, the garbage collector has been <em>precise</em> when examining
+values in the heap; the Go 1.3 release adds equivalent precision to values on the stack.
+This means that a non-pointer Go value such as an integer will never be mistaken for a
+pointer and prevent unused memory from being reclaimed.
+</p>
+
+<p>
+Starting with Go 1.3, the runtime assumes that values with pointer type
+contain pointers and other values do not.
+This assumption is fundamental to the precise behavior of both stack expansion
+and garbage collection.
+Programs that use <a href="/pkg/unsafe/">package unsafe</a>
+to store integers in pointer-typed values are illegal and will crash if the runtime detects the behavior.
+Programs that use <a href="/pkg/unsafe/">package unsafe</a> to store pointers
+in integer-typed values are also illegal but more difficult to diagnose during execution.
+Because the pointers are hidden from the runtime, a stack expansion or garbage collection
+may reclaim the memory they point at, creating
+<a href="//en.wikipedia.org/wiki/Dangling_pointer">dangling pointers</a>.
+</p>
+
+<p>
+<em>Updating</em>: Code that uses <code>unsafe.Pointer</code> to convert
+an integer-typed value held in memory into a pointer is illegal and must be rewritten.
+Such code can be identified by <code>go vet</code>.
+</p>
+
+<h3 id="map">Map iteration</h3>
+
+<p>
+Iterations over small maps no longer happen in a consistent order.
+Go 1 defines that &ldquo;<a href="//golang.org/ref/spec#For_statements">The iteration order over maps
+is not specified and is not guaranteed to be the same from one iteration to the next.</a>&rdquo;
+To keep code from depending on map iteration order,
+Go 1.0 started each map iteration at a random index in the map.
+A new map implementation introduced in Go 1.1 neglected to randomize
+iteration for maps with eight or fewer entries, although the iteration order
+can still vary from system to system.
+This has allowed people to write Go 1.1 and Go 1.2 programs that
+depend on small map iteration order and therefore only work reliably on certain systems.
+Go 1.3 reintroduces random iteration for small maps in order to flush out these bugs.
+</p>
+
+<p>
+<em>Updating</em>: If code assumes a fixed iteration order for small maps,
+it will break and must be rewritten not to make that assumption.
+Because only small maps are affected, the problem arises most often in tests.
+</p>
+
+<h3 id="liblink">The linker</h3>
+
+<p>
+As part of the general <a href="//golang.org/s/go13linker">overhaul</a> to
+the Go linker, the compilers and linkers have been refactored.
+The linker is still a C program, but now the instruction selection phase that
+was part of the linker has been moved to the compiler through the creation of a new
+library called <code>liblink</code>.
+By doing instruction selection only once, when the package is first compiled,
+this can speed up compilation of large projects significantly.
+</p>
+
+<p>
+<em>Updating</em>: Although this is a major internal change, it should have no
+effect on programs.
+</p>
+
+<h3 id="gccgo">Status of gccgo</h3>
+
+<p>
+GCC release 4.9 will contain the Go 1.2 (not 1.3) version of gccgo.
+The release schedules for the GCC and Go projects do not coincide,
+which means that 1.3 will be available in the development branch but
+that the next GCC release, 4.10, will likely have the Go 1.4 version of gccgo.
+</p>
+
+<h3 id="gocmd">Changes to the go command</h3>
+
+<p>
+The <a href="/cmd/go/"><code>cmd/go</code></a> command has several new
+features.
+The <a href="/cmd/go/"><code>go run</code></a> and
+<a href="/cmd/go/"><code>go test</code></a> subcommands
+support a new <code>-exec</code> option to specify an alternate
+way to run the resulting binary.
+Its immediate purpose is to support NaCl.
+</p>
+
+<p>
+The test coverage support of the <a href="/cmd/go/"><code>go test</code></a>
+subcommand now automatically sets the coverage mode to <code>-atomic</code>
+when the race detector is enabled, to eliminate false reports about unsafe
+access to coverage counters.
+</p>
+
+<p>
+The <a href="/cmd/go/"><code>go test</code></a> subcommand
+now always builds the package, even if it has no test files.
+Previously, it would do nothing if no test files were present.
+</p>
+
+<p>
+The <a href="/cmd/go/"><code>go build</code></a> subcommand
+supports a new <code>-i</code> option to install dependencies
+of the specified target, but not the target itself.
+</p>
+
+<p>
+Cross compiling with <a href="/cmd/cgo/"><code>cgo</code></a> enabled
+is now supported.
+The CC_FOR_TARGET and CXX_FOR_TARGET environment
+variables are used when running all.bash to specify the cross compilers
+for C and C++ code, respectively.
+</p>
+
+<p>
+Finally, the go command now supports packages that import Objective-C
+files (suffixed <code>.m</code>) through cgo.
+</p>
+
+<h3 id="cgo">Changes to cgo</h3>
+
+<p>
+The <a href="/cmd/cgo/"><code>cmd/cgo</code></a> command,
+which processes <code>import "C"</code> declarations in Go packages,
+has corrected a serious bug that may cause some packages to stop compiling.
+Previously, all pointers to incomplete struct types translated to the Go type <code>*[0]byte</code>,
+with the effect that the Go compiler could not diagnose passing one kind of struct pointer
+to a function expecting another.
+Go 1.3 corrects this mistake by translating each different
+incomplete struct to a different named type.
+</p>
+
+<p>
+Given the C declaration <code>typedef struct S T</code> for an incomplete <code>struct S</code>,
+some Go code used this bug to refer to the types <code>C.struct_S</code> and <code>C.T</code> interchangeably.
+Cgo now explicitly allows this use, even for completed struct types.
+However, some Go code also used this bug to pass (for example) a <code>*C.FILE</code>
+from one package to another.
+This is not legal and no longer works: in general Go packages
+should avoid exposing C types and names in their APIs.
+</p>
+
+<p>
+<em>Updating</em>: Code confusing pointers to incomplete types or
+passing them across package boundaries will no longer compile
+and must be rewritten.
+If the conversion is correct and must be preserved,
+use an explicit conversion via <a href="/pkg/unsafe/#Pointer"><code>unsafe.Pointer</code></a>.
+</p>
+
+<h3 id="swig">SWIG 3.0 required for programs that use SWIG</h3>
+
+<p>
+For Go programs that use SWIG, SWIG version 3.0 is now required.
+The <a href="/cmd/go"><code>cmd/go</code></a> command will now link the
+SWIG generated object files directly into the binary, rather than
+building and linking with a shared library.
+</p>
+
+<h3 id="gc_flag">Command-line flag parsing</h3>
+
+<p>
+In the gc toolchain, the assemblers now use the
+same command-line flag parsing rules as the Go flag package, a departure
+from the traditional Unix flag parsing.
+This may affect scripts that invoke the tool directly.
+For example,
+<code>go tool 6a -SDfoo</code> must now be written
+<code>go tool 6a -S -D foo</code>.
+(The same change was made to the compilers and linkers in <a href="/doc/go1.1#gc_flag">Go 1.1</a>.)
+</p>
+
+<h3 id="godoc">Changes to godoc</h3>
+<p>
+When invoked with the <code>-analysis</code> flag, 
+<a href="//godoc.org/golang.org/x/tools/cmd/godoc">godoc</a>
+now performs sophisticated <a href="/lib/godoc/analysis/help.html">static
+analysis</a> of the code it indexes.  
+The results of analysis are presented in both the source view and the
+package documentation view, and include the call graph of each package
+and the relationships between 
+definitions and references,
+types and their methods,
+interfaces and their implementations,
+send and receive operations on channels,
+functions and their callers, and
+call sites and their callees.
+</p>
+
+<h3 id="misc">Miscellany</h3>
+
+<p>
+The program <code>misc/benchcmp</code> that compares
+performance across benchmarking runs has been rewritten.
+Once a shell and awk script in the main repository, it is now a Go program in the <code>go.tools</code> repo.
+Documentation is <a href="//godoc.org/golang.org/x/tools/cmd/benchcmp">here</a>.
+</p>
+
+<p>
+For the few of us that build Go distributions, the tool <code>misc/dist</code> has been
+moved and renamed; it now lives in <code>misc/makerelease</code>, still in the main repository.
+</p>
+
+<h2 id="performance">Performance</h2>
+
+<p>
+The performance of Go binaries for this release has improved in many cases due to changes
+in the runtime and garbage collection, plus some changes to libraries.
+Significant instances include:
+</p>
+
+<ul> 
+
+<li>
+The runtime handles defers more efficiently, reducing the memory footprint by about two kilobytes
+per goroutine that calls defer.
+</li>
+
+<li>
+The garbage collector has been sped up, using a concurrent sweep algorithm,
+better parallelization, and larger pages.
+The cumulative effect can be a 50-70% reduction in collector pause time.
+</li>
+
+<li>
+The race detector (see <a href="/doc/articles/race_detector.html">this guide</a>)
+is now about 40% faster.
+</li>
+
+<li>
+The regular expression package <a href="/pkg/regexp/"><code>regexp</code></a>
+is now significantly faster for certain simple expressions due to the implementation of
+a second, one-pass execution engine.
+The choice of which engine to use is automatic;
+the details are hidden from the user.
+</li>
+
+</ul>
+
+<p>
+Also, the runtime now includes in stack dumps how long a goroutine has been blocked,
+which can be useful information when debugging deadlocks or performance issues.
+</p>
+
+<h2 id="library">Changes to the standard library</h2>
+
+<h3 id="new_packages">New packages</h3>
+
+<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="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>
+
+<p>
+A previous bug in <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a>
+made it possible to skip verification in TLS inadvertently.
+In Go 1.3, the bug is fixed: one must specify either ServerName or
+InsecureSkipVerify, and if ServerName is specified it is enforced.
+This may break existing code that incorrectly depended on insecure
+behavior.
+</p>
+
+<p>
+There is an important new type added to the standard library: <a href="/pkg/sync/#Pool"><code>sync.Pool</code></a>.
+It provides an efficient mechanism for implementing certain types of caches whose memory
+can be reclaimed automatically by the system.
+</p>
+
+<p>
+The <a href="/pkg/testing/"><code>testing</code></a> package's benchmarking helper,
+<a href="/pkg/testing/#B"><code>B</code></a>, now has a
+<a href="/pkg/testing/#B.RunParallel"><code>RunParallel</code></a> method
+to make it easier to run benchmarks that exercise multiple CPUs.
+</p>
+
+<p>
+<em>Updating</em>: The crypto/tls fix may break existing code, but such
+code was erroneous and should be updated.
+</p>
+
+<h3 id="minor_library_changes">Minor changes to the library</h3>
+
+<p>
+The following list summarizes a number of minor changes to the library, mostly additions.
+See the relevant package documentation for more information about each change.
+</p>
+
+<ul>
+
+<li> In the <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package,
+a new <a href="/pkg/crypto/tls/#DialWithDialer"><code>DialWithDialer</code></a>
+function lets one establish a TLS connection using an existing dialer, making it easier
+to control dial options such as timeouts.
+The package also now reports the TLS version used by the connection in the
+<a href="/pkg/crypto/tls/#ConnectionState"><code>ConnectionState</code></a>
+struct.
+</li>
+
+<li> The <a href="/pkg/crypto/x509/#CreateCertificate"><code>CreateCertificate</code></a>
+function of the <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package
+now supports parsing (and elsewhere, serialization) of PKCS #10 certificate
+signature requests.
+</li>
+
+<li>
+The formatted print functions of the <code>fmt</code> package now define <code>%F</code>
+as a synonym for <code>%f</code> when printing floating-point values.
+</li>
+
+<li>
+The <a href="/pkg/math/big/"><code>math/big</code></a> package's
+<a href="/pkg/math/big/#Int"><code>Int</code></a> and
+<a href="/pkg/math/big/#Rat"><code>Rat</code></a> types
+now implement
+<a href="/pkg/encoding/#TextMarshaler"><code>encoding.TextMarshaler</code></a> and
+<a href="/pkg/encoding/#TextUnmarshaler"><code>encoding.TextUnmarshaler</code></a>.
+</li>
+
+<li>
+The complex power function, <a href="/pkg/math/cmplx/#Pow"><code>Pow</code></a>,
+now specifies the behavior when the first argument is zero.
+It was undefined before.
+The details are in the <a href="/pkg/math/cmplx/#Pow">documentation for the function</a>.
+</li>
+
+<li>
+The <a href="/pkg/net/http/"><code>net/http</code></a> package now exposes the
+properties of a TLS connection used to make a client request in the new
+<a href="/pkg/net/http/#Response"><code>Response.TLS</code></a> field.
+</li>
+
+<li>
+The <a href="/pkg/net/http/"><code>net/http</code></a> package now
+allows setting an optional server error logger
+with <a href="/pkg/net/http/#Server"><code>Server.ErrorLog</code></a>.
+The default is still that all errors go to stderr.
+</li>
+
+<li>
+The <a href="/pkg/net/http/"><code>net/http</code></a> package now
+supports disabling HTTP keep-alive connections on the server
+with <a href="/pkg/net/http/#Server.SetKeepAlivesEnabled"><code>Server.SetKeepAlivesEnabled</code></a>.
+The default continues to be that the server does keep-alive (reuses
+connections for multiple requests) by default.
+Only resource-constrained servers or those in the process of graceful
+shutdown will want to disable them.
+</li>
+
+<li>
+The <a href="/pkg/net/http/"><code>net/http</code></a> package adds an optional
+<a href="/pkg/net/http/#Transport"><code>Transport.TLSHandshakeTimeout</code></a>
+setting to cap the amount of time HTTP client requests will wait for
+TLS handshakes to complete.
+It's now also set by default
+on <a href="/pkg/net/http#DefaultTransport"><code>DefaultTransport</code></a>.
+</li>
+
+<li>
+The <a href="/pkg/net/http/"><code>net/http</code></a> package's
+<a href="/pkg/net/http/#DefaultTransport"><code>DefaultTransport</code></a>,
+used by the HTTP client code, now
+enables <a href="http://en.wikipedia.org/wiki/Keepalive#TCP_keepalive">TCP
+keep-alives</a> by default.
+Other <a href="/pkg/net/http/#Transport"><code>Transport</code></a>
+values with a nil <code>Dial</code> field continue to function the same
+as before: no TCP keep-alives are used.
+</li>
+
+<li>
+The <a href="/pkg/net/http/"><code>net/http</code></a> package
+now enables <a href="http://en.wikipedia.org/wiki/Keepalive#TCP_keepalive">TCP
+keep-alives</a> for incoming server requests when
+<a href="/pkg/net/http/#ListenAndServe"><code>ListenAndServe</code></a>
+or
+<a href="/pkg/net/http/#ListenAndServeTLS"><code>ListenAndServeTLS</code></a>
+are used.
+When a server is started otherwise, TCP keep-alives are not enabled.
+</li>
+
+<li>
+The <a href="/pkg/net/http/"><code>net/http</code></a> package now
+provides an
+optional <a href="/pkg/net/http/#Server"><code>Server.ConnState</code></a>
+callback to hook various phases of a server connection's lifecycle
+(see <a href="/pkg/net/http/#ConnState"><code>ConnState</code></a>).
+This can be used to implement rate limiting or graceful shutdown.
+</li>
+
+<li>
+The <a href="/pkg/net/http/"><code>net/http</code></a> package's HTTP
+client now has an
+optional <a href="/pkg/net/http/#Client"><code>Client.Timeout</code></a>
+field to specify an end-to-end timeout on requests made using the
+client.
+</li>
+
+<li>
+The <a href="/pkg/net/http/"><code>net/http</code></a> package's
+<a href="/pkg/net/http/#Request.ParseMultipartForm"><code>Request.ParseMultipartForm</code></a>
+method will now return an error if the body's <code>Content-Type</code>
+is not <code>multipart/form-data</code>.
+Prior to Go 1.3 it would silently fail and return <code>nil</code>.
+Code that relies on the previous behavior should be updated.
+</li>
+
+<li> In the <a href="/pkg/net/"><code>net</code></a> package,
+the <a href="/pkg/net/#Dialer"><code>Dialer</code></a> struct now
+has a <code>KeepAlive</code> option to specify a keep-alive period for the connection.
+</li>
+
+<li>
+The <a href="/pkg/net/http/"><code>net/http</code></a> package's 
+<a href="/pkg/net/http/#Transport"><code>Transport</code></a>
+now closes <a href="/pkg/net/http/#Request"><code>Request.Body</code></a>
+consistently, even on error.
+</li>
+
+<li>
+The <a href="/pkg/os/exec/"><code>os/exec</code></a> package now implements
+what the documentation has always said with regard to relative paths for the binary.
+In particular, it only calls <a href="/pkg/os/exec/#LookPath"><code>LookPath</code></a>
+when the binary's file name contains no path separators.
+</li>
+
+<li>
+The <a href="/pkg/reflect/#Value.SetMapIndex"><code>SetMapIndex</code></a>
+function in the <a href="/pkg/reflect/"><code>reflect</code></a> package
+no longer panics when deleting from a <code>nil</code> map.
+</li>
+
+<li>
+If the main goroutine calls 
+<a href="/pkg/runtime/#Goexit"><code>runtime.Goexit</code></a>
+and all other goroutines finish execution, the program now always crashes,
+reporting a detected deadlock.
+Earlier versions of Go handled this situation inconsistently: most instances
+were reported as deadlocks, but some trivial cases exited cleanly instead.
+</li>
+
+<li>
+The runtime/debug package now has a new function
+<a href="/pkg/runtime/debug/#WriteHeapDump"><code>debug.WriteHeapDump</code></a>
+that writes out a description of the heap.
+</li>
+
+<li>
+The <a href="/pkg/strconv/#CanBackquote"><code>CanBackquote</code></a>
+function in the <a href="/pkg/strconv/"><code>strconv</code></a> package
+now considers the <code>DEL</code> character, <code>U+007F</code>, to be
+non-printing.
+</li>
+
+<li>
+The <a href="/pkg/syscall/"><code>syscall</code></a> package now provides
+<a href="/pkg/syscall/#SendmsgN"><code>SendmsgN</code></a>
+as an alternate version of
+<a href="/pkg/syscall/#Sendmsg"><code>Sendmsg</code></a>
+that returns the number of bytes written.
+</li>
+
+<li>
+On Windows, the <a href="/pkg/syscall/"><code>syscall</code></a> package now
+supports the cdecl calling convention through the addition of a new function
+<a href="/pkg/syscall/#NewCallbackCDecl"><code>NewCallbackCDecl</code></a>
+alongside the existing function
+<a href="/pkg/syscall/#NewCallback"><code>NewCallback</code></a>.
+</li>
+
+<li>
+The <a href="/pkg/testing/"><code>testing</code></a> package now
+diagnoses tests that call <code>panic(nil)</code>, which are almost always erroneous.
+Also, tests now write profiles (if invoked with profiling flags) even on failure.
+</li>
+
+<li>
+The <a href="/pkg/unicode/"><code>unicode</code></a> package and associated
+support throughout the system has been upgraded from
+Unicode 6.2.0 to <a href="http://www.unicode.org/versions/Unicode6.3.0/">Unicode 6.3.0</a>.
+</li>
+
+</ul>
diff --git a/_content/doc/go1.4.html b/_content/doc/go1.4.html
new file mode 100644
index 0000000..c8f7c9c
--- /dev/null
+++ b/_content/doc/go1.4.html
@@ -0,0 +1,896 @@
+<!--{
+	"Title": "Go 1.4 Release Notes",
+	"Path":  "/doc/go1.4",
+	"Template": true
+}-->
+
+<h2 id="introduction">Introduction to Go 1.4</h2>
+
+<p>
+The latest Go release, version 1.4, arrives as scheduled six months after 1.3.
+</p>
+
+<p>
+It contains only one tiny language change,
+in the form of a backwards-compatible simple variant of <code>for</code>-<code>range</code> loop,
+and a possibly breaking change to the compiler involving methods on pointers-to-pointers.
+</p>
+
+<p>
+The release focuses primarily on implementation work, improving the garbage collector
+and preparing the ground for a fully concurrent collector to be rolled out in the
+next few releases.
+Stacks are now contiguous, reallocated when necessary rather than linking on new
+"segments";
+this release therefore eliminates the notorious "hot stack split" problem.
+There are some new tools available including support in the <code>go</code> command
+for build-time source code generation.
+The release also adds support for ARM processors on Android and Native Client (NaCl)
+and for AMD64 on Plan 9.
+</p>
+
+<p>
+As always, Go 1.4 keeps the <a href="/doc/go1compat.html">promise
+of compatibility</a>,
+and almost everything 
+will continue to compile and run without change when moved to 1.4.
+</p>
+
+<h2 id="language">Changes to the language</h2>
+
+<h3 id="forrange">For-range loops</h3>
+<p>
+Up until Go 1.3, <code>for</code>-<code>range</code> loop had two forms
+</p>
+
+<pre>
+for i, v := range x {
+	...
+}
+</pre>
+
+<p>
+and
+</p>
+
+<pre>
+for i := range x {
+	...
+}
+</pre>
+
+<p>
+If one was not interested in the loop values, only the iteration itself, it was still
+necessary to mention a variable (probably the <a href="/ref/spec#Blank_identifier">blank identifier</a>, as in
+<code>for</code> <code>_</code> <code>=</code> <code>range</code> <code>x</code>), because
+the form
+</p>
+
+<pre>
+for range x {
+	...
+}
+</pre>
+
+<p>
+was not syntactically permitted.
+</p>
+
+<p>
+This situation seemed awkward, so as of Go 1.4 the variable-free form is now legal.
+The pattern arises rarely but the code can be cleaner when it does.
+</p>
+
+<p>
+<em>Updating</em>: The change is strictly backwards compatible to existing Go
+programs, but tools that analyze Go parse trees may need to be modified to accept
+this new form as the
+<code>Key</code> field of <a href="/pkg/go/ast/#RangeStmt"><code>RangeStmt</code></a>
+may now be <code>nil</code>.
+</p>
+
+<h3 id="methodonpointertopointer">Method calls on **T</h3>
+
+<p>
+Given these declarations,
+</p>
+
+<pre>
+type T int
+func (T) M() {}
+var x **T
+</pre>
+
+<p>
+both <code>gc</code> and <code>gccgo</code> accepted the method call
+</p>
+
+<pre>
+x.M()
+</pre>
+
+<p>
+which is a double dereference of the pointer-to-pointer <code>x</code>.
+The Go specification allows a single dereference to be inserted automatically,
+but not two, so this call is erroneous according to the language definition.
+It has therefore been disallowed in Go 1.4, which is a breaking change,
+although very few programs will be affected.
+</p>
+
+<p>
+<em>Updating</em>: Code that depends on the old, erroneous behavior will no longer
+compile but is easy to fix by adding an explicit dereference.
+</p>
+
+<h2 id="os">Changes to the supported operating systems and architectures</h2>
+
+<h3 id="android">Android</h3>
+
+<p>
+Go 1.4 can build binaries for ARM processors running the Android operating system.
+It can also build a <code>.so</code> library that can be loaded by an Android application
+using the supporting packages in the <a href="https://golang.org/x/mobile">mobile</a> subrepository.
+A brief description of the plans for this experimental port are available
+<a href="https://golang.org/s/go14android">here</a>.
+</p>
+
+<h3 id="naclarm">NaCl on ARM</h3>
+
+<p>
+The previous release introduced Native Client (NaCl) support for the 32-bit x86
+(<code>GOARCH=386</code>)
+and 64-bit x86 using 32-bit pointers (GOARCH=amd64p32).
+The 1.4 release adds NaCl support for ARM (GOARCH=arm).
+</p>
+
+<h3 id="plan9amd64">Plan9 on AMD64</h3>
+
+<p>
+This release adds support for the Plan 9 operating system on AMD64 processors,
+provided the kernel supports the <code>nsec</code> system call and uses 4K pages.
+</p>
+
+<h2 id="compatibility">Changes to the compatibility guidelines</h2>
+
+<p>
+The <a href="/pkg/unsafe/"><code>unsafe</code></a> package allows one
+to defeat Go's type system by exploiting internal details of the implementation
+or machine representation of data.
+It was never explicitly specified what use of <code>unsafe</code> meant
+with respect to compatibility as specified in the
+<a href="go1compat.html">Go compatibility guidelines</a>.
+The answer, of course, is that we can make no promise of compatibility
+for code that does unsafe things.
+</p>
+
+<p>
+We have clarified this situation in the documentation included in the release.
+The <a href="go1compat.html">Go compatibility guidelines</a> and the
+docs for the <a href="/pkg/unsafe/"><code>unsafe</code></a> package
+are now explicit that unsafe code is not guaranteed to remain compatible.
+</p>
+  
+<p>
+<em>Updating</em>: Nothing technical has changed; this is just a clarification
+of the documentation.
+</p>
+
+
+<h2 id="impl">Changes to the implementations and tools</h2>
+
+<h3 id="runtime">Changes to the runtime</h3>
+
+<p>
+Prior to Go 1.4, the runtime (garbage collector, concurrency support, interface management,
+maps, slices, strings, ...) was mostly written in C, with some assembler support.
+In 1.4, much of the code has been translated to Go so that the garbage collector can scan
+the stacks of programs in the runtime and get accurate information about what variables
+are active.
+This change was large but should have no semantic effect on programs.
+</p>
+
+<p>
+This rewrite allows the garbage collector in 1.4 to be fully precise,
+meaning that it is aware of the location of all active pointers in the program.
+This means the heap will be smaller as there will be no false positives keeping non-pointers alive.
+Other related changes also reduce the heap size, which is smaller by 10%-30% overall
+relative to the previous release.
+</p>
+
+<p>
+A consequence is that stacks are no longer segmented, eliminating the "hot split" problem.
+When a stack limit is reached, a new, larger stack is allocated, all active frames for
+the goroutine are copied there, and any pointers into the stack are updated.
+Performance can be noticeably better in some cases and is always more predictable.
+Details are available in <a href="https://golang.org/s/contigstacks">the design document</a>.
+</p>
+
+<p>
+The use of contiguous stacks means that stacks can start smaller without triggering performance issues,
+so the default starting size for a goroutine's stack in 1.4 has been reduced from 8192 bytes to 2048 bytes.
+</p>
+
+<p>
+As preparation for the concurrent garbage collector scheduled for the 1.5 release,
+writes to pointer values in the heap are now done by a function call,
+called a write barrier, rather than directly from the function updating the value.
+In this next release, this will permit the garbage collector to mediate writes to the heap while it is running.
+This change has no semantic effect on programs in 1.4, but was
+included in the release to test the compiler and the resulting performance.
+</p>
+
+<p>
+The implementation of interface values has been modified.
+In earlier releases, the interface contained a word that was either a pointer or a one-word
+scalar value, depending on the type of the concrete object stored.
+This implementation was problematical for the garbage collector,
+so as of 1.4 interface values always hold a pointer.
+In running programs, most interface values were pointers anyway,
+so the effect is minimal, but programs that store integers (for example) in
+interfaces will see more allocations.
+</p>
+
+<p>
+As of Go 1.3, the runtime crashes if it finds a memory word that should contain
+a valid pointer but instead contains an obviously invalid pointer (for example, the value 3).
+Programs that store integers in pointer values may run afoul of this check and crash.
+In Go 1.4, setting the <a href="/pkg/runtime/"><code>GODEBUG</code></a> variable
+<code>invalidptr=0</code> disables
+the crash as a workaround, but we cannot guarantee that future releases will be
+able to avoid the crash; the correct fix is to rewrite code not to alias integers and pointers.
+</p>
+
+<h3 id="asm">Assembly</h3>
+
+<p>
+The language accepted by the assemblers <code>cmd/5a</code>, <code>cmd/6a</code>
+and <code>cmd/8a</code> has had several changes,
+mostly to make it easier to deliver type information to the runtime.
+</p>
+
+<p>
+First, the <code>textflag.h</code> file that defines flags for <code>TEXT</code> directives
+has been copied from the linker source directory to a standard location so it can be
+included with the simple directive
+</p>
+
+<pre>
+#include "textflag.h"
+</pre>
+
+<p>
+The more important changes are in how assembler source can define the necessary
+type information.
+For most programs it will suffice to move data
+definitions (<code>DATA</code> and <code>GLOBL</code> directives)
+out of assembly into Go files
+and to write a Go declaration for each assembly function.
+The <a href="/doc/asm#runtime">assembly document</a> describes what to do.
+</p>
+
+<p>
+<em>Updating</em>:
+Assembly files that include <code>textflag.h</code> from its old
+location will still work, but should be updated.
+For the type information, most assembly routines will need no change,
+but all should be examined.
+Assembly source files that define data,
+functions with non-empty stack frames, or functions that return pointers
+need particular attention.
+A description of the necessary (but simple) changes
+is in the <a href="/doc/asm#runtime">assembly document</a>.
+</p>
+
+<p>
+More information about these changes is in the <a href="/doc/asm">assembly document</a>.
+</p>
+
+<h3 id="gccgo">Status of gccgo</h3>
+
+<p>
+The release schedules for the GCC and Go projects do not coincide.
+GCC release 4.9 contains the Go 1.2 version of gccgo.
+The next release, GCC 5, will likely have the Go 1.4 version of gccgo.
+</p>
+
+<h3 id="internalpackages">Internal packages</h3>
+
+<p>
+Go's package system makes it easy to structure programs into components with clean boundaries,
+but there are only two forms of access: local (unexported) and global (exported).
+Sometimes one wishes to have components that are not exported,
+for instance to avoid acquiring clients of interfaces to code that is part of a public repository
+but not intended for use outside the program to which it belongs.
+</p>
+
+<p>
+The Go language does not have the power to enforce this distinction, but as of Go 1.4 the
+<a href="/cmd/go/"><code>go</code></a> command introduces
+a mechanism to define "internal" packages that may not be imported by packages outside
+the source subtree in which they reside.
+</p>
+
+<p>
+To create such a package, place it in a directory named <code>internal</code> or in a subdirectory of a directory
+named internal.
+When the <code>go</code> command sees an import of a package with <code>internal</code> in its path,
+it verifies that the package doing the import
+is within the tree rooted at the parent of the <code>internal</code> directory.
+For example, a package <code>.../a/b/c/internal/d/e/f</code>
+can be imported only by code in the directory tree rooted at <code>.../a/b/c</code>.
+It cannot be imported by code in <code>.../a/b/g</code> or in any other repository.
+</p>
+
+<p>
+For Go 1.4, the internal package mechanism is enforced for the main Go repository;
+from 1.5 and onward it will be enforced for any repository.
+</p>
+
+<p>
+Full details of the mechanism are in
+<a href="https://golang.org/s/go14internal">the design document</a>.
+</p>
+
+<h3 id="canonicalimports">Canonical import paths</h3>
+
+<p>
+Code often lives in repositories hosted by public services such as <code>github.com</code>,
+meaning that the import paths for packages begin with the name of the hosting service,
+<code>github.com/rsc/pdf</code> for example.
+One can use
+<a href="/cmd/go/#hdr-Remote_import_paths">an existing mechanism</a>
+to provide a "custom" or "vanity" import path such as
+<code>rsc.io/pdf</code>, but
+that creates two valid import paths for the package.
+That is a problem: one may inadvertently import the package through the two
+distinct paths in a single program, which is wasteful;
+miss an update to a package because the path being used is not recognized to be
+out of date;
+or break clients using the old path by moving the package to a different hosting service.
+</p>
+
+<p>
+Go 1.4 introduces an annotation for package clauses in Go source that identify a canonical
+import path for the package.
+If an import is attempted using a path that is not canonical,
+the <a href="/cmd/go/"><code>go</code></a> command
+will refuse to compile the importing package.
+</p>
+
+<p>
+The syntax is simple: put an identifying comment on the package line.
+For our example, the package clause would read:
+</p>
+
+<pre>
+package pdf // import "rsc.io/pdf"
+</pre>
+
+<p>
+With this in place,
+the <code>go</code> command will
+refuse to compile a package that imports <code>github.com/rsc/pdf</code>, 
+ensuring that the code can be moved without breaking users.
+</p>
+
+<p>
+The check is at build time, not download time, so if <code>go</code> <code>get</code>
+fails because of this check, the mis-imported package has been copied to the local machine
+and should be removed manually.
+</p>
+
+<p>
+To complement this new feature, a check has been added at update time to verify
+that the local package's remote repository matches that of its custom import.
+The <code>go</code> <code>get</code> <code>-u</code> command will fail to
+update a package if its remote repository has changed since it was first
+downloaded.
+The new <code>-f</code> flag overrides this check.
+</p>
+
+<p>
+Further information is in
+<a href="https://golang.org/s/go14customimport">the design document</a>.
+</p>
+
+<h3 id="subrepo">Import paths for the subrepositories</h3>
+
+<p>
+The Go project subrepositories (<code>code.google.com/p/go.tools</code> and so on)
+are now available under custom import paths replacing <code>code.google.com/p/go.</code> with <code>golang.org/x/</code>,
+as in <code>golang.org/x/tools</code>.
+We will add canonical import comments to the code around June 1, 2015,
+at which point Go 1.4 and later will stop accepting the old <code>code.google.com</code> paths.
+</p>
+
+<p>
+<em>Updating</em>: All code that imports from subrepositories should change
+to use the new <code>golang.org</code> paths.
+Go 1.0 and later can resolve and import the new paths, so updating will not break
+compatibility with older releases.
+Code that has not updated will stop compiling with Go 1.4 around June 1, 2015.
+</p>
+
+<h3 id="gogenerate">The go generate subcommand</h3>
+
+<p>
+The <a href="/cmd/go/"><code>go</code></a> command has a new subcommand,
+<a href="/cmd/go/#hdr-Generate_Go_files_by_processing_source"><code>go generate</code></a>,
+to automate the running of tools to generate source code before compilation.
+For example, it can be used to run the <a href="/cmd/yacc"><code>yacc</code></a>
+compiler-compiler on a <code>.y</code> file to produce the Go source file implementing the grammar,
+or to automate the generation of <code>String</code> methods for typed constants using the new
+<a href="https://godoc.org/golang.org/x/tools/cmd/stringer">stringer</a>
+tool in the <code>golang.org/x/tools</code> subrepository.
+</p>
+
+<p>
+For more information, see the 
+<a href="https://golang.org/s/go1.4-generate">design document</a>.
+</p>
+
+<h3 id="filenames">Change to file name handling</h3>
+
+<p>
+Build constraints, also known as build tags, control compilation by including or excluding files
+(see the documentation <a href="/pkg/go/build/"><code>/go/build</code></a>).
+Compilation can also be controlled by the name of the file itself by "tagging" the file with
+a suffix (before the <code>.go</code> or <code>.s</code> extension) with an underscore
+and the name of the architecture or operating system.
+For instance, the file <code>gopher_arm.go</code> will only be compiled if the target
+processor is an ARM.
+</p>
+
+<p>
+Before Go 1.4, a file called just <code>arm.go</code> was similarly tagged, but this behavior
+can break sources when new architectures are added, causing files to suddenly become tagged.
+In 1.4, therefore, a file will be tagged in this manner only if the tag (architecture or operating
+system name) is preceded by an underscore.
+</p>
+
+<p>
+<em>Updating</em>: Packages that depend on the old behavior will no longer compile correctly.
+Files with names like <code>windows.go</code> or <code>amd64.go</code> should either
+have explicit build tags added to the source or be renamed to something like
+<code>os_windows.go</code> or <code>support_amd64.go</code>.
+</p>
+
+<h3 id="gocmd">Other changes to the go command</h3>
+
+<p>
+There were a number of minor changes to the
+<a href="/cmd/go/"><code>cmd/go</code></a>
+command worth noting.
+</p>
+
+<ul>
+
+<li>
+Unless <a href="/cmd/cgo/"><code>cgo</code></a> is being used to build the package,
+the <code>go</code> command now refuses to compile C source files,
+since the relevant C compilers
+(<a href="/cmd/6c/"><code>6c</code></a> etc.)
+are intended to be removed from the installation in some future release.
+(They are used today only to build part of the runtime.)
+It is difficult to use them correctly in any case, so any extant uses are likely incorrect,
+so we have disabled them.
+</li>
+
+<li>
+The <a href="/cmd/go/#hdr-Test_packages"><code>go</code> <code>test</code></a>
+subcommand has a new flag, <code>-o</code>, to set the name of the resulting binary,
+corresponding to the same flag in other subcommands.
+The non-functional <code>-file</code> flag has been removed.
+</li>
+
+<li>
+The <a href="/cmd/go/#hdr-Test_packages"><code>go</code> <code>test</code></a>
+subcommand will compile and link all <code>*_test.go</code> files in the package,
+even when there are no <code>Test</code> functions in them. 
+It previously ignored such files.
+</li>
+
+<li>
+The behavior of the
+<a href="/cmd/go/#hdr-Test_packages"><code>go</code> <code>build</code></a>
+subcommand's
+<code>-a</code> flag has been changed for non-development installations.
+For installations running a released distribution, the <code>-a</code> flag will no longer
+rebuild the standard library and commands, to avoid overwriting the installation's files.
+</li>
+
+</ul>
+
+<h3 id="pkg">Changes to package source layout</h3>
+
+<p>
+In the main Go source repository, the source code for the packages was kept in
+the directory <code>src/pkg</code>, which made sense but differed from
+other repositories, including the Go subrepositories.
+In Go 1.4, the<code> pkg</code> level of the source tree is now gone, so for example
+the <a href="/pkg/fmt/"><code>fmt</code></a> package's source, once kept in
+directory <code>src/pkg/fmt</code>, now lives one level higher in <code>src/fmt</code>.
+</p>
+
+<p>
+<em>Updating</em>: Tools like <code>godoc</code> that discover source code
+need to know about the new location. All tools and services maintained by the Go team
+have been updated.
+</p>
+
+
+<h3 id="swig">SWIG</h3>
+
+<p>
+Due to runtime changes in this release, Go 1.4 requires SWIG 3.0.3.
+</p>
+
+<h3 id="misc">Miscellany</h3>
+
+<p>
+The standard repository's top-level <code>misc</code> directory used to contain
+Go support for editors and IDEs: plugins, initialization scripts and so on.
+Maintaining these was becoming time-consuming
+and needed external help because many of the editors listed were not used by
+members of the core team.
+It also required us to make decisions about which plugin was best for a given
+editor, even for editors we do not use.
+</p>
+
+<p>
+The Go community at large is much better suited to managing this information.
+In Go 1.4, therefore, this support has been removed from the repository.
+Instead, there is a curated, informative list of what's available on
+a <a href="//golang.org/wiki/IDEsAndTextEditorPlugins">wiki page</a>.
+</p>
+
+<h2 id="performance">Performance</h2>
+
+<p>
+Most programs will run about the same speed or slightly faster in 1.4 than in 1.3;
+some will be slightly slower.
+There are many changes, making it hard to be precise about what to expect.
+</p>
+
+<p>
+As mentioned above, much of the runtime was translated to Go from C,
+which led to some reduction in heap sizes.
+It also improved performance slightly because the Go compiler is better
+at optimization, due to things like inlining, than the C compiler used to build
+the runtime.
+</p>
+
+<p>
+The garbage collector was sped up, leading to measurable improvements for
+garbage-heavy programs.
+On the other hand, the new write barriers slow things down again, typically
+by about the same amount but, depending on their behavior, some programs
+may be somewhat slower or faster.
+</p>
+
+<p>
+Library changes that affect performance are documented below.
+</p>
+
+<h2 id="library">Changes to the standard library</h2>
+
+<h3 id="new_packages">New packages</h3>
+
+<p>
+There are no new packages in this release.
+</p>
+
+<h3 id="major_library_changes">Major changes to the library</h3>
+
+<h4 id="scanner">bufio.Scanner</h4>
+
+<p>
+The <a href="/pkg/bufio/#Scanner"><code>Scanner</code></a> type in the
+<a href="/pkg/bufio/"><code>bufio</code></a> package
+has had a bug fixed that may require changes to custom
+<a href="/pkg/bufio/#SplitFunc"><code>split functions</code></a>. 
+The bug made it impossible to generate an empty token at EOF; the fix
+changes the end conditions seen by the split function.
+Previously, scanning stopped at EOF if there was no more data.
+As of 1.4, the split function will be called once at EOF after input is exhausted,
+so the split function can generate a final empty token
+as the documentation already promised.
+</p>
+
+<p>
+<em>Updating</em>: Custom split functions may need to be modified to
+handle empty tokens at EOF as desired.
+</p>
+
+<h4 id="syscall">syscall</h4>
+
+<p>
+The <a href="/pkg/syscall/"><code>syscall</code></a> package is now frozen except
+for changes needed to maintain the core repository.
+In particular, it will no longer be extended to support new or different system calls
+that are not used by the core.
+The reasons are described at length in <a href="https://golang.org/s/go1.4-syscall">a
+separate document</a>.
+</p>
+
+<p>
+A new subrepository, <a href="https://golang.org/x/sys">golang.org/x/sys</a>,
+has been created to serve as the location for new developments to support system
+calls on all kernels.
+It has a nicer structure, with three packages that each hold the implementation of
+system calls for one of
+<a href="https://godoc.org/golang.org/x/sys/unix">Unix</a>,
+<a href="https://godoc.org/golang.org/x/sys/windows">Windows</a> and
+<a href="https://godoc.org/golang.org/x/sys/plan9">Plan 9</a>.
+These packages will be curated more generously, accepting all reasonable changes
+that reflect kernel interfaces in those operating systems.
+See the documentation and the article mentioned above for more information.
+</p>
+
+<p>
+<em>Updating</em>: Existing programs are not affected as the <code>syscall</code>
+package is largely unchanged from the 1.3 release.
+Future development that requires system calls not in the <code>syscall</code> package
+should build on <code>golang.org/x/sys</code> instead.
+</p>
+
+<h3 id="minor_library_changes">Minor changes to the library</h3>
+
+<p>
+The following list summarizes a number of minor changes to the library, mostly additions.
+See the relevant package documentation for more information about each change.
+</p>
+
+<ul>
+
+<li>
+The <a href="/pkg/archive/zip/"><code>archive/zip</code></a> package's
+<a href="/pkg/archive/zip/#Writer"><code>Writer</code></a> now supports a
+<a href="/pkg/archive/zip/#Writer.Flush"><code>Flush</code></a> method.
+</li>
+
+<li>
+The <a href="/pkg/compress/flate/"><code>compress/flate</code></a>,
+<a href="/pkg/compress/gzip/"><code>compress/gzip</code></a>,
+and <a href="/pkg/compress/zlib/"><code>compress/zlib</code></a>
+packages now support a <code>Reset</code> method
+for the decompressors, allowing them to reuse buffers and improve performance.
+The <a href="/pkg/compress/gzip/"><code>compress/gzip</code></a> package also has a
+<a href="/pkg/compress/gzip/#Reader.Multistream"><code>Multistream</code></a> method to control support
+for multistream files.
+</li>
+
+<li>
+The <a href="/pkg/crypto/"><code>crypto</code></a> package now has a
+<a href="/pkg/crypto/#Signer"><code>Signer</code></a> interface, implemented by the
+<code>PrivateKey</code> types in
+<a href="/pkg/crypto/ecdsa"><code>crypto/ecdsa</code></a> and
+<a href="/pkg/crypto/rsa"><code>crypto/rsa</code></a>.
+</li>
+
+<li>
+The <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package
+now supports ALPN as defined in <a href="https://tools.ietf.org/html/rfc7301">RFC 7301</a>.
+</li>
+
+<li>
+The <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package
+now supports programmatic selection of server certificates
+through the new <a href="/pkg/crypto/tls/#Config.CertificateForName"><code>CertificateForName</code></a> function
+of the <a href="/pkg/crypto/tls/#Config"><code>Config</code></a> struct.
+</li>
+
+<li>
+Also in the crypto/tls package, the server now supports 
+<a href="https://tools.ietf.org/html/draft-ietf-tls-downgrade-scsv-00">TLS_FALLBACK_SCSV</a>
+to help clients detect fallback attacks.
+(The Go client does not support fallback at all, so it is not vulnerable to
+those attacks.)
+</li>
+
+<li>
+The <a href="/pkg/database/sql/"><code>database/sql</code></a> package can now list all registered
+<a href="/pkg/database/sql/#Drivers"><code>Drivers</code></a>.
+</li>
+
+<li>
+The <a href="/pkg/debug/dwarf/"><code>debug/dwarf</code></a> package now supports
+<a href="/pkg/debug/dwarf/#UnspecifiedType"><code>UnspecifiedType</code></a>s.
+</li>
+
+<li>
+In the <a href="/pkg/encoding/asn1/"><code>encoding/asn1</code></a> package,
+optional elements with a default value will now only be omitted if they have that value.
+</li>
+
+<li>
+The <a href="/pkg/encoding/csv/"><code>encoding/csv</code></a> package no longer
+quotes empty strings but does quote the end-of-data marker <code>\.</code> (backslash dot).
+This is permitted by the definition of CSV and allows it to work better with Postgres.
+</li>
+
+<li>
+The <a href="/pkg/encoding/gob/"><code>encoding/gob</code></a> package has been rewritten to eliminate
+the use of unsafe operations, allowing it to be used in environments that do not permit use of the
+<a href="/pkg/unsafe/"><code>unsafe</code></a> package.
+For typical uses it will be 10-30% slower, but the delta is dependent on the type of the data and
+in some cases, especially involving arrays, it can be faster.
+There is no functional change.
+</li>
+
+<li>
+The <a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> package's
+<a href="/pkg/encoding/xml/#Decoder"><code>Decoder</code></a> can now report its input offset.
+</li>
+
+<li>
+In the <a href="/pkg/fmt/"><code>fmt</code></a> package,
+formatting of pointers to maps has changed to be consistent with that of pointers
+to structs, arrays, and so on.
+For instance, <code>&amp;map[string]int{"one":</code> <code>1}</code> now prints by default as
+<code>&amp;map[one:</code> <code>1]</code> rather than as a hexadecimal pointer value.
+</li>
+
+<li>
+The <a href="/pkg/image/"><code>image</code></a> package's
+<a href="/pkg/image/#Image"><code>Image</code></a>
+implementations like
+<a href="/pkg/image/#RGBA"><code>RGBA</code></a> and
+<a href="/pkg/image/#Gray"><code>Gray</code></a> have specialized
+<a href="/pkg/image/#RGBA.RGBAAt"><code>RGBAAt</code></a> and
+<a href="/pkg/image/#Gray.GrayAt"><code>GrayAt</code></a> methods alongside the general
+<a href="/pkg/image/#Image.At"><code>At</code></a> method.
+</li>
+
+<li>
+The <a href="/pkg/image/png/"><code>image/png</code></a> package now has an
+<a href="/pkg/image/png/#Encoder"><code>Encoder</code></a>
+type to control the compression level used for encoding.
+</li>
+
+<li>
+The <a href="/pkg/math/"><code>math</code></a> package now has a
+<a href="/pkg/math/#Nextafter32"><code>Nextafter32</code><a/> function.
+</li>
+
+<li>
+The <a href="/pkg/net/http/"><code>net/http</code></a> package's
+<a href="/pkg/net/http/#Request"><code>Request</code></a> type
+has a new <a href="/pkg/net/http/#Request.BasicAuth"><code>BasicAuth</code></a> method
+that returns the username and password from authenticated requests using the
+HTTP Basic Authentication
+Scheme.
+</li>
+
+<li>The <a href="/pkg/net/http/"><code>net/http</code></a> package's
+<a href="/pkg/net/http/#Request"><code>Transport</code></a> type
+has a new <a href="/pkg/net/http/#Transport.DialTLS"><code>DialTLS</code></a> hook
+that allows customizing the behavior of outbound TLS connections.
+</li>
+
+<li>
+The <a href="/pkg/net/http/httputil/"><code>net/http/httputil</code></a> package's
+<a href="/pkg/net/http/httputil/#ReverseProxy"><code>ReverseProxy</code></a> type
+has a new field,
+<a href="/pkg/net/http/#ReverseProxy.ErrorLog"><code>ErrorLog</code></a>, that
+provides user control of logging.
+</li>
+
+<li>
+The <a href="/pkg/os/"><code>os</code></a> package
+now implements symbolic links on the Windows operating system
+through the <a href="/pkg/os/#Symlink"><code>Symlink</code></a> function.
+Other operating systems already have this functionality.
+There is also a new <a href="/pkg/os/#Unsetenv"><code>Unsetenv</code></a> function.
+</li>
+
+<li>
+The <a href="/pkg/reflect/"><code>reflect</code></a> package's
+<a href="/pkg/reflect/#Type"><code>Type</code></a> interface
+has a new method, <a href="/pkg/reflect/#type.Comparable"><code>Comparable</code></a>,
+that reports whether the type implements general comparisons.
+</li>
+
+<li>
+Also in the <a href="/pkg/reflect/"><code>reflect</code></a> package, the
+<a href="/pkg/reflect/#Value"><code>Value</code></a> interface is now three instead of four words
+because of changes to the implementation of interfaces in the runtime.
+This saves memory but has no semantic effect.
+</li>
+
+<li>
+The <a href="/pkg/runtime/"><code>runtime</code></a> package
+now implements monotonic clocks on Windows,
+as it already did for the other systems.
+</li>
+
+<li>
+The <a href="/pkg/runtime/"><code>runtime</code></a> package's
+<a href="/pkg/runtime/#MemStats.Mallocs"><code>Mallocs</code></a> counter
+now counts very small allocations that were missed in Go 1.3.
+This may break tests using <a href="/pkg/runtime/#ReadMemStats"><code>ReadMemStats</code></a>
+or <a href="/pkg/testing/#AllocsPerRun"><code>AllocsPerRun</code></a>
+due to the more accurate answer.
+</li>
+
+<li>
+In the <a href="/pkg/runtime/"><code>runtime</code></a> package,
+an array <a href="/pkg/runtime/#MemStats.PauseEnd"><code>PauseEnd</code></a>
+has been added to the
+<a href="/pkg/runtime/#MemStats"><code>MemStats</code></a>
+and <a href="/pkg/runtime/#GCStats"><code>GCStats</code></a> structs.
+This array is a circular buffer of times when garbage collection pauses ended.
+The corresponding pause durations are already recorded in
+<a href="/pkg/runtime/#MemStats.PauseNs"><code>PauseNs</code></a>
+</li>
+
+<li>
+The <a href="/pkg/runtime/race/"><code>runtime/race</code></a> package
+now supports FreeBSD, which means the
+<a href="/pkg/cmd/go/"><code>go</code></a> command's <code>-race</code>
+flag now works on FreeBSD.
+</li>
+
+<li>
+The <a href="/pkg/sync/atomic/"><code>sync/atomic</code></a> package
+has a new type, <a href="/pkg/sync/atomic/#Value"><code>Value</code></a>.
+<code>Value</code> provides an efficient mechanism for atomic loads and
+stores of values of arbitrary type.
+</li>
+
+<li>
+In the <a href="/pkg/syscall/"><code>syscall</code></a> package's
+implementation on Linux, the
+<a href="/pkg/syscall/#Setuid"><code>Setuid</code></a>
+and <a href="/pkg/syscall/#Setgid"><code>Setgid</code></a> have been disabled
+because those system calls operate on the calling thread, not the whole process, which is
+different from other platforms and not the expected result.
+</li>
+
+<li>
+The <a href="/pkg/testing/"><code>testing</code></a> package
+has a new facility to provide more control over running a set of tests.
+If the test code contains a function
+<pre>
+func TestMain(m *<a href="/pkg/testing/#M"><code>testing.M</code></a>) 
+</pre>
+
+that function will be called instead of running the tests directly.
+The <code>M</code> struct contains methods to access and run the tests.
+</li>
+
+<li>
+Also in the <a href="/pkg/testing/"><code>testing</code></a> package,
+a new <a href="/pkg/testing/#Coverage"><code>Coverage</code></a>
+function reports the current test coverage fraction,
+enabling individual tests to report how much they are contributing to the
+overall coverage.
+</li>
+
+<li>
+The <a href="/pkg/text/scanner/"><code>text/scanner</code></a> package's
+<a href="/pkg/text/scanner/#Scanner"><code>Scanner</code></a> type
+has a new function,
+<a href="/pkg/text/scanner/#Scanner.IsIdentRune"><code>IsIdentRune</code></a>,
+allowing one to control the definition of an identifier when scanning.
+</li>
+
+<li>
+The <a href="/pkg/text/template/"><code>text/template</code></a> package's boolean
+functions <code>eq</code>, <code>lt</code>, and so on have been generalized to allow comparison
+of signed and unsigned integers, simplifying their use in practice.
+(Previously one could only compare values of the same signedness.)
+All negative values compare less than all unsigned values.
+</li>
+
+<li>
+The <code>time</code> package now uses the standard symbol for the micro prefix,
+the micro symbol (U+00B5 'µ'), to print microsecond durations.
+<a href="/pkg/time/#ParseDuration"><code>ParseDuration</code></a> still accepts <code>us</code>
+but the package no longer prints microseconds as <code>us</code>.
+<br>
+<em>Updating</em>: Code that depends on the output format of durations
+but does not use ParseDuration will need to be updated.
+</li>
+
+</ul>
diff --git a/_content/doc/go1.5.html b/_content/doc/go1.5.html
new file mode 100644
index 0000000..2c77cf4
--- /dev/null
+++ b/_content/doc/go1.5.html
@@ -0,0 +1,1310 @@
+<!--{
+	"Title": "Go 1.5 Release Notes",
+	"Path":  "/doc/go1.5",
+	"Template": true
+}-->
+
+
+<h2 id="introduction">Introduction to Go 1.5</h2>
+
+<p>
+The latest Go release, version 1.5,
+is a significant release, including major architectural changes to the implementation.
+Despite that, we expect almost all Go programs to continue to compile and run as before,
+because the release still maintains the Go 1 <a href="/doc/go1compat.html">promise
+of compatibility</a>.
+</p>
+
+<p>
+The biggest developments in the implementation are:
+</p>
+
+<ul>
+
+<li>
+The compiler and runtime are now written entirely in Go (with a little assembler).
+C is no longer involved in the implementation, and so the C compiler that was
+once necessary for building the distribution is gone.
+</li>
+
+<li>
+The garbage collector is now <a href="https://golang.org/s/go14gc">concurrent</a> and provides dramatically lower
+pause times by running, when possible, in parallel with other goroutines.
+</li>
+
+<li>
+By default, Go programs run with <code>GOMAXPROCS</code> set to the
+number of cores available; in prior releases it defaulted to 1.
+</li>
+
+<li>
+Support for <a href="https://golang.org/s/go14internal">internal packages</a>
+is now provided for all repositories, not just the Go core.
+</li>
+
+<li>
+The <code>go</code> command now provides <a href="https://golang.org/s/go15vendor">experimental
+support</a> for "vendoring" external dependencies.
+</li>
+
+<li>
+A new <code>go tool trace</code> command supports fine-grained
+tracing of program execution.
+</li>
+
+<li>
+A new <code>go doc</code> command (distinct from <code>godoc</code>)
+is customized for command-line use.
+</li>
+
+</ul>
+
+<p>
+These and a number of other changes to the implementation and tools
+are discussed below.
+</p>
+
+<p>
+The release also contains one small language change involving map literals.
+</p>
+
+<p>
+Finally, the timing of the <a href="https://golang.org/s/releasesched">release</a>
+strays from the usual six-month interval,
+both to provide more time to prepare this major release and to shift the schedule thereafter to
+time the release dates more conveniently.
+</p>
+
+<h2 id="language">Changes to the language</h2>
+
+<h3 id="map_literals">Map literals</h3>
+
+<p>
+Due to an oversight, the rule that allowed the element type to be elided from slice literals was not
+applied to map keys.
+This has been <a href="/cl/2591">corrected</a> in Go 1.5.
+An example will make this clear.
+As of Go 1.5, this map literal,
+</p>
+
+<pre>
+m := map[Point]string{
+    Point{29.935523, 52.891566}:   "Persepolis",
+    Point{-25.352594, 131.034361}: "Uluru",
+    Point{37.422455, -122.084306}: "Googleplex",
+}
+</pre>
+
+<p>
+may be written as follows, without the <code>Point</code> type listed explicitly:
+</p>
+
+<pre>
+m := map[Point]string{
+    {29.935523, 52.891566}:   "Persepolis",
+    {-25.352594, 131.034361}: "Uluru",
+    {37.422455, -122.084306}: "Googleplex",
+}
+</pre>
+
+<h2 id="implementation">The Implementation</h2>
+
+<h3 id="c">No more C</h3>
+
+<p>
+The compiler and runtime are now implemented in Go and assembler, without C.
+The only C source left in the tree is related to testing or to <code>cgo</code>.
+There was a C compiler in the tree in 1.4 and earlier.
+It was used to build the runtime; a custom compiler was necessary in part to
+guarantee the C code would work with the stack management of goroutines.
+Since the runtime is in Go now, there is no need for this C compiler and it is gone.
+Details of the process to eliminate C are discussed <a href="https://golang.org/s/go13compiler">elsewhere</a>.
+</p>
+
+<p>
+The conversion from C was done with the help of custom tools created for the job.
+Most important, the compiler was actually moved by automatic translation of
+the C code into Go.
+It is in effect the same program in a different language.
+It is not a new implementation
+of the compiler so we expect the process will not have introduced new compiler
+bugs.
+An overview of this process is available in the slides for
+<a href="https://talks.golang.org/2015/gogo.slide">this presentation</a>.
+</p>
+
+<h3 id="compiler_and_tools">Compiler and tools</h3>
+
+<p>
+Independent of but encouraged by the move to Go, the names of the tools have changed.
+The old names <code>6g</code>, <code>8g</code> and so on are gone; instead there
+is just one binary, accessible as <code>go</code> <code>tool</code> <code>compile</code>,
+that compiles Go source into binaries suitable for the architecture and operating system
+specified by <code>$GOARCH</code> and <code>$GOOS</code>.
+Similarly, there is now one linker (<code>go</code> <code>tool</code> <code>link</code>)
+and one assembler (<code>go</code> <code>tool</code> <code>asm</code>).
+The linker was translated automatically from the old C implementation,
+but the assembler is a new native Go implementation discussed
+in more detail below.
+</p>
+
+<p>
+Similar to the drop of the names <code>6g</code>, <code>8g</code>, and so on,
+the output of the compiler and assembler are now given a plain <code>.o</code> suffix
+rather than <code>.8</code>, <code>.6</code>, etc.
+</p>
+
+
+<h3 id="gc">Garbage collector</h3>
+
+<p>
+The garbage collector has been re-engineered for 1.5 as part of the development
+outlined in the <a href="https://golang.org/s/go14gc">design document</a>.
+Expected latencies are much lower than with the collector
+in prior releases, through a combination of advanced algorithms,
+better <a href="https://golang.org/s/go15gcpacing">scheduling</a> of the collector,
+and running more of the collection in parallel with the user program.
+The "stop the world" phase of the collector
+will almost always be under 10 milliseconds and usually much less.
+</p>
+
+<p>
+For systems that benefit from low latency, such as user-responsive web sites,
+the drop in expected latency with the new collector may be important.
+</p>
+
+<p>
+Details of the new collector were presented in a
+<a href="https://talks.golang.org/2015/go-gc.pdf">talk</a> at GopherCon 2015.
+</p>
+
+<h3 id="runtime">Runtime</h3>
+
+<p>
+In Go 1.5, the order in which goroutines are scheduled has been changed.
+The properties of the scheduler were never defined by the language,
+but programs that depend on the scheduling order may be broken
+by this change.
+We have seen a few (erroneous) programs affected by this change.
+If you have programs that implicitly depend on the scheduling
+order, you will need to update them.
+</p>
+
+<p>
+Another potentially breaking change is that the runtime now
+sets the default number of threads to run simultaneously,
+defined by <code>GOMAXPROCS</code>, to the number
+of cores available on the CPU.
+In prior releases the default was 1.
+Programs that do not expect to run with multiple cores may
+break inadvertently.
+They can be updated by removing the restriction or by setting
+<code>GOMAXPROCS</code> explicitly.
+For a more detailed discussion of this change, see
+the <a href="https://golang.org/s/go15gomaxprocs">design document</a>.
+</p>
+
+<h3 id="build">Build</h3>
+
+<p>
+Now that the Go compiler and runtime are implemented in Go, a Go compiler
+must be available to compile the distribution from source.
+Thus, to build the Go core, a working Go distribution must already be in place.
+(Go programmers who do not work on the core are unaffected by this change.)
+Any Go 1.4 or later distribution (including <code>gccgo</code>) will serve.
+For details, see the <a href="https://golang.org/s/go15bootstrap">design document</a>.
+</p>
+
+<h2 id="ports">Ports</h2>
+
+<p>
+Due mostly to the industry's move away from the 32-bit x86 architecture,
+the set of binary downloads provided is reduced in 1.5.
+A distribution for the OS X operating system is provided only for the
+<code>amd64</code> architecture, not <code>386</code>.
+Similarly, the ports for Snow Leopard (Apple OS X 10.6) still work but are no
+longer released as a download or maintained since Apple no longer maintains that version
+of the operating system.
+Also, the <code>dragonfly/386</code> port is no longer supported at all
+because DragonflyBSD itself no longer supports the 32-bit 386 architecture.
+</p>
+
+<p>
+There are however several new ports available to be built from source.
+These include <code>darwin/arm</code> and <code>darwin/arm64</code>.
+The new port <code>linux/arm64</code> is mostly in place, but <code>cgo</code>
+is only supported using external linking.
+</p>
+
+<p>
+Also available as experiments are <code>ppc64</code>
+and <code>ppc64le</code> (64-bit PowerPC, big- and little-endian).
+Both these ports support <code>cgo</code> but
+only with internal linking.
+</p>
+
+<p>
+On FreeBSD, Go 1.5 requires FreeBSD 8-STABLE+ because of its new use of the <code>SYSCALL</code> instruction.
+</p>
+
+<p>
+On NaCl, Go 1.5 requires SDK version pepper-41. Later pepper versions are not
+compatible due to the removal of the sRPC subsystem from the NaCl runtime.
+</p>
+
+<p>
+On Darwin, the use of the system X.509 certificate interface can be disabled
+with the <code>ios</code> build tag.
+</p>
+
+<p>
+The Solaris port now has full support for cgo and the packages
+<a href="/pkg/net/"><code>net</code></a> and
+<a href="/pkg/crypto/x509/"><code>crypto/x509</code></a>,
+as well as a number of other fixes and improvements.
+</p>
+
+<h2 id="tools">Tools</h2>
+
+<h3 id="translate">Translating</h3>
+
+<p>
+As part of the process to eliminate C from the tree, the compiler and
+linker were translated from C to Go.
+It was a genuine (machine assisted) translation, so the new programs are essentially
+the old programs translated rather than new ones with new bugs.
+We are confident the translation process has introduced few if any new bugs,
+and in fact uncovered a number of previously unknown bugs, now fixed.
+</p>
+
+<p>
+The assembler is a new program, however; it is described below.
+</p>
+
+<h3 id="rename">Renaming</h3>
+
+<p>
+The suites of programs that were the compilers (<code>6g</code>, <code>8g</code>, etc.),
+the assemblers (<code>6a</code>, <code>8a</code>, etc.),
+and the linkers (<code>6l</code>, <code>8l</code>, etc.)
+have each been consolidated into a single tool that is configured
+by the environment variables <code>GOOS</code> and <code>GOARCH</code>.
+The old names are gone; the new tools are available through the <code>go</code> <code>tool</code>
+mechanism as <code>go tool compile</code>,
+<code>go tool asm</code>,
+<code>and go tool link</code>.
+Also, the file suffixes <code>.6</code>, <code>.8</code>, etc. for the
+intermediate object files are also gone; now they are just plain <code>.o</code> files.
+</p>
+
+<p>
+For example, to build and link a program on amd64 for Darwin
+using the tools directly, rather than through <code>go build</code>,
+one would run:
+</p>
+
+<pre>
+$ export GOOS=darwin GOARCH=amd64
+$ go tool compile program.go
+$ go tool link program.o
+</pre>
+
+<h3 id="moving">Moving</h3>
+
+<p>
+Because the <a href="/pkg/go/types/"><code>go/types</code></a> package
+has now moved into the main repository (see below),
+the <a href="/cmd/vet"><code>vet</code></a> and
+<a href="/cmd/cover"><code>cover</code></a>
+tools have also been moved.
+They are no longer maintained in the external <code>golang.org/x/tools</code> repository,
+although (deprecated) source still resides there for compatibility with old releases.
+</p>
+
+<h3 id="compiler">Compiler</h3>
+
+<p>
+As described above, the compiler in Go 1.5 is a single Go program,
+translated from the old C source, that replaces <code>6g</code>, <code>8g</code>,
+and so on.
+Its target is configured by the environment variables <code>GOOS</code> and <code>GOARCH</code>.
+</p>
+
+<p>
+The 1.5 compiler is mostly equivalent to the old,
+but some internal details have changed.
+One significant change is that evaluation of constants now uses
+the <a href="/pkg/math/big/"><code>math/big</code></a> package
+rather than a custom (and less well tested) implementation of high precision
+arithmetic.
+We do not expect this to affect the results.
+</p>
+
+<p>
+For the amd64 architecture only, the compiler has a new option, <code>-dynlink</code>,
+that assists dynamic linking by supporting references to Go symbols
+defined in external shared libraries.
+</p>
+
+<h3 id="assembler">Assembler</h3>
+
+<p>
+Like the compiler and linker, the assembler in Go 1.5 is a single program
+that replaces the suite of assemblers (<code>6a</code>,
+<code>8a</code>, etc.) and the environment variables
+<code>GOARCH</code> and <code>GOOS</code>
+configure the architecture and operating system.
+Unlike the other programs, the assembler is a wholly new program
+written in Go.
+</p>
+
+ <p>
+The new assembler is very nearly compatible with the previous
+ones, but there are a few changes that may affect some
+assembler source files.
+See the updated <a href="/doc/asm">assembler guide</a>
+for more specific information about these changes. In summary:
+
+</p>
+
+<p>
+First, the expression evaluation used for constants is a little
+different.
+It now uses unsigned 64-bit arithmetic and the precedence
+of operators (<code>+</code>, <code>-</code>, <code><<</code>, etc.)
+comes from Go, not C.
+We expect these changes to affect very few programs but
+manual verification may be required.
+</p>
+
+<p>
+Perhaps more important is that on machines where
+<code>SP</code> or <code>PC</code> is only an alias
+for a numbered register,
+such as <code>R13</code> for the stack pointer and
+<code>R15</code> for the hardware program counter
+on ARM,
+a reference to such a register that does not include a symbol
+is now illegal.
+For example, <code>SP</code> and <code>4(SP)</code> are
+illegal but <code>sym+4(SP)</code> is fine.
+On such machines, to refer to the hardware register use its
+true <code>R</code> name.
+</p>
+
+<p>
+One minor change is that some of the old assemblers
+permitted the notation
+</p>
+
+<pre>
+constant=value
+</pre>
+
+<p>
+to define a named constant.
+Since this is always possible to do with the traditional
+C-like <code>#define</code> notation, which is still
+supported (the assembler includes an implementation
+of a simplified C preprocessor), the feature was removed.
+</p>
+
+<h3 id="link">Linker</h3>
+
+<p>
+The linker in Go 1.5 is now one Go program,
+that replaces <code>6l</code>, <code>8l</code>, etc.
+Its operating system and instruction set are specified
+by the environment variables <code>GOOS</code> and <code>GOARCH</code>.
+</p>
+
+<p>
+There are several other changes.
+The most significant is the addition of a <code>-buildmode</code> option that
+expands the style of linking; it now supports
+situations such as building shared libraries and allowing other languages
+to call into Go libraries.
+Some of these were outlined in a <a href="https://golang.org/s/execmodes">design document</a>.
+For a list of the available build modes and their use, run
+</p>
+
+<pre>
+$ go help buildmode
+</pre>
+
+<p>
+Another minor change is that the linker no longer records build time stamps in
+the header of Windows executables.
+Also, although this may be fixed, Windows cgo executables are missing some
+DWARF information.
+</p>
+
+<p>
+Finally, the <code>-X</code> flag, which takes two arguments,
+as in
+</p>
+
+<pre>
+-X importpath.name value
+</pre>
+
+<p>
+now also accepts a more common Go flag style with a single argument
+that is itself a <code>name=value</code> pair:
+</p>
+
+<pre>
+-X importpath.name=value
+</pre>
+
+<p>
+Although the old syntax still works, it is recommended that uses of this
+flag in scripts and the like be updated to the new form.
+</p>
+
+<h3 id="go_command">Go command</h3>
+
+<p>
+The <a href="/cmd/go"><code>go</code></a> command's basic operation
+is unchanged, but there are a number of changes worth noting.
+</p>
+
+<p>
+The previous release introduced the idea of a directory internal to a package
+being unimportable through the <code>go</code> command.
+In 1.4, it was tested with the introduction of some internal elements
+in the core repository.
+As suggested in the <a href="https://golang.org/s/go14internal">design document</a>,
+that change is now being made available to all repositories.
+The rules are explained in the design document, but in summary any
+package in or under a directory named <code>internal</code> may
+be imported by packages rooted in the same subtree.
+Existing packages with directory elements named <code>internal</code> may be
+inadvertently broken by this change, which was why it was advertised
+in the last release.
+</p>
+
+<p>
+Another change in how packages are handled is the experimental
+addition of support for "vendoring".
+For details, see the documentation for the <a href="/cmd/go/#hdr-Vendor_Directories"><code>go</code> command</a>
+and the <a href="https://golang.org/s/go15vendor">design document</a>.
+</p>
+
+<p>
+There have also been several minor changes.
+Read the <a href="/cmd/go">documentation</a> for full details.
+</p>
+
+<ul>
+
+<li>
+SWIG support has been updated such that
+<code>.swig</code> and <code>.swigcxx</code>
+now require SWIG 3.0.6 or later.
+</li>
+
+<li>
+The <code>install</code> subcommand now removes the
+binary created by the <code>build</code> subcommand
+in the source directory, if present,
+to avoid problems having two binaries present in the tree.
+</li>
+
+<li>
+The <code>std</code> (standard library) wildcard package name
+now excludes commands.
+A new <code>cmd</code> wildcard covers the commands.
+</li>
+
+<li>
+A new <code>-asmflags</code> build option
+sets flags to pass to the assembler.
+However,
+the <code>-ccflags</code> build option has been dropped;
+it was specific to the old, now deleted C compiler .
+</li>
+
+<li>
+A new <code>-buildmode</code> build option
+sets the build mode, described above.
+</li>
+
+<li>
+A new <code>-pkgdir</code> build option
+sets the location of installed package archives,
+to help isolate custom builds.
+</li>
+
+<li>
+A new <code>-toolexec</code> build option
+allows substitution of a different command to invoke
+the compiler and so on.
+This acts as a custom replacement for <code>go tool</code>.
+</li>
+
+<li>
+The <code>test</code> subcommand now has a <code>-count</code>
+flag to specify how many times to run each test and benchmark.
+The <a href="/pkg/testing/"><code>testing</code></a> package
+does the work here, through the <code>-test.count</code> flag.
+</li>
+
+<li>
+The <code>generate</code> subcommand has a couple of new features.
+The <code>-run</code> option specifies a regular expression to select which directives
+to execute; this was proposed but never implemented in 1.4.
+The executing pattern now has access to two new environment variables:
+<code>$GOLINE</code> returns the source line number of the directive
+and <code>$DOLLAR</code> expands to a dollar sign.
+</li>
+
+<li>
+The <code>get</code> subcommand now has a <code>-insecure</code>
+flag that must be enabled if fetching from an insecure repository, one that
+does not encrypt the connection.
+</li>
+
+</ul>
+
+<h3 id="vet_command">Go vet command</h3>
+
+<p>
+The <a href="/cmd/vet"><code>go tool vet</code></a> command now does
+more thorough validation of struct tags.
+</p>
+
+<h3 id="trace_command">Trace command</h3>
+
+<p>
+A new tool is available for dynamic execution tracing of Go programs.
+The usage is analogous to how the test coverage tool works.
+Generation of traces is integrated into <code>go test</code>,
+and then a separate execution of the tracing tool itself analyzes the results:
+</p>
+
+<pre>
+$ go test -trace=trace.out path/to/package
+$ go tool trace [flags] pkg.test trace.out
+</pre>
+
+<p>
+The flags enable the output to be displayed in a browser window.
+For details, run <code>go tool trace -help</code>.
+There is also a description of the tracing facility in this
+<a href="https://talks.golang.org/2015/dynamic-tools.slide">talk</a>
+from GopherCon 2015.
+</p>
+
+<h3 id="doc_command">Go doc command</h3>
+
+<p>
+A few releases back, the <code>go doc</code>
+command was deleted as being unnecessary.
+One could always run "<code>godoc .</code>" instead.
+The 1.5 release introduces a new <a href="/cmd/doc"><code>go doc</code></a>
+command with a more convenient command-line interface than
+<code>godoc</code>'s.
+It is designed for command-line usage specifically, and provides a more
+compact and focused presentation of the documentation for a package
+or its elements, according to the invocation.
+It also provides case-insensitive matching and
+support for showing the documentation for unexported symbols.
+For details run "<code>go help doc</code>".
+</p>
+
+<h3 id="cgo">Cgo</h3>
+
+<p>
+When parsing <code>#cgo</code> lines,
+the invocation <code>${SRCDIR}</code> is now
+expanded into the path to the source directory.
+This allows options to be passed to the
+compiler and linker that involve file paths relative to the
+source code directory. Without the expansion the paths would be
+invalid when the current working directory changes.
+</p>
+
+<p>
+Solaris now has full cgo support.
+</p>
+
+<p>
+On Windows, cgo now uses external linking by default.
+</p>
+
+<p>
+When a C struct ends with a zero-sized field, but the struct itself is
+not zero-sized, Go code can no longer refer to the zero-sized field.
+Any such references will have to be rewritten.
+</p>
+
+<h2 id="performance">Performance</h2>
+
+<p>
+As always, the changes are so general and varied that precise statements
+about performance are difficult to make.
+The changes are even broader ranging than usual in this release, which
+includes a new garbage collector and a conversion of the runtime to Go.
+Some programs may run faster, some slower.
+On average the programs in the Go 1 benchmark suite run a few percent faster in Go 1.5
+than they did in Go 1.4,
+while as mentioned above the garbage collector's pauses are
+dramatically shorter, and almost always under 10 milliseconds.
+</p>
+
+<p>
+Builds in Go 1.5 will be slower by a factor of about two.
+The automatic translation of the compiler and linker from C to Go resulted in
+unidiomatic Go code that performs poorly compared to well-written Go.
+Analysis tools and refactoring helped to improve the code, but much remains to be done.
+Further profiling and optimization will continue in Go 1.6 and future releases.
+For more details, see these <a href="https://talks.golang.org/2015/gogo.slide">slides</a>
+and associated <a href="https://www.youtube.com/watch?v=cF1zJYkBW4A">video</a>.
+</p>
+
+<h2 id="library">Core library</h2>
+
+<h3 id="flag">Flag</h3>
+
+<p>
+The flag package's
+<a href="/pkg/flag/#PrintDefaults"><code>PrintDefaults</code></a>
+function, and method on <a href="/pkg/flag/#FlagSet"><code>FlagSet</code></a>,
+have been modified to create nicer usage messages.
+The format has been changed to be more human-friendly and in the usage
+messages a word quoted with `backquotes` is taken to be the name of the
+flag's operand to display in the usage message.
+For instance, a flag created with the invocation,
+</p>
+
+<pre>
+cpuFlag = flag.Int("cpu", 1, "run `N` processes in parallel")
+</pre>
+
+<p>
+will show the help message,
+</p>
+
+<pre>
+-cpu N
+    	run N processes in parallel (default 1)
+</pre>
+
+<p>
+Also, the default is now listed only when it is not the zero value for the type.
+</p>
+
+<h3 id="math_big">Floats in math/big</h3>
+
+<p>
+The <a href="/pkg/math/big/"><code>math/big</code></a> package
+has a new, fundamental data type,
+<a href="/pkg/math/big/#Float"><code>Float</code></a>,
+which implements arbitrary-precision floating-point numbers.
+A <code>Float</code> value is represented by a boolean sign,
+a variable-length mantissa, and a 32-bit fixed-size signed exponent.
+The precision of a <code>Float</code> (the mantissa size in bits)
+can be specified explicitly or is otherwise determined by the first
+operation that creates the value.
+Once created, the size of a <code>Float</code>'s mantissa may be modified with the
+<a href="/pkg/math/big/#Float.SetPrec"><code>SetPrec</code></a> method.
+<code>Floats</code> support the concept of infinities, such as are created by
+overflow, but values that would lead to the equivalent of IEEE 754 NaNs
+trigger a panic.
+<code>Float</code> operations support all IEEE-754 rounding modes.
+When the precision is set to 24 (53) bits,
+operations that stay within the range of normalized <code>float32</code>
+(<code>float64</code>)
+values produce the same results as the corresponding IEEE-754
+arithmetic on those values.
+</p>
+
+<h3 id="go_types">Go types</h3>
+
+<p>
+The <a href="/pkg/go/types/"><code>go/types</code></a> package
+up to now has been maintained in the <code>golang.org/x</code>
+repository; as of Go 1.5 it has been relocated to the main repository.
+The code at the old location is now deprecated.
+There is also a modest API change in the package, discussed below.
+</p>
+
+<p>
+Associated with this move, the
+<a href="/pkg/go/constant/"><code>go/constant</code></a>
+package also moved to the main repository;
+it was <code>golang.org/x/tools/exact</code> before.
+The <a href="/pkg/go/importer/"><code>go/importer</code></a> package
+also moved to the main repository,
+as well as some tools described above.
+</p>
+
+<h3 id="net">Net</h3>
+
+<p>
+The DNS resolver in the net package has almost always used <code>cgo</code> to access
+the system interface.
+A change in Go 1.5 means that on most Unix systems DNS resolution
+will no longer require <code>cgo</code>, which simplifies execution
+on those platforms.
+Now, if the system's networking configuration permits, the native Go resolver
+will suffice.
+The important effect of this change is that each DNS resolution occupies a goroutine
+rather than a thread,
+so a program with multiple outstanding DNS requests will consume fewer operating
+system resources.
+</p>
+
+<p>
+The decision of how to run the resolver applies at run time, not build time.
+The <code>netgo</code> build tag that has been used to enforce the use
+of the Go resolver is no longer necessary, although it still works.
+A new <code>netcgo</code> build tag forces the use of the <code>cgo</code> resolver at
+build time.
+To force <code>cgo</code> resolution at run time set
+<code>GODEBUG=netdns=cgo</code> in the environment.
+More debug options are documented <a href="https://golang.org/cl/11584">here</a>.
+</p>
+
+<p>
+This change applies to Unix systems only.
+Windows, Mac OS X, and Plan 9 systems behave as before.
+</p>
+
+<h3 id="reflect">Reflect</h3>
+
+<p>
+The <a href="/pkg/reflect/"><code>reflect</code></a> package
+has two new functions: <a href="/pkg/reflect/#ArrayOf"><code>ArrayOf</code></a>
+and <a href="/pkg/reflect/#FuncOf"><code>FuncOf</code></a>.
+These functions, analogous to the extant
+<a href="/pkg/reflect/#SliceOf"><code>SliceOf</code></a> function,
+create new types at runtime to describe arrays and functions.
+</p>
+
+<h3 id="hardening">Hardening</h3>
+
+<p>
+Several dozen bugs were found in the standard library
+through randomized testing with the
+<a href="https://github.com/dvyukov/go-fuzz"><code>go-fuzz</code></a> tool.
+Bugs were fixed in the
+<a href="/pkg/archive/tar/"><code>archive/tar</code></a>,
+<a href="/pkg/archive/zip/"><code>archive/zip</code></a>,
+<a href="/pkg/compress/flate/"><code>compress/flate</code></a>,
+<a href="/pkg/encoding/gob/"><code>encoding/gob</code></a>,
+<a href="/pkg/fmt/"><code>fmt</code></a>,
+<a href="/pkg/html/template/"><code>html/template</code></a>,
+<a href="/pkg/image/gif/"><code>image/gif</code></a>,
+<a href="/pkg/image/jpeg/"><code>image/jpeg</code></a>,
+<a href="/pkg/image/png/"><code>image/png</code></a>, and
+<a href="/pkg/text/template/"><code>text/template</code></a>,
+packages.
+The fixes harden the implementation against incorrect and malicious inputs.
+</p>
+
+<h3 id="minor_library_changes">Minor changes to the library</h3>
+
+<ul>
+
+<li>
+The <a href="/pkg/archive/zip/"><code>archive/zip</code></a> package's
+<a href="/pkg/archive/zip/#Writer"><code>Writer</code></a> type now has a
+<a href="/pkg/archive/zip/#Writer.SetOffset"><code>SetOffset</code></a>
+method to specify the location within the output stream at which to write the archive.
+</li>
+
+<li>
+The <a href="/pkg/bufio/#Reader"><code>Reader</code></a> in the
+<a href="/pkg/bufio/"><code>bufio</code></a> package now has a
+<a href="/pkg/bufio/#Reader.Discard"><code>Discard</code></a>
+method to discard data from the input.
+</li>
+
+<li>
+In the <a href="/pkg/bytes/"><code>bytes</code></a> package,
+the <a href="/pkg/bytes/#Buffer"><code>Buffer</code></a> type
+now has a <a href="/pkg/bytes/#Buffer.Cap"><code>Cap</code></a> method
+that reports the number of bytes allocated within the buffer.
+Similarly, in both the <a href="/pkg/bytes/"><code>bytes</code></a>
+and <a href="/pkg/strings/"><code>strings</code></a> packages,
+the <a href="/pkg/bytes/#Reader"><code>Reader</code></a>
+type now has a <a href="/pkg/bytes/#Reader.Size"><code>Size</code></a>
+method that reports the original length of the underlying slice or string.
+</li>
+
+<li>
+Both the <a href="/pkg/bytes/"><code>bytes</code></a> and
+<a href="/pkg/strings/"><code>strings</code></a> packages
+also now have a <a href="/pkg/bytes/#LastIndexByte"><code>LastIndexByte</code></a>
+function that locates the rightmost byte with that value in the argument.
+</li>
+
+<li>
+The <a href="/pkg/crypto/"><code>crypto</code></a> package
+has a new interface, <a href="/pkg/crypto/#Decrypter"><code>Decrypter</code></a>,
+that abstracts the behavior of a private key used in asymmetric decryption.
+</li>
+
+<li>
+In the <a href="/pkg/crypto/cipher/"><code>crypto/cipher</code></a> package,
+the documentation for the <a href="/pkg/crypto/cipher/#Stream"><code>Stream</code></a>
+interface has been clarified regarding the behavior when the source and destination are
+different lengths.
+If the destination is shorter than the source, the method will panic.
+This is not a change in the implementation, only the documentation.
+</li>
+
+<li>
+Also in the <a href="/pkg/crypto/cipher/"><code>crypto/cipher</code></a> package,
+there is now support for nonce lengths other than 96 bytes in AES's Galois/Counter mode (GCM),
+which some protocols require.
+</li>
+
+<li>
+In the <a href="/pkg/crypto/elliptic/"><code>crypto/elliptic</code></a> package,
+there is now a <code>Name</code> field in the
+<a href="/pkg/crypto/elliptic/#CurveParams"><code>CurveParams</code></a> struct,
+and the curves implemented in the package have been given names.
+These names provide a safer way to select a curve, as opposed to
+selecting its bit size, for cryptographic systems that are curve-dependent.
+</li>
+
+<li>
+Also in the <a href="/pkg/crypto/elliptic/"><code>crypto/elliptic</code></a> package,
+the <a href="/pkg/crypto/elliptic/#Unmarshal"><code>Unmarshal</code></a> function
+now verifies that the point is actually on the curve.
+(If it is not, the function returns nils).
+This change guards against certain attacks.
+</li>
+
+<li>
+The <a href="/pkg/crypto/sha512/"><code>crypto/sha512</code></a>
+package now has support for the two truncated versions of
+the SHA-512 hash algorithm, SHA-512/224 and SHA-512/256.
+</li>
+
+<li>
+The <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package
+minimum protocol version now defaults to TLS 1.0.
+The old default, SSLv3, is still available through <a href="/pkg/crypto/tls/#Config"><code>Config</code></a> if needed.
+</li>
+
+<li>
+The <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package
+now supports Signed Certificate Timestamps (SCTs) as specified in RFC 6962.
+The server serves them if they are listed in the
+<a href="/pkg/crypto/tls/#Certificate"><code>Certificate</code></a> struct,
+and the client requests them and exposes them, if present,
+in its <a href="/pkg/crypto/tls/#ConnectionState"><code>ConnectionState</code></a> struct.
+
+<li>
+The stapled OCSP response to a <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> client connection,
+previously only available via the
+<a href="/pkg/crypto/tls/#Conn.OCSPResponse"><code>OCSPResponse</code></a> method,
+is now exposed in the <a href="/pkg/crypto/tls/#ConnectionState"><code>ConnectionState</code></a> struct.
+</li>
+
+<li>
+The <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> server implementation
+will now always call the
+<code>GetCertificate</code> function in
+the <a href="/pkg/crypto/tls/#Config"><code>Config</code></a> struct
+to select a certificate for the connection when none is supplied.
+</li>
+
+<li>
+Finally, the session ticket keys in the
+<a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package
+can now be changed while the server is running.
+This is done through the new
+<a href="/pkg/crypto/tls/#Config.SetSessionTicketKeys"><code>SetSessionTicketKeys</code></a>
+method of the
+<a href="/pkg/crypto/tls/#Config"><code>Config</code></a> type.
+</li>
+
+<li>
+In the <a href="/pkg/crypto/x509/"><code>crypto/x509</code></a> package,
+wildcards are now accepted only in the leftmost label as defined in
+<a href="https://tools.ietf.org/html/rfc6125#section-6.4.3">the specification</a>.
+</li>
+
+<li>
+Also in the <a href="/pkg/crypto/x509/"><code>crypto/x509</code></a> package,
+the handling of unknown critical extensions has been changed.
+They used to cause parse errors but now they are parsed and caused errors only
+in <a href="/pkg/crypto/x509/#Certificate.Verify"><code>Verify</code></a>.
+The new field <code>UnhandledCriticalExtensions</code> of
+<a href="/pkg/crypto/x509/#Certificate"><code>Certificate</code></a> records these extensions.
+</li>
+
+<li>
+The <a href="/pkg/database/sql/#DB"><code>DB</code></a> type of the
+<a href="/pkg/database/sql/"><code>database/sql</code></a> package
+now has a <a href="/pkg/database/sql/#DB.Stats"><code>Stats</code></a> method
+to retrieve database statistics.
+</li>
+
+<li>
+The <a href="/pkg/debug/dwarf/"><code>debug/dwarf</code></a>
+package has extensive additions to better support DWARF version 4.
+See for example the definition of the new type
+<a href="/pkg/debug/dwarf/#Class"><code>Class</code></a>.
+</li>
+
+<li>
+The <a href="/pkg/debug/dwarf/"><code>debug/dwarf</code></a> package
+also now supports decoding of DWARF line tables.
+</li>
+
+<li>
+The <a href="/pkg/debug/elf/"><code>debug/elf</code></a>
+package now has support for the 64-bit PowerPC architecture.
+</li>
+
+<li>
+The <a href="/pkg/encoding/base64/"><code>encoding/base64</code></a> package
+now supports unpadded encodings through two new encoding variables,
+<a href="/pkg/encoding/base64/#RawStdEncoding"><code>RawStdEncoding</code></a> and
+<a href="/pkg/encoding/base64/#RawURLEncoding"><code>RawURLEncoding</code></a>.
+</li>
+
+<li>
+The <a href="/pkg/encoding/json/"><code>encoding/json</code></a> package
+now returns an <a href="/pkg/encoding/json/#UnmarshalTypeError"><code>UnmarshalTypeError</code></a>
+if a JSON value is not appropriate for the target variable or component
+to which it is being unmarshaled.
+</li>
+
+<li>
+The <code>encoding/json</code>'s
+<a href="/pkg/encoding/json/#Decoder"><code>Decoder</code></a>
+type has a new method that provides a streaming interface for decoding
+a JSON document:
+<a href="/pkg/encoding/json/#Decoder.Token"><code>Token</code></a>.
+It also interoperates with the existing functionality of <code>Decode</code>,
+which will continue a decode operation already started with <code>Decoder.Token</code>.
+</li>
+
+<li>
+The <a href="/pkg/flag/"><code>flag</code></a> package
+has a new function, <a href="/pkg/flag/#UnquoteUsage"><code>UnquoteUsage</code></a>,
+to assist in the creation of usage messages using the new convention
+described above.
+</li>
+
+<li>
+In the <a href="/pkg/fmt/"><code>fmt</code></a> package,
+a value of type <a href="/pkg/reflect/#Value"><code>Value</code></a> now
+prints what it holds, rather than use the <code>reflect.Value</code>'s <code>Stringer</code>
+method, which produces things like <code>&lt;int Value&gt;</code>.
+</li>
+
+<li>
+The <a href="/pkg/ast/#EmptyStmt"><code>EmptyStmt</code></a> type
+in the <a href="/pkg/go/ast/"><code>go/ast</code></a> package now
+has a boolean <code>Implicit</code> field that records whether the
+semicolon was implicitly added or was present in the source.
+</li>
+
+<li>
+For forward compatibility the <a href="/pkg/go/build/"><code>go/build</code></a> package
+reserves <code>GOARCH</code> values for  a number of architectures that Go might support one day.
+This is not a promise that it will.
+Also, the <a href="/pkg/go/build/#Package"><code>Package</code></a> struct
+now has a <code>PkgTargetRoot</code> field that stores the
+architecture-dependent root directory in which to install, if known.
+</li>
+
+<li>
+The (newly migrated) <a href="/pkg/go/types/"><code>go/types</code></a>
+package allows one to control the prefix attached to package-level names using
+the new <a href="/pkg/go/types/#Qualifier"><code>Qualifier</code></a>
+function type as an argument to several functions. This is an API change for
+the package, but since it is new to the core, it is not breaking the Go 1 compatibility
+rules since code that uses the package must explicitly ask for it at its new location.
+To update, run
+<a href="https://golang.org/cmd/go/#hdr-Run_go_tool_fix_on_packages"><code>go fix</code></a> on your package.
+</li>
+
+<li>
+In the <a href="/pkg/image/"><code>image</code></a> package,
+the <a href="/pkg/image/#Rectangle"><code>Rectangle</code></a> type
+now implements the <a href="/pkg/image/#Image"><code>Image</code></a> interface,
+so a <code>Rectangle</code> can serve as a mask when drawing.
+</li>
+
+<li>
+Also in the <a href="/pkg/image/"><code>image</code></a> package,
+to assist in the handling of some JPEG images,
+there is now support for 4:1:1 and 4:1:0 YCbCr subsampling and basic
+CMYK support, represented by the new <code>image.CMYK</code> struct.
+</li>
+
+<li>
+The <a href="/pkg/image/color/"><code>image/color</code></a> package
+adds basic CMYK support, through the new
+<a href="/pkg/image/color/#CMYK"><code>CMYK</code></a> struct,
+the <a href="/pkg/image/color/#CMYKModel"><code>CMYKModel</code></a> color model, and the
+<a href="/pkg/image/color/#CMYKToRGB"><code>CMYKToRGB</code></a> function, as
+needed by some JPEG images.
+</li>
+
+<li>
+Also in the <a href="/pkg/image/color/"><code>image/color</code></a> package,
+the conversion of a <a href="/pkg/image/color/#YCbCr"><code>YCbCr</code></a>
+value to <code>RGBA</code> has become more precise.
+Previously, the low 8 bits were just an echo of the high 8 bits;
+now they contain more accurate information.
+Because of the echo property of the old code, the operation
+<code>uint8(r)</code> to extract an 8-bit red value worked, but is incorrect.
+In Go 1.5, that operation may yield a different value.
+The correct code is, and always was, to select the high 8 bits:
+<code>uint8(r&gt;&gt;8)</code>.
+Incidentally, the <code>image/draw</code> package
+provides better support for such conversions; see
+<a href="https://blog.golang.org/go-imagedraw-package">this blog post</a>
+for more information.
+</li>
+
+<li>
+Finally, as of Go 1.5 the closest match check in
+<a href="/pkg/image/color/#Palette.Index"><code>Index</code></a>
+now honors the alpha channel.
+</li>
+
+<li>
+The <a href="/pkg/image/gif/"><code>image/gif</code></a> package
+includes a couple of generalizations.
+A multiple-frame GIF file can now have an overall bounds different
+from all the contained single frames' bounds.
+Also, the <a href="/pkg/image/gif/#GIF"><code>GIF</code></a> struct
+now has a <code>Disposal</code> field
+that specifies the disposal method for each frame.
+</li>
+
+<li>
+The <a href="/pkg/io/"><code>io</code></a> package
+adds a <a href="/pkg/io/#CopyBuffer"><code>CopyBuffer</code></a> function
+that is like <a href="/pkg/io/#Copy"><code>Copy</code></a> but
+uses a caller-provided buffer, permitting control of allocation and buffer size.
+</li>
+
+<li>
+The <a href="/pkg/log/"><code>log</code></a> package
+has a new <a href="/pkg/log/#LUTC"><code>LUTC</code></a> flag
+that causes time stamps to be printed in the UTC time zone.
+It also adds a <a href="/pkg/log/#Logger.SetOutput"><code>SetOutput</code></a> method
+for user-created loggers.
+</li>
+
+<li>
+In Go 1.4, <a href="/pkg/math/#Max"><code>Max</code></a> was not detecting all possible NaN bit patterns.
+This is fixed in Go 1.5, so programs that use <code>math.Max</code> on data including NaNs may behave differently,
+but now correctly according to the IEEE754 definition of NaNs.
+</li>
+
+<li>
+The <a href="/pkg/math/big/"><code>math/big</code></a> package
+adds a new <a href="/pkg/math/big/#Jacobi"><code>Jacobi</code></a>
+function for integers and a new
+<a href="/pkg/math/big/#Int.ModSqrt"><code>ModSqrt</code></a>
+method for the <a href="/pkg/math/big/#Int"><code>Int</code></a> type.
+</li>
+
+<li>
+The mime package
+adds a new <a href="/pkg/mime/#WordDecoder"><code>WordDecoder</code></a> type
+to decode MIME headers containing RFC 204-encoded words.
+It also provides <a href="/pkg/mime/#BEncoding"><code>BEncoding</code></a> and
+<a href="/pkg/mime/#QEncoding"><code>QEncoding</code></a>
+as implementations of the encoding schemes of RFC 2045 and RFC 2047.
+</li>
+
+<li>
+The <a href="/pkg/mime/"><code>mime</code></a> package also adds an
+<a href="/pkg/mime/#ExtensionsByType"><code>ExtensionsByType</code></a>
+function that returns the MIME extensions know to be associated with a given MIME type.
+</li>
+
+<li>
+There is a new <a href="/pkg/mime/quotedprintable/"><code>mime/quotedprintable</code></a>
+package that implements the quoted-printable encoding defined by RFC 2045.
+</li>
+
+<li>
+The <a href="/pkg/net/"><code>net</code></a> package will now
+<a href="/pkg/net/#Dial"><code>Dial</code></a> hostnames by trying each
+IP address in order until one succeeds.
+The <code><a href="/pkg/net/#Dialer">Dialer</a>.DualStack</code>
+mode now implements Happy Eyeballs
+(<a href="https://tools.ietf.org/html/rfc6555">RFC 6555</a>) by giving the
+first address family a 300ms head start; this value can be overridden by
+the new <code>Dialer.FallbackDelay</code>.
+</li>
+
+<li>
+A number of inconsistencies in the types returned by errors in the
+<a href="/pkg/net/"><code>net</code></a> package have been
+tidied up.
+Most now return an
+<a href="/pkg/net/#OpError"><code>OpError</code></a> value
+with more information than before.
+Also, the <a href="/pkg/net/#OpError"><code>OpError</code></a>
+type now includes a <code>Source</code> field that holds the local
+network address.
+</li>
+
+<li>
+The <a href="/pkg/net/http/"><code>net/http</code></a> package now
+has support for setting trailers from a server <a href="/pkg/net/http/#Handler"><code>Handler</code></a>.
+For details, see the documentation for
+<a href="/pkg/net/http/#ResponseWriter"><code>ResponseWriter</code></a>.
+</li>
+
+<li>
+There is a new method to cancel a <a href="/pkg/net/http/"><code>net/http</code></a>
+<code>Request</code> by setting the new
+<a href="/pkg/net/http/#Request"><code>Request.Cancel</code></a>
+field.
+It is supported by <code>http.Transport</code>.
+The <code>Cancel</code> field's type is compatible with the
+<a href="https://godoc.org/golang.org/x/net/context"><code>context.Context.Done</code></a>
+return value.
+</li>
+
+<li>
+Also in the <a href="/pkg/net/http/"><code>net/http</code></a> package,
+there is code to ignore the zero <a href="/pkg/time/#Time"><code>Time</code></a> value
+in the <a href="/pkg/net/#ServeContent"><code>ServeContent</code></a> function.
+As of Go 1.5, it now also ignores a time value equal to the Unix epoch.
+</li>
+
+<li>
+The <a href="/pkg/net/http/fcgi/"><code>net/http/fcgi</code></a> package
+exports two new errors,
+<a href="/pkg/net/http/fcgi/#ErrConnClosed"><code>ErrConnClosed</code></a> and
+<a href="/pkg/net/http/fcgi/#ErrRequestAborted"><code>ErrRequestAborted</code></a>,
+to report the corresponding error conditions.
+</li>
+
+<li>
+The <a href="/pkg/net/http/cgi/"><code>net/http/cgi</code></a> package
+had a bug that mishandled the values of the environment variables
+<code>REMOTE_ADDR</code> and <code>REMOTE_HOST</code>.
+This has been fixed.
+Also, starting with Go 1.5 the package sets the <code>REMOTE_PORT</code>
+variable.
+</li>
+
+<li>
+The <a href="/pkg/net/mail/"><code>net/mail</code></a> package
+adds an <a href="/pkg/net/mail/#AddressParser"><code>AddressParser</code></a>
+type that can parse mail addresses.
+</li>
+
+<li>
+The <a href="/pkg/net/smtp/"><code>net/smtp</code></a> package
+now has a <a href="/pkg/net/smtp/#Client.TLSConnectionState"><code>TLSConnectionState</code></a>
+accessor to the <a href="/pkg/net/smtp/#Client"><code>Client</code></a>
+type that returns the client's TLS state.
+</li>
+
+<li>
+The <a href="/pkg/os/"><code>os</code></a> package
+has a new <a href="/pkg/os/#LookupEnv"><code>LookupEnv</code></a> function
+that is similar to <a href="/pkg/os/#Getenv"><code>Getenv</code></a>
+but can distinguish between an empty environment variable and a missing one.
+</li>
+
+<li>
+The <a href="/pkg/os/signal/"><code>os/signal</code></a> package
+adds new <a href="/pkg/os/signal/#Ignore"><code>Ignore</code></a> and
+<a href="/pkg/os/signal/#Reset"><code>Reset</code></a> functions.
+</li>
+
+<li>
+The <a href="/pkg/runtime/"><code>runtime</code></a>,
+<a href="/pkg/runtime/trace/"><code>runtime/trace</code></a>,
+and <a href="/pkg/net/http/pprof/"><code>net/http/pprof</code></a> packages
+each have new functions to support the tracing facilities described above:
+<a href="/pkg/runtime/#ReadTrace"><code>ReadTrace</code></a>,
+<a href="/pkg/runtime/#StartTrace"><code>StartTrace</code></a>,
+<a href="/pkg/runtime/#StopTrace"><code>StopTrace</code></a>,
+<a href="/pkg/runtime/trace/#Start"><code>Start</code></a>,
+<a href="/pkg/runtime/trace/#Stop"><code>Stop</code></a>, and
+<a href="/pkg/net/http/pprof/#Trace"><code>Trace</code></a>.
+See the respective documentation for details.
+</li>
+
+<li>
+The <a href="/pkg/runtime/pprof/"><code>runtime/pprof</code></a> package
+by default now includes overall memory statistics in all memory profiles.
+</li>
+
+<li>
+The <a href="/pkg/strings/"><code>strings</code></a> package
+has a new <a href="/pkg/strings/#Compare"><code>Compare</code></a> function.
+This is present to provide symmetry with the <a href="/pkg/bytes/"><code>bytes</code></a> package
+but is otherwise unnecessary as strings support comparison natively.
+</li>
+
+<li>
+The <a href="/pkg/sync/#WaitGroup"><code>WaitGroup</code></a> implementation in
+package <a href="/pkg/sync/"><code>sync</code></a>
+now diagnoses code that races a call to <a href="/pkg/sync/#WaitGroup.Add"><code>Add</code></a>
+against a return from <a href="/pkg/sync/#WaitGroup.Wait"><code>Wait</code></a>.
+If it detects this condition, the implementation panics.
+</li>
+
+<li>
+In the <a href="/pkg/syscall/"><code>syscall</code></a> package,
+the Linux <code>SysProcAttr</code> struct now has a
+<code>GidMappingsEnableSetgroups</code> field, made necessary
+by security changes in Linux 3.19.
+On all Unix systems, the struct also has new <code>Foreground</code> and <code>Pgid</code> fields
+to provide more control when exec'ing.
+On Darwin, there is now a <code>Syscall9</code> function
+to support calls with too many arguments.
+</li>
+
+<li>
+The <a href="/pkg/testing/quick/"><code>testing/quick</code></a> will now
+generate <code>nil</code> values for pointer types,
+making it possible to use with recursive data structures.
+Also, the package now supports generation of array types.
+</li>
+
+<li>
+In the <a href="/pkg/text/template/"><code>text/template</code></a> and
+<a href="/pkg/html/template/"><code>html/template</code></a> packages,
+integer constants too large to be represented as a Go integer now trigger a
+parse error. Before, they were silently converted to floating point, losing
+precision.
+</li>
+
+<li>
+Also in the <a href="/pkg/text/template/"><code>text/template</code></a> and
+<a href="/pkg/html/template/"><code>html/template</code></a> packages,
+a new <a href="/pkg/text/template/#Template.Option"><code>Option</code></a> method
+allows customization of the behavior of the template during execution.
+The sole implemented option allows control over how a missing key is
+handled when indexing a map.
+The default, which can now be overridden, is as before: to continue with an invalid value.
+</li>
+
+<li>
+The <a href="/pkg/time/"><code>time</code></a> package's
+<code>Time</code> type has a new method
+<a href="/pkg/time/#Time.AppendFormat"><code>AppendFormat</code></a>,
+which can be used to avoid allocation when printing a time value.
+</li>
+
+<li>
+The <a href="/pkg/unicode/"><code>unicode</code></a> package and associated
+support throughout the system has been upgraded from version 7.0 to
+<a href="http://www.unicode.org/versions/Unicode8.0.0/">Unicode 8.0</a>.
+</li>
+
+</ul>
diff --git a/_content/doc/go1.6.html b/_content/doc/go1.6.html
new file mode 100644
index 0000000..c8ec7e7
--- /dev/null
+++ b/_content/doc/go1.6.html
@@ -0,0 +1,923 @@
+<!--{
+	"Title": "Go 1.6 Release Notes",
+	"Path":  "/doc/go1.6",
+	"Template": true
+}-->
+
+<!--
+Edit .,s;^PKG:([a-z][A-Za-z0-9_/]+);<a href="/pkg/\1/"><code>\1</code></a>;g
+Edit .,s;^([a-z][A-Za-z0-9_/]+)\.([A-Z][A-Za-z0-9_]+\.)?([A-Z][A-Za-z0-9_]+)([ .',]|$);<a href="/pkg/\1/#\2\3"><code>\3</code></a>\4;g
+-->
+
+<style>
+  main ul li { margin: 0.5em 0; }
+</style>
+
+<h2 id="introduction">Introduction to Go 1.6</h2>
+
+<p>
+The latest Go release, version 1.6, arrives six months after 1.5.
+Most of its changes are in the implementation of the language, runtime, and libraries.
+There are no changes to the language specification.
+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>
+The release adds new ports to <a href="#ports">Linux on 64-bit MIPS and Android on 32-bit x86</a>;
+defined and enforced <a href="#cgo">rules for sharing Go pointers with C</a>;
+transparent, automatic <a href="#http2">support for HTTP/2</a>;
+and a new mechanism for <a href="#template">template reuse</a>.
+</p>
+
+<h2 id="language">Changes to the language</h2>
+
+<p>
+There are no language changes in this release.
+</p>
+
+<h2 id="ports">Ports</h2>
+
+<p>
+Go 1.6 adds experimental ports to
+Linux on 64-bit MIPS (<code>linux/mips64</code> and <code>linux/mips64le</code>).
+These ports support <code>cgo</code> but only with internal linking.
+</p>
+
+<p>
+Go 1.6 also adds an experimental port to Android on 32-bit x86 (<code>android/386</code>).
+</p>
+
+<p>
+On FreeBSD, Go 1.6 defaults to using <code>clang</code>, not <code>gcc</code>, as the external C compiler.
+</p>
+
+<p>
+On Linux on little-endian 64-bit PowerPC (<code>linux/ppc64le</code>),
+Go 1.6 now supports <code>cgo</code> with external linking and
+is roughly feature complete.
+</p>
+
+<p>
+On NaCl, Go 1.5 required SDK version pepper-41.
+Go 1.6 adds support for later SDK versions.
+</p>
+
+<p>
+On 32-bit x86 systems using the <code>-dynlink</code> or <code>-shared</code> compilation modes,
+the register CX is now overwritten by certain memory references and should
+be avoided in hand-written assembly.
+See the <a href="/doc/asm#x86">assembly documentation</a> for details.
+</p>
+
+<h2 id="tools">Tools</h2>
+
+<h3 id="cgo">Cgo</h3>
+
+<p>
+There is one major change to <a href="/cmd/cgo/"><code>cgo</code></a>, along with one minor change.
+</p>
+
+<p>
+The major change is the definition of rules for sharing Go pointers with C code,
+to ensure that such C code can coexist with Go's garbage collector.
+Briefly, Go and C may share memory allocated by Go
+when a pointer to that memory is passed to C as part of a <code>cgo</code> call,
+provided that the memory itself contains no pointers to Go-allocated memory,
+and provided that C does not retain the pointer after the call returns.
+These rules are checked by the runtime during program execution:
+if the runtime detects a violation, it prints a diagnosis and crashes the program.
+The checks can be disabled by setting the environment variable
+<code>GODEBUG=cgocheck=0</code>, but note that the vast majority of
+code identified by the checks is subtly incompatible with garbage collection
+in one way or another.
+Disabling the checks will typically only lead to more mysterious failure modes.
+Fixing the code in question should be strongly preferred
+over turning off the checks.
+See the <a href="/cmd/cgo/#hdr-Passing_pointers"><code>cgo</code> documentation</a> for more details.
+</p>
+
+<p>
+The minor change is
+the addition of explicit <code>C.complexfloat</code> and <code>C.complexdouble</code> types,
+separate from Go's <code>complex64</code> and <code>complex128</code>.
+Matching the other numeric types, C's complex types and Go's complex type are
+no longer interchangeable.
+</p>
+
+<h3 id="compiler">Compiler Toolchain</h3>
+
+<p>
+The compiler toolchain is mostly unchanged.
+Internally, the most significant change is that the parser is now hand-written
+instead of generated from <a href="/cmd/yacc/">yacc</a>.
+</p>
+
+<p>
+The compiler, linker, and <code>go</code> command have a new flag <code>-msan</code>,
+analogous to <code>-race</code> and only available on linux/amd64,
+that enables interoperation with the <a href="https://clang.llvm.org/docs/MemorySanitizer.html">Clang MemorySanitizer</a>.
+Such interoperation is useful mainly for testing a program containing suspect C or C++ code.
+</p>
+
+<p>
+The linker has a new option <code>-libgcc</code> to set the expected location
+of the C compiler support library when linking <a href="/cmd/cgo/"><code>cgo</code></a> code.
+The option is only consulted when using <code>-linkmode=internal</code>,
+and it may be set to <code>none</code> to disable the use of a support library.
+</p>
+
+<p>
+The implementation of <a href="/doc/go1.5#link">build modes started in Go 1.5</a> has been expanded to more systems.
+This release adds support for the <code>c-shared</code> mode on <code>android/386</code>, <code>android/amd64</code>,
+<code>android/arm64</code>, <code>linux/386</code>, and <code>linux/arm64</code>;
+for the <code>shared</code> mode on <code>linux/386</code>, <code>linux/arm</code>, <code>linux/amd64</code>, and <code>linux/ppc64le</code>;
+and for the new <code>pie</code> mode (generating position-independent executables) on
+<code>android/386</code>, <code>android/amd64</code>, <code>android/arm</code>, <code>android/arm64</code>, <code>linux/386</code>,
+<code>linux/amd64</code>, <code>linux/arm</code>, <code>linux/arm64</code>, and <code>linux/ppc64le</code>.
+See the <a href="https://golang.org/s/execmodes">design document</a> for details.
+</p>
+
+<p>
+As a reminder, the linker's <code>-X</code> flag changed in Go 1.5.
+In Go 1.4 and earlier, it took two arguments, as in
+</p>
+
+<pre>
+-X importpath.name value
+</pre>
+
+<p>
+Go 1.5 added an alternative syntax using a single argument
+that is itself a <code>name=value</code> pair:
+</p>
+
+<pre>
+-X importpath.name=value
+</pre>
+
+<p>
+In Go 1.5 the old syntax was still accepted, after printing a warning
+suggesting use of the new syntax instead.
+Go 1.6 continues to accept the old syntax and print the warning.
+Go 1.7 will remove support for the old syntax.
+</p>
+
+<h3 id="gccgo">Gccgo</h3>
+
+<p>
+The release schedules for the GCC and Go projects do not coincide.
+GCC release 5 contains the Go 1.4 version of gccgo.
+The next release, GCC 6, will have the Go 1.6.1 version of gccgo.
+</p>
+
+<h3 id="go_command">Go command</h3>
+
+<p>
+The <a href="/cmd/go"><code>go</code></a> command's basic operation
+is unchanged, but there are a number of changes worth noting.
+</p>
+
+<p>
+Go 1.5 introduced experimental support for vendoring,
+enabled by setting the <code>GO15VENDOREXPERIMENT</code> environment variable to <code>1</code>.
+Go 1.6 keeps the vendoring support, no longer considered experimental,
+and enables it by default.
+It can be disabled explicitly by setting
+the <code>GO15VENDOREXPERIMENT</code> environment variable to <code>0</code>.
+Go 1.7 will remove support for the environment variable.
+</p>
+
+<p>
+The most likely problem caused by enabling vendoring by default happens
+in source trees containing an existing directory named <code>vendor</code> that
+does not expect to be interpreted according to new vendoring semantics.
+In this case, the simplest fix is to rename the directory to anything other
+than <code>vendor</code> and update any affected import paths.
+</p>
+
+<p>
+For details about vendoring,
+see the documentation for the <a href="/cmd/go/#hdr-Vendor_Directories"><code>go</code> command</a>
+and the <a href="https://golang.org/s/go15vendor">design document</a>.
+</p>
+
+<p>
+There is a new build flag, <code>-msan</code>,
+that compiles Go with support for the LLVM memory sanitizer.
+This is intended mainly for use when linking against C or C++ code
+that is being checked with the memory sanitizer.
+</p>
+
+<h3 id="doc_command">Go doc command</h3>
+
+<p>
+Go 1.5 introduced the
+<a href="/cmd/go/#hdr-Show_documentation_for_package_or_symbol"><code>go doc</code></a> command,
+which allows references to packages using only the package name, as in
+<code>go</code> <code>doc</code> <code>http</code>.
+In the event of ambiguity, the Go 1.5 behavior was to use the package
+with the lexicographically earliest import path.
+In Go 1.6, ambiguity is resolved by preferring import paths with
+fewer elements, breaking ties using lexicographic comparison.
+An important effect of this change is that original copies of packages
+are now preferred over vendored copies.
+Successful searches also tend to run faster.
+</p>
+
+<h3 id="vet_command">Go vet command</h3>
+
+<p>
+The <a href="/cmd/vet"><code>go vet</code></a> command now diagnoses
+passing function or method values as arguments to <code>Printf</code>,
+such as when passing <code>f</code> where <code>f()</code> was intended.
+</p>
+
+<h2 id="performance">Performance</h2>
+
+<p>
+As always, the changes are so general and varied that precise statements
+about performance are difficult to make.
+Some programs may run faster, some slower.
+On average the programs in the Go 1 benchmark suite run a few percent faster in Go 1.6
+than they did in Go 1.5.
+The garbage collector's pauses are even lower than in Go 1.5,
+especially for programs using
+a large amount of memory.
+</p>
+
+<p>
+There have been significant optimizations bringing more than 10% improvements
+to implementations of the
+<a href="/pkg/compress/bzip2/"><code>compress/bzip2</code></a>,
+<a href="/pkg/compress/gzip/"><code>compress/gzip</code></a>,
+<a href="/pkg/crypto/aes/"><code>crypto/aes</code></a>,
+<a href="/pkg/crypto/elliptic/"><code>crypto/elliptic</code></a>,
+<a href="/pkg/crypto/ecdsa/"><code>crypto/ecdsa</code></a>, and
+<a href="/pkg/sort/"><code>sort</code></a> packages.
+</p>
+
+<h2 id="library">Core library</h2>
+
+<h3 id="http2">HTTP/2</h3>
+
+<p>
+Go 1.6 adds transparent support in the
+<a href="/pkg/net/http/"><code>net/http</code></a> package
+for the new <a href="https://http2.github.io/">HTTP/2 protocol</a>.
+Go clients and servers will automatically use HTTP/2 as appropriate when using HTTPS.
+There is no exported API specific to details of the HTTP/2 protocol handling,
+just as there is no exported API specific to HTTP/1.1.
+</p>
+
+<p>
+Programs that must disable HTTP/2 can do so by setting
+<a href="/pkg/net/http/#Transport"><code>Transport.TLSNextProto</code></a> (for clients)
+or
+<a href="/pkg/net/http/#Server"><code>Server.TLSNextProto</code></a> (for servers)
+to a non-nil, empty map.
+</p>
+
+<p>
+Programs that must adjust HTTP/2 protocol-specific details can import and use
+<a href="https://golang.org/x/net/http2"><code>golang.org/x/net/http2</code></a>,
+in particular its
+<a href="https://godoc.org/golang.org/x/net/http2/#ConfigureServer">ConfigureServer</a>
+and
+<a href="https://godoc.org/golang.org/x/net/http2/#ConfigureTransport">ConfigureTransport</a>
+functions.
+</p>
+
+<h3 id="runtime">Runtime</h3>
+
+<p>
+The runtime has added lightweight, best-effort detection of concurrent misuse of maps.
+As always, if one goroutine is writing to a map, no other goroutine should be
+reading or writing the map concurrently.
+If the runtime detects this condition, it prints a diagnosis and crashes the program.
+The best way to find out more about the problem is to run the program
+under the
+<a href="https://blog.golang.org/race-detector">race detector</a>,
+which will more reliably identify the race
+and give more detail.
+</p>
+
+<p>
+For program-ending panics, the runtime now by default
+prints only the stack of the running goroutine,
+not all existing goroutines.
+Usually only the current goroutine is relevant to a panic,
+so omitting the others significantly reduces irrelevant output
+in a crash message.
+To see the stacks from all goroutines in crash messages, set the environment variable
+<code>GOTRACEBACK</code> to <code>all</code>
+or call
+<a href="/pkg/runtime/debug/#SetTraceback"><code>debug.SetTraceback</code></a>
+before the crash, and rerun the program.
+See the <a href="/pkg/runtime/#hdr-Environment_Variables">runtime documentation</a> for details.
+</p>
+
+<p>
+<em>Updating</em>:
+Uncaught panics intended to dump the state of the entire program,
+such as when a timeout is detected or when explicitly handling a received signal,
+should now call <code>debug.SetTraceback("all")</code> before panicking.
+Searching for uses of
+<a href="/pkg/os/signal/#Notify"><code>signal.Notify</code></a> may help identify such code.
+</p>
+
+<p>
+On Windows, Go programs in Go 1.5 and earlier forced
+the global Windows timer resolution to 1ms at startup
+by calling <code>timeBeginPeriod(1)</code>.
+Go no longer needs this for good scheduler performance,
+and changing the global timer resolution caused problems on some systems,
+so the call has been removed.
+</p>
+
+<p>
+When using <code>-buildmode=c-archive</code> or
+<code>-buildmode=c-shared</code> to build an archive or a shared
+library, the handling of signals has changed.
+In Go 1.5 the archive or shared library would install a signal handler
+for most signals.
+In Go 1.6 it will only install a signal handler for the
+synchronous signals needed to handle run-time panics in Go code:
+SIGBUS, SIGFPE, SIGSEGV.
+See the <a href="/pkg/os/signal">os/signal</a> package for more
+details.
+</p>
+
+<h3 id="reflect">Reflect</h3>
+
+<p>
+The
+<a href="/pkg/reflect/"><code>reflect</code></a> package has
+<a href="https://golang.org/issue/12367">resolved a long-standing incompatibility</a>
+between the gc and gccgo toolchains
+regarding embedded unexported struct types containing exported fields.
+Code that walks data structures using reflection, especially to implement
+serialization in the spirit
+of the
+<a href="/pkg/encoding/json/"><code>encoding/json</code></a> and
+<a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> packages,
+may need to be updated.
+</p>
+
+<p>
+The problem arises when using reflection to walk through
+an embedded unexported struct-typed field
+into an exported field of that struct.
+In this case, <code>reflect</code> had incorrectly reported
+the embedded field as exported, by returning an empty <code>Field.PkgPath</code>.
+Now it correctly reports the field as unexported
+but ignores that fact when evaluating access to exported fields
+contained within the struct.
+</p>
+
+<p>
+<em>Updating</em>:
+Typically, code that previously walked over structs and used
+</p>
+
+<pre>
+f.PkgPath != ""
+</pre>
+
+<p>
+to exclude inaccessible fields
+should now use
+</p>
+
+<pre>
+f.PkgPath != "" &amp;&amp; !f.Anonymous
+</pre>
+
+<p>
+For example, see the changes to the implementations of
+<a href="https://go-review.googlesource.com/#/c/14011/2/src/encoding/json/encode.go"><code>encoding/json</code></a> and
+<a href="https://go-review.googlesource.com/#/c/14012/2/src/encoding/xml/typeinfo.go"><code>encoding/xml</code></a>.
+</p>
+
+<h3 id="sort">Sorting</h3>
+
+<p>
+In the
+<a href="/pkg/sort/"><code>sort</code></a>
+package,
+the implementation of
+<a href="/pkg/sort/#Sort"><code>Sort</code></a>
+has been rewritten to make about 10% fewer calls to the
+<a href="/pkg/sort/#Interface"><code>Interface</code></a>'s
+<code>Less</code> and <code>Swap</code>
+methods, with a corresponding overall time savings.
+The new algorithm does choose a different ordering than before
+for values that compare equal (those pairs for which <code>Less(i,</code> <code>j)</code> and <code>Less(j,</code> <code>i)</code> are false).
+</p>
+
+<p>
+<em>Updating</em>:
+The definition of <code>Sort</code> makes no guarantee about the final order of equal values,
+but the new behavior may still break programs that expect a specific order.
+Such programs should either refine their <code>Less</code> implementations
+to report the desired order
+or should switch to
+<a href="/pkg/sort/#Stable"><code>Stable</code></a>,
+which preserves the original input order
+of equal values.
+</p>
+
+<h3 id="template">Templates</h3>
+
+<p>
+In the
+<a href="/pkg/text/template/">text/template</a> package,
+there are two significant new features to make writing templates easier.
+</p>
+
+<p>
+First, it is now possible to <a href="/pkg/text/template/#hdr-Text_and_spaces">trim spaces around template actions</a>,
+which can make template definitions more readable.
+A minus sign at the beginning of an action says to trim space before the action,
+and a minus sign at the end of an action says to trim space after the action.
+For example, the template
+</p>
+
+<pre>
+{{"{{"}}23 -}}
+   &lt;
+{{"{{"}}- 45}}
+</pre>
+
+<p>
+formats as <code>23&lt;45</code>.
+</p>
+
+<p>
+Second, the new <a href="/pkg/text/template/#hdr-Actions"><code>{{"{{"}}block}}</code> action</a>,
+combined with allowing redefinition of named templates,
+provides a simple way to define pieces of a template that
+can be replaced in different instantiations.
+There is <a href="/pkg/text/template/#example_Template_block">an example</a>
+in the <code>text/template</code> package that demonstrates this new feature.
+</p>
+
+<h3 id="minor_library_changes">Minor changes to the library</h3>
+
+<ul>
+
+<li>
+The <a href="/pkg/archive/tar/"><code>archive/tar</code></a> package's
+implementation corrects many bugs in rare corner cases of the file format.
+One visible change is that the
+<a href="/pkg/archive/tar/#Reader"><code>Reader</code></a> type's
+<a href="/pkg/archive/tar/#Reader.Read"><code>Read</code></a> method
+now presents the content of special file types as being empty,
+returning <code>io.EOF</code> immediately.
+</li>
+
+<li>
+In the <a href="/pkg/archive/zip/"><code>archive/zip</code></a> package, the
+<a href="/pkg/archive/zip/#Reader"><code>Reader</code></a> type now has a
+<a href="/pkg/archive/zip/#Reader.RegisterDecompressor"><code>RegisterDecompressor</code></a> method,
+and the
+<a href="/pkg/archive/zip/#Writer"><code>Writer</code></a> type now has a
+<a href="/pkg/archive/zip/#Writer.RegisterCompressor"><code>RegisterCompressor</code></a> method,
+enabling control over compression options for individual zip files.
+These take precedence over the pre-existing global
+<a href="/pkg/archive/zip/#RegisterDecompressor"><code>RegisterDecompressor</code></a> and
+<a href="/pkg/archive/zip/#RegisterCompressor"><code>RegisterCompressor</code></a> functions.
+</li>
+
+<li>
+The <a href="/pkg/bufio/"><code>bufio</code></a> package's
+<a href="/pkg/bufio/#Scanner"><code>Scanner</code></a> type now has a
+<a href="/pkg/bufio/#Scanner.Buffer"><code>Buffer</code></a> method,
+to specify an initial buffer and maximum buffer size to use during scanning.
+This makes it possible, when needed, to scan tokens larger than
+<code>MaxScanTokenSize</code>.
+Also for the <code>Scanner</code>, the package now defines the
+<a href="/pkg/bufio/#ErrFinalToken"><code>ErrFinalToken</code></a> error value, for use by
+<a href="/pkg/bufio/#SplitFunc">split functions</a> to abort processing or to return a final empty token.
+</li>
+
+<li>
+The <a href="/pkg/compress/flate/"><code>compress/flate</code></a> package
+has deprecated its
+<a href="/pkg/compress/flate/#ReadError"><code>ReadError</code></a> and
+<a href="/pkg/compress/flate/#WriteError"><code>WriteError</code></a> error implementations.
+In Go 1.5 they were only rarely returned when an error was encountered;
+now they are never returned, although they remain defined for compatibility.
+</li>
+
+<li>
+The <a href="/pkg/compress/flate/"><code>compress/flate</code></a>,
+<a href="/pkg/compress/gzip/"><code>compress/gzip</code></a>, and
+<a href="/pkg/compress/zlib/"><code>compress/zlib</code></a> packages
+now report
+<a href="/pkg/io/#ErrUnexpectedEOF"><code>io.ErrUnexpectedEOF</code></a> for truncated input streams, instead of
+<a href="/pkg/io/#EOF"><code>io.EOF</code></a>.
+</li>
+
+<li>
+The <a href="/pkg/crypto/cipher/"><code>crypto/cipher</code></a> package now
+overwrites the destination buffer in the event of a GCM decryption failure.
+This is to allow the AESNI code to avoid using a temporary buffer.
+</li>
+
+<li>
+The <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package
+has a variety of minor changes.
+It now allows
+<a href="/pkg/crypto/tls/#Listen"><code>Listen</code></a>
+to succeed when the
+<a href="/pkg/crypto/tls/#Config"><code>Config</code></a>
+has a nil <code>Certificates</code>, as long as the <code>GetCertificate</code> callback is set,
+it adds support for RSA with AES-GCM cipher suites,
+and
+it adds a
+<a href="/pkg/crypto/tls/#RecordHeaderError"><code>RecordHeaderError</code></a>
+to allow clients (in particular, the <a href="/pkg/net/http/"><code>net/http</code></a> package)
+to report a better error when attempting a TLS connection to a non-TLS server.
+</li>
+
+<li>
+The <a href="/pkg/crypto/x509/"><code>crypto/x509</code></a> package
+now permits certificates to contain negative serial numbers
+(technically an error, but unfortunately common in practice),
+and it defines a new
+<a href="/pkg/crypto/x509/#InsecureAlgorithmError"><code>InsecureAlgorithmError</code></a>
+to give a better error message when rejecting a certificate
+signed with an insecure algorithm like MD5.
+</li>
+
+<li>
+The <a href="/pkg/debug/dwarf"><code>debug/dwarf</code></a> and
+<a href="/pkg/debug/elf/"><code>debug/elf</code></a> packages
+together add support for compressed DWARF sections.
+User code needs no updating: the sections are decompressed automatically when read.
+</li>
+
+<li>
+The <a href="/pkg/debug/elf/"><code>debug/elf</code></a> package
+adds support for general compressed ELF sections.
+User code needs no updating: the sections are decompressed automatically when read.
+However, compressed
+<a href="/pkg/debug/elf/#Section"><code>Sections</code></a> do not support random access:
+they have a nil <code>ReaderAt</code> field.
+</li>
+
+<li>
+The <a href="/pkg/encoding/asn1/"><code>encoding/asn1</code></a> package
+now exports
+<a href="/pkg/encoding/asn1/#pkg-constants">tag and class constants</a>
+useful for advanced parsing of ASN.1 structures.
+</li>
+
+<li>
+Also in the <a href="/pkg/encoding/asn1/"><code>encoding/asn1</code></a> package,
+<a href="/pkg/encoding/asn1/#Unmarshal"><code>Unmarshal</code></a> now rejects various non-standard integer and length encodings.
+</li>
+
+<li>
+The <a href="/pkg/encoding/base64"><code>encoding/base64</code></a> package's
+<a href="/pkg/encoding/base64/#Decoder"><code>Decoder</code></a> has been fixed
+to process the final bytes of its input. Previously it processed as many four-byte tokens as
+possible but ignored the remainder, up to three bytes.
+The <code>Decoder</code> therefore now handles inputs in unpadded encodings (like
+<a href="/pkg/encoding/base64/#RawURLEncoding">RawURLEncoding</a>) correctly,
+but it also rejects inputs in padded encodings that are truncated or end with invalid bytes,
+such as trailing spaces.
+</li>
+
+<li>
+The <a href="/pkg/encoding/json/"><code>encoding/json</code></a> package
+now checks the syntax of a
+<a href="/pkg/encoding/json/#Number"><code>Number</code></a>
+before marshaling it, requiring that it conforms to the JSON specification for numeric values.
+As in previous releases, the zero <code>Number</code> (an empty string) is marshaled as a literal 0 (zero).
+</li>
+
+<li>
+The <a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> package's
+<a href="/pkg/encoding/xml/#Marshal"><code>Marshal</code></a>
+function now supports a <code>cdata</code> attribute, such as <code>chardata</code>
+but encoding its argument in one or more <code>&lt;![CDATA[ ... ]]&gt;</code> tags.
+</li>
+
+<li>
+Also in the <a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> package,
+<a href="/pkg/encoding/xml/#Decoder"><code>Decoder</code></a>'s
+<a href="/pkg/encoding/xml/#Decoder.Token"><code>Token</code></a> method
+now reports an error when encountering EOF before seeing all open tags closed,
+consistent with its general requirement that tags in the input be properly matched.
+To avoid that requirement, use
+<a href="/pkg/encoding/xml/#Decoder.RawToken"><code>RawToken</code></a>.
+</li>
+
+<li>
+The <a href="/pkg/fmt/"><code>fmt</code></a> package now allows
+any integer type as an argument to
+<a href="/pkg/fmt/#Printf"><code>Printf</code></a>'s <code>*</code> width and precision specification.
+In previous releases, the argument to <code>*</code> was required to have type <code>int</code>.
+</li>
+
+<li>
+Also in the <a href="/pkg/fmt/"><code>fmt</code></a> package,
+<a href="/pkg/fmt/#Scanf"><code>Scanf</code></a> can now scan hexadecimal strings using %X, as an alias for %x.
+Both formats accept any mix of upper- and lower-case hexadecimal.
+</li>
+
+<li>
+The <a href="/pkg/image/"><code>image</code></a>
+and
+<a href="/pkg/image/color/"><code>image/color</code></a> packages
+add
+<a href="/pkg/image/#NYCbCrA"><code>NYCbCrA</code></a>
+and
+<a href="/pkg/image/color/#NYCbCrA"><code>NYCbCrA</code></a>
+types, to support Y'CbCr images with non-premultiplied alpha.
+</li>
+
+<li>
+The <a href="/pkg/io/"><code>io</code></a> package's
+<a href="/pkg/io/#MultiWriter"><code>MultiWriter</code></a>
+implementation now implements a <code>WriteString</code> method,
+for use by
+<a href="/pkg/io/#WriteString"><code>WriteString</code></a>.
+</li>
+
+<li>
+In the <a href="/pkg/math/big/"><code>math/big</code></a> package,
+<a href="/pkg/math/big/#Int"><code>Int</code></a> adds
+<a href="/pkg/math/big/#Int.Append"><code>Append</code></a>
+and
+<a href="/pkg/math/big/#Int.Text"><code>Text</code></a>
+methods to give more control over printing.
+</li>
+
+<li>
+Also in the <a href="/pkg/math/big/"><code>math/big</code></a> package,
+<a href="/pkg/math/big/#Float"><code>Float</code></a> now implements
+<a href="/pkg/encoding/#TextMarshaler"><code>encoding.TextMarshaler</code></a> and
+<a href="/pkg/encoding/#TextUnmarshaler"><code>encoding.TextUnmarshaler</code></a>,
+allowing it to be serialized in a natural form by the
+<a href="/pkg/encoding/json/"><code>encoding/json</code></a> and
+<a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> packages.
+</li>
+
+<li>
+Also in the <a href="/pkg/math/big/"><code>math/big</code></a> package,
+<a href="/pkg/math/big/#Float"><code>Float</code></a>'s
+<a href="/pkg/math/big/#Float.Append"><code>Append</code></a> method now supports the special precision argument -1.
+As in
+<a href="/pkg/strconv/#ParseFloat"><code>strconv.ParseFloat</code></a>,
+precision -1 means to use the smallest number of digits necessary such that
+<a href="/pkg/math/big/#Float.Parse"><code>Parse</code></a>
+reading the result into a <code>Float</code> of the same precision
+will yield the original value.
+</li>
+
+<li>
+The <a href="/pkg/math/rand/"><code>math/rand</code></a> package
+adds a
+<a href="/pkg/math/rand/#Read"><code>Read</code></a>
+function, and likewise
+<a href="/pkg/math/rand/#Rand"><code>Rand</code></a> adds a
+<a href="/pkg/math/rand/#Rand.Read"><code>Read</code></a> method.
+These make it easier to generate pseudorandom test data.
+Note that, like the rest of the package,
+these should not be used in cryptographic settings;
+for such purposes, use the <a href="/pkg/crypto/rand/"><code>crypto/rand</code></a> package instead.
+</li>
+
+<li>
+The <a href="/pkg/net/"><code>net</code></a> package's
+<a href="/pkg/net/#ParseMAC"><code>ParseMAC</code></a> function now accepts 20-byte IP-over-InfiniBand (IPoIB) link-layer addresses.
+</li>
+
+
+<li>
+Also in the <a href="/pkg/net/"><code>net</code></a> package,
+there have been a few changes to DNS lookups.
+First, the
+<a href="/pkg/net/#DNSError"><code>DNSError</code></a> error implementation now implements
+<a href="/pkg/net/#Error"><code>Error</code></a>,
+and in particular its new
+<a href="/pkg/net/#DNSError.IsTemporary"><code>IsTemporary</code></a>
+method returns true for DNS server errors.
+Second, DNS lookup functions such as
+<a href="/pkg/net/#LookupAddr"><code>LookupAddr</code></a>
+now return rooted domain names (with a trailing dot)
+on Plan 9 and Windows, to match the behavior of Go on Unix systems.
+</li>
+
+<li>
+The <a href="/pkg/net/http/"><code>net/http</code></a> package has
+a number of minor additions beyond the HTTP/2 support already discussed.
+First, the
+<a href="/pkg/net/http/#FileServer"><code>FileServer</code></a> now sorts its generated directory listings by file name.
+Second, the
+<a href="/pkg/net/http/#ServeFile"><code>ServeFile</code></a> function now refuses to serve a result
+if the request's URL path contains &ldquo;..&rdquo; (dot-dot) as a path element.
+Programs should typically use <code>FileServer</code> and 
+<a href="/pkg/net/http/#Dir"><code>Dir</code></a>
+instead of calling <code>ServeFile</code> directly.
+Programs that need to serve file content in response to requests for URLs containing dot-dot can 
+still call <a href="/pkg/net/http/#ServeContent"><code>ServeContent</code></a>.
+Third, the
+<a href="/pkg/net/http/#Client"><code>Client</code></a> now allows user code to set the
+<code>Expect:</code> <code>100-continue</code> header (see
+<a href="/pkg/net/http/#Transport"><code>Transport.ExpectContinueTimeout</code></a>).
+Fourth, there are
+<a href="/pkg/net/http/#pkg-constants">five new error codes</a>:
+<code>StatusPreconditionRequired</code> (428),
+<code>StatusTooManyRequests</code> (429),
+<code>StatusRequestHeaderFieldsTooLarge</code> (431), and
+<code>StatusNetworkAuthenticationRequired</code> (511) from RFC 6585,
+as well as the recently-approved
+<code>StatusUnavailableForLegalReasons</code> (451).
+Fifth, the implementation and documentation of
+<a href="/pkg/net/http/#CloseNotifier"><code>CloseNotifier</code></a>
+has been substantially changed.
+The <a href="/pkg/net/http/#Hijacker"><code>Hijacker</code></a>
+interface now works correctly on connections that have previously
+been used with <code>CloseNotifier</code>.
+The documentation now describes when <code>CloseNotifier</code>
+is expected to work.
+</li>
+
+<li>
+Also in the <a href="/pkg/net/http/"><code>net/http</code></a> package,
+there are a few changes related to the handling of a
+<a href="/pkg/net/http/#Request"><code>Request</code></a> data structure with its <code>Method</code> field set to the empty string.
+An empty <code>Method</code> field has always been documented as an alias for <code>"GET"</code>
+and it remains so.
+However, Go 1.6 fixes a few routines that did not treat an empty
+<code>Method</code> the same as an explicit <code>"GET"</code>.
+Most notably, in previous releases
+<a href="/pkg/net/http/#Client"><code>Client</code></a> followed redirects only with
+<code>Method</code> set explicitly to <code>"GET"</code>;
+in Go 1.6 <code>Client</code> also follows redirects for the empty <code>Method</code>.
+Finally,
+<a href="/pkg/net/http/#NewRequest"><code>NewRequest</code></a> accepts a <code>method</code> argument that has not been
+documented as allowed to be empty.
+In past releases, passing an empty <code>method</code> argument resulted
+in a <code>Request</code> with an empty <code>Method</code> field.
+In Go 1.6, the resulting <code>Request</code> always has an initialized
+<code>Method</code> field: if its argument is an empty string, <code>NewRequest</code>
+sets the <code>Method</code> field in the returned <code>Request</code> to <code>"GET"</code>.
+</li>
+
+<li>
+The <a href="/pkg/net/http/httptest/"><code>net/http/httptest</code></a> package's
+<a href="/pkg/net/http/httptest/#ResponseRecorder"><code>ResponseRecorder</code></a> now initializes a default Content-Type header
+using the same content-sniffing algorithm as in
+<a href="/pkg/net/http/#Server"><code>http.Server</code></a>.
+</li>
+
+<li>
+The <a href="/pkg/net/url/"><code>net/url</code></a> package's
+<a href="/pkg/net/url/#Parse"><code>Parse</code></a> is now stricter and more spec-compliant regarding the parsing
+of host names.
+For example, spaces in the host name are no longer accepted.
+</li>
+
+<li>
+Also in the <a href="/pkg/net/url/"><code>net/url</code></a> package,
+the <a href="/pkg/net/url/#Error"><code>Error</code></a> type now implements
+<a href="/pkg/net/#Error"><code>net.Error</code></a>.
+</li>
+
+<li>
+The <a href="/pkg/os/"><code>os</code></a> package's
+<a href="/pkg/os/#IsExist"><code>IsExist</code></a>,
+<a href="/pkg/os/#IsNotExist"><code>IsNotExist</code></a>,
+and
+<a href="/pkg/os/#IsPermission"><code>IsPermission</code></a>
+now return correct results when inquiring about an
+<a href="/pkg/os/#SyscallError"><code>SyscallError</code></a>.
+</li>
+
+<li>
+On Unix-like systems, when a write
+to <a href="/pkg/os/#pkg-variables"><code>os.Stdout</code>
+or <code>os.Stderr</code></a> (more precisely, an <code>os.File</code>
+opened for file descriptor 1 or 2) fails due to a broken pipe error,
+the program will raise a <code>SIGPIPE</code> signal.
+By default this will cause the program to exit; this may be changed by
+calling the
+<a href="/pkg/os/signal"><code>os/signal</code></a>
+<a href="/pkg/os/signal/#Notify"><code>Notify</code></a> function
+for <code>syscall.SIGPIPE</code>.
+A write to a broken pipe on a file descriptor other 1 or 2 will simply
+return <code>syscall.EPIPE</code> (possibly wrapped in
+<a href="/pkg/os#PathError"><code>os.PathError</code></a>
+and/or <a href="/pkg/os#SyscallError"><code>os.SyscallError</code></a>)
+to the caller.
+The old behavior of raising an uncatchable <code>SIGPIPE</code> signal
+after 10 consecutive writes to a broken pipe no longer occurs.
+</li>
+
+<li>
+In the <a href="/pkg/os/exec/"><code>os/exec</code></a> package,
+<a href="/pkg/os/exec/#Cmd"><code>Cmd</code></a>'s
+<a href="/pkg/os/exec/#Cmd.Output"><code>Output</code></a> method continues to return an
+<a href="/pkg/os/exec/#ExitError"><code>ExitError</code></a> when a command exits with an unsuccessful status.
+If standard error would otherwise have been discarded,
+the returned <code>ExitError</code> now holds a prefix and suffix
+(currently 32 kB) of the failed command's standard error output,
+for debugging or for inclusion in error messages.
+The <code>ExitError</code>'s
+<a href="/pkg/os/exec/#ExitError.String"><code>String</code></a>
+method does not show the captured standard error;
+programs must retrieve it from the data structure
+separately.
+</li>
+
+<li>
+On Windows, the <a href="/pkg/path/filepath/"><code>path/filepath</code></a> package's
+<a href="/pkg/path/filepath/#Join"><code>Join</code></a> function now correctly handles the case when the base is a relative drive path.
+For example, <code>Join(`c:`,</code> <code>`a`)</code> now
+returns <code>`c:a`</code> instead of <code>`c:\a`</code> as in past releases.
+This may affect code that expects the incorrect result.
+</li>
+
+<li>
+In the <a href="/pkg/regexp/"><code>regexp</code></a> package,
+the
+<a href="/pkg/regexp/#Regexp"><code>Regexp</code></a> type has always been safe for use by
+concurrent goroutines.
+It uses a <a href="/pkg/sync/#Mutex"><code>sync.Mutex</code></a> to protect
+a cache of scratch spaces used during regular expression searches.
+Some high-concurrency servers using the same <code>Regexp</code> from many goroutines
+have seen degraded performance due to contention on that mutex.
+To help such servers, <code>Regexp</code> now has a
+<a href="/pkg/regexp/#Regexp.Copy"><code>Copy</code></a> method,
+which makes a copy of a <code>Regexp</code> that shares most of the structure
+of the original but has its own scratch space cache.
+Two goroutines can use different copies of a <code>Regexp</code>
+without mutex contention.
+A copy does have additional space overhead, so <code>Copy</code>
+should only be used when contention has been observed.
+</li>
+
+<li>
+The <a href="/pkg/strconv/"><code>strconv</code></a> package adds
+<a href="/pkg/strconv/#IsGraphic"><code>IsGraphic</code></a>,
+similar to <a href="/pkg/strconv/#IsPrint"><code>IsPrint</code></a>.
+It also adds
+<a href="/pkg/strconv/#QuoteToGraphic"><code>QuoteToGraphic</code></a>,
+<a href="/pkg/strconv/#QuoteRuneToGraphic"><code>QuoteRuneToGraphic</code></a>,
+<a href="/pkg/strconv/#AppendQuoteToGraphic"><code>AppendQuoteToGraphic</code></a>,
+and
+<a href="/pkg/strconv/#AppendQuoteRuneToGraphic"><code>AppendQuoteRuneToGraphic</code></a>,
+analogous to
+<a href="/pkg/strconv/#QuoteToASCII"><code>QuoteToASCII</code></a>,
+<a href="/pkg/strconv/#QuoteRuneToASCII"><code>QuoteRuneToASCII</code></a>,
+and so on.
+The <code>ASCII</code> family escapes all space characters except ASCII space (U+0020).
+In contrast, the <code>Graphic</code> family does not escape any Unicode space characters (category Zs).
+</li>
+
+<li>
+In the <a href="/pkg/testing/"><code>testing</code></a> package,
+when a test calls
+<a href="/pkg/testing/#T.Parallel">t.Parallel</a>,
+that test is paused until all non-parallel tests complete, and then
+that test continues execution with all other parallel tests.
+Go 1.6 changes the time reported for such a test:
+previously the time counted only the parallel execution,
+but now it also counts the time from the start of testing
+until the call to <code>t.Parallel</code>.
+</li>
+
+<li>
+The <a href="/pkg/text/template/"><code>text/template</code></a> package
+contains two minor changes, in addition to the <a href="#template">major changes</a>
+described above.
+First, it adds a new
+<a href="/pkg/text/template/#ExecError"><code>ExecError</code></a> type
+returned for any error during
+<a href="/pkg/text/template/#Template.Execute"><code>Execute</code></a>
+that does not originate in a <code>Write</code> to the underlying writer.
+Callers can distinguish template usage errors from I/O errors by checking for
+<code>ExecError</code>.
+Second, the
+<a href="/pkg/text/template/#Template.Funcs"><code>Funcs</code></a> method
+now checks that the names used as keys in the
+<a href="/pkg/text/template/#FuncMap"><code>FuncMap</code></a>
+are identifiers that can appear in a template function invocation.
+If not, <code>Funcs</code> panics.
+</li>
+
+<li>
+The <a href="/pkg/time/"><code>time</code></a> package's
+<a href="/pkg/time/#Parse"><code>Parse</code></a> function has always rejected any day of month larger than 31,
+such as January 32.
+In Go 1.6, <code>Parse</code> now also rejects February 29 in non-leap years,
+February 30, February 31, April 31, June 31, September 31, and November 31.
+</li>
+
+</ul>
+
diff --git a/_content/doc/go1.7.html b/_content/doc/go1.7.html
new file mode 100644
index 0000000..61076fd
--- /dev/null
+++ b/_content/doc/go1.7.html
@@ -0,0 +1,1281 @@
+<!--{
+	"Title": "Go 1.7 Release Notes",
+	"Path":  "/doc/go1.7",
+	"Template": true
+}-->
+
+<!--
+for acme:
+Edit .,s;^PKG:([a-z][A-Za-z0-9_/]+);<a href="/pkg/\1/"><code>\1</code></a>;g
+Edit .,s;^([a-z][A-Za-z0-9_/]+)\.([A-Z][A-Za-z0-9_]+\.)?([A-Z][A-Za-z0-9_]+)([ .',)]|$);<a href="/pkg/\1/#\2\3"><code>\3</code></a>\4;g
+Edit .,s;^FULL:([a-z][A-Za-z0-9_/]+)\.([A-Z][A-Za-z0-9_]+\.)?([A-Z][A-Za-z0-9_]+)([ .',)]|$);<a href="/pkg/\1/#\2\3"><code>\1.\2\3</code></a>\4;g
+Edit .,s;^DPKG:([a-z][A-Za-z0-9_/]+);<dl id="\1"><a href="/pkg/\1/">\1</a></dl>;g
+
+rsc last updated through 6729576
+-->
+
+<!--
+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.7</h2>
+
+<p>
+The latest Go release, version 1.7, arrives six months after 1.6.
+Most of its changes are in the implementation of the toolchain, runtime, and libraries.
+There is one minor change to the language specification.
+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>
+The release <a href="#ports">adds a port to IBM LinuxOne</a>;
+<a href="#compiler">updates the x86-64 compiler back end</a> to generate more efficient code;
+includes the <a href="#context">context package</a>, promoted from the
+<a href="https://golang.org/x/net/context">x/net subrepository</a>
+and now used in the standard library;
+and <a href="#testing">adds support in the testing package</a> for
+creating hierarchies of tests and benchmarks.
+The release also <a href="#cmd_go">finalizes the vendoring support</a>
+started in Go 1.5, making it a standard feature.
+</p>
+
+<h2 id="language">Changes to the language</h2>
+
+<p>
+There is one tiny language change in this release.
+The section on <a href="/ref/spec#Terminating_statements">terminating statements</a>
+clarifies that to determine whether a statement list ends in a terminating statement,
+the “final non-empty statement” is considered the end,
+matching the existing behavior of the gc and gccgo compiler toolchains.
+In earlier releases the definition referred only to the “final statement,”
+leaving the effect of trailing empty statements at the least unclear.
+The <a href="/pkg/go/types/"><code>go/types</code></a>
+package has been updated to match the gc and gccgo compiler toolchains
+in this respect.
+This change has no effect on the correctness of existing programs.
+</p>
+
+<h2 id="ports">Ports</h2>
+
+<p>
+Go 1.7 adds support for macOS 10.12 Sierra.
+Binaries built with versions of Go before 1.7 will not work
+correctly on Sierra.
+</p>
+
+<p>
+Go 1.7 adds an experimental port to <a href="https://en.wikipedia.org/wiki/Linux_on_z_Systems">Linux on z Systems</a> (<code>linux/s390x</code>)
+and the beginning of a port to Plan 9 on ARM (<code>plan9/arm</code>).
+</p>
+
+<p>
+The experimental ports to Linux on 64-bit MIPS (<code>linux/mips64</code> and <code>linux/mips64le</code>)
+added in Go 1.6 now have full support for cgo and external linking.
+</p>
+
+<p>
+The experimental port to Linux on little-endian 64-bit PowerPC (<code>linux/ppc64le</code>)
+now requires the POWER8 architecture or later.
+Big-endian 64-bit PowerPC (<code>linux/ppc64</code>) only requires the
+POWER5 architecture.
+</p>
+
+<p>
+The OpenBSD port now requires OpenBSD 5.6 or later, for access to the <a href="https://man.openbsd.org/getentropy.2"><i>getentropy</i>(2)</a> system call.
+</p>
+
+<h3 id="known_issues">Known Issues</h3>
+
+<p>
+There are some instabilities on FreeBSD that are known but not understood.
+These can lead to program crashes in rare cases.
+See <a href="https://golang.org/issue/16136">issue 16136</a>,
+<a href="https://golang.org/issue/15658">issue 15658</a>,
+and <a href="https://golang.org/issue/16396">issue 16396</a>.
+Any help in solving these FreeBSD-specific issues would be appreciated.
+</p>
+
+<h2 id="tools">Tools</h2>
+
+<h3 id="cmd_asm">Assembler</h3>
+
+<p>
+For 64-bit ARM systems, the vector register names have been
+corrected to <code>V0</code> through <code>V31</code>;
+previous releases incorrectly referred to them as <code>V32</code> through <code>V63</code>.
+</p>
+
+<p>
+For 64-bit x86 systems, the following instructions have been added:
+<code>PCMPESTRI</code>,
+<code>RORXL</code>,
+<code>RORXQ</code>,
+<code>VINSERTI128</code>,
+<code>VPADDD</code>,
+<code>VPADDQ</code>,
+<code>VPALIGNR</code>,
+<code>VPBLENDD</code>,
+<code>VPERM2F128</code>,
+<code>VPERM2I128</code>,
+<code>VPOR</code>,
+<code>VPSHUFB</code>,
+<code>VPSHUFD</code>,
+<code>VPSLLD</code>,
+<code>VPSLLDQ</code>,
+<code>VPSLLQ</code>,
+<code>VPSRLD</code>,
+<code>VPSRLDQ</code>,
+and
+<code>VPSRLQ</code>.
+</p>
+
+<h3 id="compiler">Compiler Toolchain</h3>
+
+<p>
+This release includes a new code generation back end for 64-bit x86 systems,
+following a <a href="https://golang.org/s/go17ssa">proposal from 2015</a>
+that has been under development since then.
+The new back end, based on
+<a href="https://en.wikipedia.org/wiki/Static_single_assignment_form">SSA</a>,
+generates more compact, more efficient code
+and provides a better platform for optimizations
+such as bounds check elimination.
+The new back end reduces the CPU time required by
+<a href="https://golang.org/test/bench/go1/">our benchmark programs</a> by 5-35%.
+</p>
+
+<p>
+For this release, the new back end can be disabled by passing
+<code>-ssa=0</code> to the compiler.
+If you find that your program compiles or runs successfully
+only with the new back end disabled, please
+<a href="https://golang.org/issue/new">file a bug report</a>.
+</p>
+
+<p>
+The format of exported metadata written by the compiler in package archives has changed:
+the old textual format has been replaced by a more compact binary format.
+This results in somewhat smaller package archives and fixes a few
+long-standing corner case bugs.
+</p>
+
+<p>
+For this release, the new export format can be disabled by passing
+<code>-newexport=0</code> to the compiler.
+If you find that your program compiles or runs successfully
+only with the new export format disabled, please
+<a href="https://golang.org/issue/new">file a bug report</a>.
+</p>
+
+<p>
+The linker's <code>-X</code> option no longer supports the unusual two-argument form
+<code>-X</code> <code>name</code> <code>value</code>,
+as <a href="/doc/go1.6#compiler">announced</a> in the Go 1.6 release
+and in warnings printed by the linker.
+Use <code>-X</code> <code>name=value</code> instead.
+</p>
+
+<p>
+The compiler and linker have been optimized and run significantly faster in this release than in Go 1.6,
+although they are still slower than we would like and will continue to be optimized in future releases.
+</p>
+
+<p>
+Due to changes across the compiler toolchain and standard library,
+binaries built with this release should typically be smaller than binaries
+built with Go 1.6,
+sometimes by as much as 20-30%.
+</p>
+
+<p>
+On x86-64 systems, Go programs now maintain stack frame pointers
+as expected by profiling tools like Linux's perf and Intel's VTune,
+making it easier to analyze and optimize Go programs using these tools.
+The frame pointer maintenance has a small run-time overhead that varies
+but averages around 2%. We hope to reduce this cost in future releases.
+To build a toolchain that does not use frame pointers, set
+<code>GOEXPERIMENT=noframepointer</code> when running
+<code>make.bash</code>, <code>make.bat</code>, or <code>make.rc</code>.
+</p>
+
+<h3 id="cmd_cgo">Cgo</h3>
+
+<p>
+Packages using <a href="/cmd/cgo/">cgo</a> may now include
+Fortran source files (in addition to C, C++, Objective C, and SWIG),
+although the Go bindings must still use C language APIs.
+</p>
+
+<p>
+Go bindings may now use a new helper function <code>C.CBytes</code>.
+In contrast to <code>C.CString</code>, which takes a Go <code>string</code>
+and returns a <code>*C.byte</code> (a C <code>char*</code>),
+<code>C.CBytes</code> takes a Go <code>[]byte</code>
+and returns an <code>unsafe.Pointer</code> (a C <code>void*</code>).
+</p>
+
+<p>
+Packages and binaries built using <code>cgo</code> have in past releases
+produced different output on each build,
+due to the embedding of temporary directory names.
+When using this release with
+new enough versions of GCC or Clang
+(those that support the <code>-fdebug-prefix-map</code> option),
+those builds should finally be deterministic.
+</p>
+
+<h3 id="gccgo">Gccgo</h3>
+
+<p>
+Due to the alignment of Go's semiannual release schedule with GCC's annual release schedule,
+GCC release 6 contains the Go 1.6.1 version of gccgo.
+The next release, GCC 7, will likely have the Go 1.8 version of gccgo.
+</p>
+
+<h3 id="cmd_go">Go command</h3>
+
+<p>
+The <a href="/cmd/go/"><code>go</code></a> command's basic operation
+is unchanged, but there are a number of changes worth noting.
+</p>
+
+<p>
+This release removes support for the <code>GO15VENDOREXPERIMENT</code> environment variable,
+as <a href="/doc/go1.6#go_command">announced</a> in the Go 1.6 release.
+<a href="https://golang.org/s/go15vendor">Vendoring support</a>
+is now a standard feature of the <code>go</code> command and toolchain.
+</p>
+
+<p>
+The <code>Package</code> data structure made available to
+“<code>go</code> <code>list</code>” now includes a
+<code>StaleReason</code> field explaining why a particular package
+is or is not considered stale (in need of rebuilding).
+This field is available to the <code>-f</code> or <code>-json</code>
+options and is useful for understanding why a target is being rebuilt.
+</p>
+
+<p>
+The “<code>go</code> <code>get</code>” command now supports
+import paths referring to <code>git.openstack.org</code>.
+</p>
+
+<p>
+This release adds experimental, minimal support for building programs using
+<a href="/pkg/go/build#hdr-Binary_Only_Packages">binary-only packages</a>,
+packages distributed in binary form
+without the corresponding source code.
+This feature is needed in some commercial settings
+but is not intended to be fully integrated into the rest of the toolchain.
+For example, tools that assume access to complete source code
+will not work with such packages, and there are no plans to support
+such packages in the “<code>go</code> <code>get</code>” command.
+</p>
+
+<h3 id="cmd_doc">Go doc</h3>
+
+<p>
+The “<code>go</code> <code>doc</code>” command
+now groups constructors with the type they construct,
+following <a href="/cmd/godoc/"><code>godoc</code></a>.
+</p>
+
+<h3 id="cmd_vet">Go vet</h3>
+
+<p>
+The “<code>go</code> <code>vet</code>” command
+has more accurate analysis in its <code>-copylock</code> and <code>-printf</code> checks,
+and a new <code>-tests</code> check that checks the name and signature of likely test functions.
+To avoid confusion with the new <code>-tests</code> check, the old, unadvertised
+<code>-test</code> option has been removed; it was equivalent to <code>-all</code> <code>-shadow</code>.
+</p>
+
+<p id="vet_lostcancel">
+The <code>vet</code> command also has a new check,
+<code>-lostcancel</code>, which detects failure to call the
+cancelation function returned by the <code>WithCancel</code>,
+<code>WithTimeout</code>, and <code>WithDeadline</code> functions in
+Go 1.7's new <code>context</code> package (see <a
+href='#context'>below</a>).
+Failure to call the function prevents the new <code>Context</code>
+from being reclaimed until its parent is cancelled.
+(The background context is never cancelled.)
+</p>
+
+<h3 id="cmd_dist">Go tool dist</h3>
+
+<p>
+The new subcommand “<code>go</code> <code>tool</code> <code>dist</code> <code>list</code>”
+prints all supported operating system/architecture pairs.
+</p>
+
+<h3 id="cmd_trace">Go tool trace</h3>
+
+<p>
+The “<code>go</code> <code>tool</code> <code>trace</code>” command,
+<a href="/doc/go1.5#trace_command">introduced in Go 1.5</a>,
+has been refined in various ways.
+</p>
+
+<p>
+First, collecting traces is significantly more efficient than in past releases.
+In this release, the typical execution-time overhead of collecting a trace is about 25%;
+in past releases it was at least 400%.
+Second, trace files now include file and line number information,
+making them more self-contained and making the
+original executable optional when running the trace tool.
+Third, the trace tool now breaks up large traces to avoid limits
+in the browser-based viewer.
+</p>
+
+<p>
+Although the trace file format has changed in this release,
+the Go 1.7 tools can still read traces from earlier releases.
+</p>
+
+<h2 id="performance">Performance</h2>
+
+<p>
+As always, the changes are so general and varied that precise statements
+about performance are difficult to make.
+Most programs should run a bit faster,
+due to speedups in the garbage collector and
+optimizations in the core library.
+On x86-64 systems, many programs will run significantly faster,
+due to improvements in generated code brought by the
+new compiler back end.
+As noted above, in our own benchmarks,
+the code generation changes alone typically reduce program CPU time by 5-35%.
+</p>
+
+<p>
+<!-- git log -''-grep '-[0-9][0-9]\.[0-9][0-9]%' go1.6.. -->
+There have been significant optimizations bringing more than 10% improvements
+to implementations in the
+<a href="/pkg/crypto/sha1/"><code>crypto/sha1</code></a>,
+<a href="/pkg/crypto/sha256/"><code>crypto/sha256</code></a>,
+<a href="/pkg/encoding/binary/"><code>encoding/binary</code></a>,
+<a href="/pkg/fmt/"><code>fmt</code></a>,
+<a href="/pkg/hash/adler32/"><code>hash/adler32</code></a>,
+<a href="/pkg/hash/crc32/"><code>hash/crc32</code></a>,
+<a href="/pkg/hash/crc64/"><code>hash/crc64</code></a>,
+<a href="/pkg/image/color/"><code>image/color</code></a>,
+<a href="/pkg/math/big/"><code>math/big</code></a>,
+<a href="/pkg/strconv/"><code>strconv</code></a>,
+<a href="/pkg/strings/"><code>strings</code></a>,
+<a href="/pkg/unicode/"><code>unicode</code></a>,
+and
+<a href="/pkg/unicode/utf16/"><code>unicode/utf16</code></a>
+packages.
+</p>
+
+<p>
+Garbage collection pauses should be significantly shorter than they
+were in Go 1.6 for programs with large numbers of idle goroutines,
+substantial stack size fluctuation, or large package-level variables.
+</p>
+
+<h2 id="library">Core library</h2>
+
+<h3 id="context">Context</h3>
+
+<p>
+Go 1.7 moves the <code>golang.org/x/net/context</code> package
+into the standard library as <a href="/pkg/context/"><code>context</code></a>.
+This allows the use of contexts for cancelation, timeouts, and passing
+request-scoped data in other standard library packages,
+including
+<a href="#net">net</a>,
+<a href="#net_http">net/http</a>,
+and
+<a href="#os_exec">os/exec</a>,
+as noted below.
+</p>
+
+<p>
+For more information about contexts, see the
+<a href="/pkg/context/">package documentation</a>
+and the Go blog post
+“<a href="https://blog.golang.org/context">Go Concurrent Patterns: Context</a>.”
+</p>
+
+<h3 id="httptrace">HTTP Tracing</h3>
+
+<p>
+Go 1.7 introduces <a href="/pkg/net/http/httptrace/"><code>net/http/httptrace</code></a>,
+a package that provides mechanisms for tracing events within HTTP requests.
+</p>
+
+<h3 id="testing">Testing</h3>
+
+<p>
+The <code>testing</code> package now supports the definition
+of tests with subtests and benchmarks with sub-benchmarks.
+This support makes it easy to write table-driven benchmarks
+and to create hierarchical tests.
+It also provides a way to share common setup and tear-down code.
+See the <a href="/pkg/testing/#hdr-Subtests_and_Sub_benchmarks">package documentation</a> for details.
+</p>
+
+<h3 id="runtime">Runtime</h3>
+
+<p>
+All panics started by the runtime now use panic values
+that implement both the
+builtin <a href="/ref/spec#Errors"><code>error</code></a>,
+and
+<a href="/pkg/runtime/#Error"><code>runtime.Error</code></a>,
+as
+<a href="/ref/spec#Run_time_panics">required by the language specification</a>.
+</p>
+
+<p>
+During panics, if a signal's name is known, it will be printed in the stack trace.
+Otherwise, the signal's number will be used, as it was before Go1.7.
+</p>
+
+<p>
+The new function
+<a href="/pkg/runtime/#KeepAlive"><code>KeepAlive</code></a>
+provides an explicit mechanism for declaring
+that an allocated object must be considered reachable
+at a particular point in a program,
+typically to delay the execution of an associated finalizer.
+</p>
+
+<p>
+The new function
+<a href="/pkg/runtime/#CallersFrames"><code>CallersFrames</code></a>
+translates a PC slice obtained from
+<a href="/pkg/runtime/#Callers"><code>Callers</code></a>
+into a sequence of frames corresponding to the call stack.
+This new API should be preferred instead of direct use of
+<a href="/pkg/runtime/#FuncForPC"><code>FuncForPC</code></a>,
+because the frame sequence can more accurately describe
+call stacks with inlined function calls.
+</p>
+
+<p>
+The new function
+<a href="/pkg/runtime/#SetCgoTraceback"><code>SetCgoTraceback</code></a>
+facilitates tighter integration between Go and C code executing
+in the same process called using cgo.
+</p>
+
+<p>
+On 32-bit systems, the runtime can now use memory allocated
+by the operating system anywhere in the address space,
+eliminating the
+“memory allocated by OS not in usable range” failure
+common in some environments.
+</p>
+
+<p>
+The runtime can now return unused memory to the operating system on
+all architectures.
+In Go 1.6 and earlier, the runtime could not
+release memory on ARM64, 64-bit PowerPC, or MIPS.
+</p>
+
+<p>
+On Windows, Go programs in Go 1.5 and earlier forced
+the global Windows timer resolution to 1ms at startup
+by calling <code>timeBeginPeriod(1)</code>.
+Changing the global timer resolution caused problems on some systems,
+and testing suggested that the call was not needed for good scheduler performance,
+so Go 1.6 removed the call.
+Go 1.7 brings the call back: under some workloads the call
+is still needed for good scheduler performance.
+</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="bufio"><dt><a href="/pkg/bufio/">bufio</a></dt>
+
+<dd>
+<p>
+In previous releases of Go, if
+<a href="/pkg/bufio/#Reader"><code>Reader</code></a>'s
+<a href="/pkg/bufio/#Reader.Peek"><code>Peek</code></a> method
+were asked for more bytes than fit in the underlying buffer,
+it would return an empty slice and the error <code>ErrBufferFull</code>.
+Now it returns the entire underlying buffer, still accompanied by the error <code>ErrBufferFull</code>.
+</p>
+</dd>
+</dl>
+
+<dl id="bytes"><dt><a href="/pkg/bytes/">bytes</a></dt>
+
+<dd>
+<p>
+The new functions
+<a href="/pkg/bytes/#ContainsAny"><code>ContainsAny</code></a> and
+<a href="/pkg/bytes/#ContainsRune"><code>ContainsRune</code></a>
+have been added for symmetry with
+the <a href="/pkg/strings/"><code>strings</code></a> package.
+</p>
+
+<p>
+In previous releases of Go, if
+<a href="/pkg/bytes/#Reader"><code>Reader</code></a>'s
+<a href="/pkg/bytes/#Reader.Read"><code>Read</code></a> method
+were asked for zero bytes with no data remaining, it would
+return a count of 0 and no error.
+Now it returns a count of 0 and the error
+<a href="/pkg/io/#EOF"><code>io.EOF</code></a>.
+</p>
+
+<p>
+The
+<a href="/pkg/bytes/#Reader"><code>Reader</code></a> type has a new method
+<a href="/pkg/bytes/#Reader.Reset"><code>Reset</code></a> to allow reuse of a <code>Reader</code>.
+</p>
+</dd>
+</dl>
+
+<dl id="compress_flate"><dt><a href="/pkg/compress/flate/">compress/flate</a></dt>
+
+<dd>
+<p>
+There are many performance optimizations throughout the package.
+Decompression speed is improved by about 10%,
+while compression for <code>DefaultCompression</code> is twice as fast.
+</p>
+
+<p>
+In addition to those general improvements,
+the
+<code>BestSpeed</code>
+compressor has been replaced entirely and uses an
+algorithm similar to <a href="https://github.com/google/snappy">Snappy</a>,
+resulting in about a 2.5X speed increase,
+although the output can be 5-10% larger than with the previous algorithm.
+</p>
+
+<p>
+There is also a new compression level
+<code>HuffmanOnly</code>
+that applies Huffman but not Lempel-Ziv encoding.
+<a href="https://blog.klauspost.com/constant-time-gzipzip-compression/">Forgoing Lempel-Ziv encoding</a> means that
+<code>HuffmanOnly</code> runs about 3X faster than the new <code>BestSpeed</code>
+but at the cost of producing compressed outputs that are 20-40% larger than those
+generated by the new <code>BestSpeed</code>.
+</p>
+
+<p>
+It is important to note that both
+<code>BestSpeed</code> and <code>HuffmanOnly</code> produce a compressed output that is
+<a href="https://tools.ietf.org/html/rfc1951">RFC 1951</a> compliant.
+In other words, any valid DEFLATE decompressor will continue to be able to decompress these outputs.
+</p>
+
+<p>
+Lastly, there is a minor change to the decompressor's implementation of
+<a href="/pkg/io/#Reader"><code>io.Reader</code></a>. In previous versions,
+the decompressor deferred reporting
+<a href="/pkg/io/#EOF"><code>io.EOF</code></a> until exactly no more bytes could be read.
+Now, it reports
+<a href="/pkg/io/#EOF"><code>io.EOF</code></a> more eagerly when reading the last set of bytes.
+</p>
+</dd>
+</dl>
+
+<dl id="crypto_tls"><dt><a href="/pkg/crypto/tls/">crypto/tls</a></dt>
+
+<dd>
+<p>
+The TLS implementation sends the first few data packets on each connection
+using small record sizes, gradually increasing to the TLS maximum record size.
+This heuristic reduces the amount of data that must be received before
+the first packet can be decrypted, improving communication latency over
+low-bandwidth networks.
+Setting
+<a href="/pkg/crypto/tls/#Config"><code>Config</code></a>'s
+<code>DynamicRecordSizingDisabled</code> field to true
+forces the behavior of Go 1.6 and earlier, where packets are
+as large as possible from the start of the connection.
+</p>
+
+<p>
+The TLS client now has optional, limited support for server-initiated renegotiation,
+enabled by setting the
+<a href="/pkg/crypto/tls/#Config"><code>Config</code></a>'s
+<code>Renegotiation</code> field.
+This is needed for connecting to many Microsoft Azure servers.
+</p>
+
+<p>
+The errors returned by the package now consistently begin with a
+<code>tls:</code> prefix.
+In past releases, some errors used a <code>crypto/tls:</code> prefix,
+some used a <code>tls:</code> prefix, and some had no prefix at all.
+</p>
+
+<p>
+When generating self-signed certificates, the package no longer sets the
+“Authority Key Identifier” field by default.
+</p>
+</dd>
+</dl>
+
+<dl id="crypto_x509"><dt><a href="/pkg/crypto/x509/">crypto/x509</a></dt>
+
+<dd>
+<p>
+The new function
+<a href="/pkg/crypto/x509/#SystemCertPool"><code>SystemCertPool</code></a>
+provides access to the entire system certificate pool if available.
+There is also a new associated error type
+<a href="/pkg/crypto/x509/#SystemRootsError"><code>SystemRootsError</code></a>.
+</p>
+</dd>
+</dl>
+
+<dl id="debug_dwarf"><dt><a href="/pkg/debug/dwarf/">debug/dwarf</a></dt>
+
+<dd>
+<p>
+The
+<a href="/pkg/debug/dwarf/#Reader"><code>Reader</code></a> type's new
+<a href="/pkg/debug/dwarf/#Reader.SeekPC"><code>SeekPC</code></a> method and the
+<a href="/pkg/debug/dwarf/#Data"><code>Data</code></a> type's new
+<a href="/pkg/debug/dwarf/#Ranges"><code>Ranges</code></a> method
+help to find the compilation unit to pass to a
+<a href="/pkg/debug/dwarf/#LineReader"><code>LineReader</code></a>
+and to identify the specific function for a given program counter.
+</p>
+</dd>
+</dl>
+
+<dl id="debug_elf"><dt><a href="/pkg/debug/elf/">debug/elf</a></dt>
+
+<dd>
+<p>
+The new
+<a href="/pkg/debug/elf/#R_390"><code>R_390</code></a> relocation type
+and its many predefined constants
+support the S390 port.
+</p>
+</dd>
+</dl>
+
+<dl id="encoding_asn1"><dt><a href="/pkg/encoding/asn1/">encoding/asn1</a></dt>
+
+<dd>
+<p>
+The ASN.1 decoder now rejects non-minimal integer encodings.
+This may cause the package to reject some invalid but formerly accepted ASN.1 data.
+</p>
+</dd>
+</dl>
+
+<dl id="encoding_json"><dt><a href="/pkg/encoding/json/">encoding/json</a></dt>
+
+<dd>
+<p>
+The
+<a href="/pkg/encoding/json/#Encoder"><code>Encoder</code></a>'s new
+<a href="/pkg/encoding/json/#Encoder.SetIndent"><code>SetIndent</code></a> method
+sets the indentation parameters for JSON encoding,
+like in the top-level
+<a href="/pkg/encoding/json/#Indent"><code>Indent</code></a> function.
+</p>
+
+<p>
+The
+<a href="/pkg/encoding/json/#Encoder"><code>Encoder</code></a>'s new
+<a href="/pkg/encoding/json/#Encoder.SetEscapeHTML"><code>SetEscapeHTML</code></a> method
+controls whether the
+<code>&#x26;</code>, <code>&#x3c;</code>, and <code>&#x3e;</code>
+characters in quoted strings should be escaped as
+<code>\u0026</code>, <code>\u003c</code>, and <code>\u003e</code>,
+respectively.
+As in previous releases, the encoder defaults to applying this escaping,
+to avoid certain problems that can arise when embedding JSON in HTML.
+</p>
+
+<p>
+In earlier versions of Go, this package only supported encoding and decoding
+maps using keys with string types.
+Go 1.7 adds support for maps using keys with integer types:
+the encoding uses a quoted decimal representation as the JSON key.
+Go 1.7 also adds support for encoding maps using non-string keys that implement
+the <code>MarshalText</code>
+(see
+<a href="/pkg/encoding/#TextMarshaler"><code>encoding.TextMarshaler</code></a>)
+method,
+as well as support for decoding maps using non-string keys that implement
+the <code>UnmarshalText</code>
+(see
+<a href="/pkg/encoding/#TextUnmarshaler"><code>encoding.TextUnmarshaler</code></a>)
+method.
+These methods are ignored for keys with string types in order to preserve
+the encoding and decoding used in earlier versions of Go.
+</p>
+
+<p>
+When encoding a slice of typed bytes,
+<a href="/pkg/encoding/json/#Marshal"><code>Marshal</code></a>
+now generates an array of elements encoded using
+that byte type's
+<code>MarshalJSON</code>
+or
+<code>MarshalText</code>
+method if present,
+only falling back to the default base64-encoded string data if neither method is available.
+Earlier versions of Go accept both the original base64-encoded string encoding
+and the array encoding (assuming the byte type also implements
+<code>UnmarshalJSON</code>
+or
+<code>UnmarshalText</code>
+as appropriate),
+so this change should be semantically backwards compatible with earlier versions of Go,
+even though it does change the chosen encoding.
+</p>
+</dd>
+</dl>
+
+<dl id="go_build"><dt><a href="/pkg/go/build/">go/build</a></dt>
+
+<dd>
+<p>
+To implement the go command's new support for binary-only packages
+and for Fortran code in cgo-based packages,
+the
+<a href="/pkg/go/build/#Package"><code>Package</code></a> type
+adds new fields <code>BinaryOnly</code>, <code>CgoFFLAGS</code>, and <code>FFiles</code>.
+</p>
+</dd>
+</dl>
+
+<dl id="go_doc"><dt><a href="/pkg/go/doc/">go/doc</a></dt>
+
+<dd>
+<p>
+To support the corresponding change in <code>go</code> <code>test</code> described above,
+<a href="/pkg/go/doc/#Example"><code>Example</code></a> struct adds a Unordered field
+indicating whether the example may generate its output lines in any order.
+</p>
+</dd>
+</dl>
+
+<dl id="io"><dt><a href="/pkg/io/">io</a></dt>
+
+<dd>
+<p>
+The package adds new constants
+<code>SeekStart</code>, <code>SeekCurrent</code>, and <code>SeekEnd</code>,
+for use with
+<a href="/pkg/io/#Seeker"><code>Seeker</code></a>
+implementations.
+These constants are preferred over <code>os.SEEK_SET</code>, <code>os.SEEK_CUR</code>, and <code>os.SEEK_END</code>,
+but the latter will be preserved for compatibility.
+</p>
+</dd>
+</dl>
+
+<dl id="math_big"><dt><a href="/pkg/math/big/">math/big</a></dt>
+
+<dd>
+<p>
+The
+<a href="/pkg/math/big/#Float"><code>Float</code></a> type adds
+<a href="/pkg/math/big/#Float.GobEncode"><code>GobEncode</code></a> and
+<a href="/pkg/math/big/#Float.GobDecode"><code>GobDecode</code></a> methods,
+so that values of type <code>Float</code> can now be encoded and decoded using the
+<a href="/pkg/encoding/gob/"><code>encoding/gob</code></a>
+package.
+</p>
+</dd>
+</dl>
+
+<dl id="math_rand"><dt><a href="/pkg/math/rand/">math/rand</a></dt>
+
+<dd>
+<p>
+The
+<a href="/pkg/math/rand/#Read"><code>Read</code></a> function and
+<a href="/pkg/math/rand/#Rand"><code>Rand</code></a>'s
+<a href="/pkg/math/rand/#Rand.Read"><code>Read</code></a> method
+now produce a pseudo-random stream of bytes that is consistent and not
+dependent on the size of the input buffer.
+</p>
+
+<p>
+The documentation clarifies that
+Rand's <a href="/pkg/math/rand/#Rand.Seed"><code>Seed</code></a>
+and <a href="/pkg/math/rand/#Rand.Read"><code>Read</code></a> methods
+are not safe to call concurrently, though the global
+functions <a href="/pkg/math/rand/#Seed"><code>Seed</code></a>
+and <a href="/pkg/math/rand/#Read"><code>Read</code></a> are (and have
+always been) safe.
+</p>
+</dd>
+</dl>
+
+<dl id="mime_multipart"><dt><a href="/pkg/mime/multipart/">mime/multipart</a></dt>
+
+<dd>
+<p>
+The
+<a href="/pkg/mime/multipart/#Writer"><code>Writer</code></a>
+implementation now emits each multipart section's header sorted by key.
+Previously, iteration over a map caused the section header to use a
+non-deterministic order.
+</p>
+</dd>
+</dl>
+
+<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
+
+<dd>
+<p>
+As part of the introduction of <a href="#context">context</a>, the
+<a href="/pkg/net/#Dialer"><code>Dialer</code></a> type has a new method
+<a href="/pkg/net/#Dialer.DialContext"><code>DialContext</code></a>, like
+<a href="/pkg/net/#Dialer.Dial"><code>Dial</code></a> but adding the
+<a href="/pkg/context/#Context"><code>context.Context</code></a>
+for the dial operation.
+The context is intended to obsolete the <code>Dialer</code>'s
+<code>Cancel</code> and <code>Deadline</code> fields,
+but the implementation continues to respect them,
+for backwards compatibility.
+</p>
+
+<p>
+The
+<a href="/pkg/net/#IP"><code>IP</code></a> type's
+<a href="/pkg/net/#IP.String"><code>String</code></a> method has changed its result for invalid <code>IP</code> addresses.
+In past releases, if an <code>IP</code> byte slice had length other than 0, 4, or 16, <code>String</code>
+returned <code>"?"</code>.
+Go 1.7 adds the hexadecimal encoding of the bytes, as in <code>"?12ab"</code>.
+</p>
+
+<p>
+The pure Go <a href="/pkg/net/#hdr-Name_Resolution">name resolution</a>
+implementation now respects <code>nsswitch.conf</code>'s
+stated preference for the priority of DNS lookups compared to
+local file (that is, <code>/etc/hosts</code>) lookups.
+</p>
+</dd>
+</dl>
+
+<dl id="net_http"><dt><a href="/pkg/net/http/">net/http</a></dt>
+
+<dd>
+<p>
+<a href="/pkg/net/http/#ResponseWriter"><code>ResponseWriter</code></a>'s
+documentation now makes clear that beginning to write the response
+may prevent future reads on the request body.
+For maximal compatibility, implementations are encouraged to
+read the request body completely before writing any part of the response.
+</p>
+
+<p>
+As part of the introduction of <a href="#context">context</a>, the
+<a href="/pkg/net/http/#Request"><code>Request</code></a> has a new methods
+<a href="/pkg/net/http/#Request.Context"><code>Context</code></a>, to retrieve the associated context, and
+<a href="/pkg/net/http/#Request.WithContext"><code>WithContext</code></a>, to construct a copy of <code>Request</code>
+with a modified context.
+</p>
+
+<p>
+In the
+<a href="/pkg/net/http/#Server"><code>Server</code></a> implementation,
+<a href="/pkg/net/http/#Server.Serve"><code>Serve</code></a> records in the request context
+both the underlying <code>*Server</code> using the key <code>ServerContextKey</code>
+and the local address on which the request was received (a
+<a href="/pkg/net/#Addr"><code>Addr</code></a>) using the key <code>LocalAddrContextKey</code>.
+For example, the address on which a request received is
+<code>req.Context().Value(http.LocalAddrContextKey).(net.Addr)</code>.
+</p>
+
+<p>
+The server's <a href="/pkg/net/http/#Server.Serve"><code>Serve</code></a> method
+now only enables HTTP/2 support if the <code>Server.TLSConfig</code> field is <code>nil</code>
+or includes <code>"h2"</code> in its <code>TLSConfig.NextProtos</code>.
+</p>
+
+<p>
+The server implementation now
+pads response codes less than 100 to three digits
+as required by the protocol,
+so that <code>w.WriteHeader(5)</code> uses the HTTP response
+status <code>005</code>, not just <code>5</code>.
+</p>
+
+<p>
+The server implementation now correctly sends only one "Transfer-Encoding" header when "chunked"
+is set explicitly, following <a href="https://tools.ietf.org/html/rfc7230#section-3.3.1">RFC 7230</a>.
+</p>
+
+<p>
+The server implementation is now stricter about rejecting requests with invalid HTTP versions.
+Invalid requests claiming to be HTTP/0.x are now rejected (HTTP/0.9 was never fully supported),
+and plaintext HTTP/2 requests other than the "PRI * HTTP/2.0" upgrade request are now rejected as well.
+The server continues to handle encrypted HTTP/2 requests.
+</p>
+
+<p>
+In the server, a 200 status code is sent back by the timeout handler on an empty
+response body, instead of sending back 0 as the status code.
+</p>
+
+<p>
+In the client, the
+<a href="/pkg/net/http/#Transport"><code>Transport</code></a> implementation passes the request context
+to any dial operation connecting to the remote server.
+If a custom dialer is needed, the new <code>Transport</code> field
+<code>DialContext</code> is preferred over the existing <code>Dial</code> field,
+to allow the transport to supply a context.
+</p>
+
+<p>
+The
+<a href="/pkg/net/http/#Transport"><code>Transport</code></a> also adds fields
+<code>IdleConnTimeout</code>,
+<code>MaxIdleConns</code>,
+and
+<code>MaxResponseHeaderBytes</code>
+to help control client resources consumed
+by idle or chatty servers.
+</p>
+
+<p>
+A
+<a href="/pkg/net/http/#Client"><code>Client</code></a>'s configured <code>CheckRedirect</code> function can now
+return <code>ErrUseLastResponse</code> to indicate that the
+most recent redirect response should be returned as the
+result of the HTTP request.
+That response is now available to the <code>CheckRedirect</code> function
+as <code>req.Response</code>.
+</p>
+
+<p>
+Since Go 1, the default behavior of the HTTP client is
+to request server-side compression
+using the <code>Accept-Encoding</code> request header
+and then to decompress the response body transparently,
+and this behavior is adjustable using the
+<a href="/pkg/net/http/#Transport"><code>Transport</code></a>'s <code>DisableCompression</code> field.
+In Go 1.7, to aid the implementation of HTTP proxies, the
+<a href="/pkg/net/http/#Response"><code>Response</code></a>'s new
+<code>Uncompressed</code> field reports whether
+this transparent decompression took place.
+</p>
+
+<p>
+<a href="/pkg/net/http/#DetectContentType"><code>DetectContentType</code></a>
+adds support for a few new audio and video content types.
+</p>
+</dd>
+</dl>
+
+<dl id="net_http_cgi"><dt><a href="/pkg/net/http/cgi/">net/http/cgi</a></dt>
+
+<dd>
+<p>
+The
+<a href="/pkg/net/http/cgi/#Handler"><code>Handler</code></a>
+adds a new field
+<code>Stderr</code>
+that allows redirection of the child process's
+standard error away from the host process's
+standard error.
+</p>
+</dd>
+</dl>
+
+<dl id="net_http_httptest"><dt><a href="/pkg/net/http/httptest/">net/http/httptest</a></dt>
+
+<dd>
+<p>
+The new function
+<a href="/pkg/net/http/httptest/#NewRequest"><code>NewRequest</code></a>
+prepares a new
+<a href="/pkg/net/http/#Request"><code>http.Request</code></a>
+suitable for passing to an
+<a href="/pkg/net/http/#Handler"><code>http.Handler</code></a> during a test.
+</p>
+
+<p>
+The
+<a href="/pkg/net/http/httptest/#ResponseRecorder"><code>ResponseRecorder</code></a>'s new
+<a href="/pkg/net/http/httptest/#ResponseRecorder.Result"><code>Result</code></a> method
+returns the recorded
+<a href="/pkg/net/http/#Response"><code>http.Response</code></a>.
+Tests that need to check the response's headers or trailers
+should call <code>Result</code> and inspect the response fields
+instead of accessing
+<code>ResponseRecorder</code>'s <code>HeaderMap</code> directly.
+</p>
+</dd>
+</dl>
+
+<dl id="net_http_httputil"><dt><a href="/pkg/net/http/httputil/">net/http/httputil</a></dt>
+
+<dd>
+<p>
+The
+<a href="/pkg/net/http/httputil/#ReverseProxy"><code>ReverseProxy</code></a> implementation now responds with “502 Bad Gateway”
+when it cannot reach a back end; in earlier releases it responded with “500 Internal Server Error.”
+</p>
+
+<p>
+Both
+<a href="/pkg/net/http/httputil/#ClientConn"><code>ClientConn</code></a> and
+<a href="/pkg/net/http/httputil/#ServerConn"><code>ServerConn</code></a> have been documented as deprecated.
+They are low-level, old, and unused by Go's current HTTP stack
+and will no longer be updated.
+Programs should use
+<a href="/pkg/net/http/#Client"><code>http.Client</code></a>,
+<a href="/pkg/net/http/#Transport"><code>http.Transport</code></a>,
+and
+<a href="/pkg/net/http/#Server"><code>http.Server</code></a>
+instead.
+</p>
+</dd>
+</dl>
+
+<dl id="net_http_pprof"><dt><a href="/pkg/net/http/pprof/">net/http/pprof</a></dt>
+
+<dd>
+<p>
+The runtime trace HTTP handler, installed to handle the path <code>/debug/pprof/trace</code>,
+now accepts a fractional number in its <code>seconds</code> query parameter,
+allowing collection of traces for intervals smaller than one second.
+This is especially useful on busy servers.
+</p>
+</dd>
+</dl>
+
+<dl><dt><a href="/pkg/net/mail/">net/mail</a></dt>
+
+<dd>
+<p>
+The address parser now allows unescaped UTF-8 text in addresses
+following <a href="https://tools.ietf.org/html/rfc6532">RFC 6532</a>,
+but it does not apply any normalization to the result.
+For compatibility with older mail parsers,
+the address encoder, namely
+<a href="/pkg/net/mail/#Address"><code>Address</code></a>'s
+<a href="/pkg/net/mail/#Address.String"><code>String</code></a> method,
+continues to escape all UTF-8 text following <a href="https://tools.ietf.org/html/rfc5322">RFC 5322</a>.
+</p>
+
+<p>
+The <a href="/pkg/net/mail/#ParseAddress"><code>ParseAddress</code></a>
+function and
+the <a href="/pkg/net/mail/#AddressParser.Parse"><code>AddressParser.Parse</code></a>
+method are stricter.
+They used to ignore any characters following an e-mail address, but
+will now return an error for anything other than whitespace.
+</p>
+</dd>
+</dl>
+
+<dl id="net_url"><dt><a href="/pkg/net/url/">net/url</a></dt>
+
+<dd>
+<p>
+The
+<a href="/pkg/net/url/#URL"><code>URL</code></a>'s
+new <code>ForceQuery</code> field
+records whether the URL must have a query string,
+in order to distinguish URLs without query strings (like <code>/search</code>)
+from URLs with empty query strings (like <code>/search?</code>).
+</p>
+</dd>
+</dl>
+
+<dl id="os"><dt><a href="/pkg/os/">os</a></dt>
+
+<dd>
+<p>
+<a href="/pkg/os/#IsExist"><code>IsExist</code></a> now returns true for <code>syscall.ENOTEMPTY</code>,
+on systems where that error exists.
+</p>
+
+<p>
+On Windows,
+<a href="/pkg/os/#Remove"><code>Remove</code></a> now removes read-only files when possible,
+making the implementation behave as on
+non-Windows systems.
+</p>
+</dd>
+</dl>
+
+<dl id="os_exec"><dt><a href="/pkg/os/exec/">os/exec</a></dt>
+
+<dd>
+<p>
+As part of the introduction of <a href="#context">context</a>,
+the new constructor
+<a href="/pkg/os/exec/#CommandContext"><code>CommandContext</code></a>
+is like
+<a href="/pkg/os/exec/#Command"><code>Command</code></a> but includes a context that can be used to cancel the command execution.
+</p>
+</dd>
+</dl>
+
+<dl id="os_user"><dt><a href="/pkg/os/user/">os/user</a></dt>
+
+<dd>
+<p>
+The
+<a href="/pkg/os/user/#Current"><code>Current</code></a>
+function is now implemented even when cgo is not available.
+</p>
+
+<p>
+The new
+<a href="/pkg/os/user/#Group"><code>Group</code></a> type,
+along with the lookup functions
+<a href="/pkg/os/user/#LookupGroup"><code>LookupGroup</code></a> and
+<a href="/pkg/os/user/#LookupGroupId"><code>LookupGroupId</code></a>
+and the new field <code>GroupIds</code> in the <code>User</code> struct,
+provides access to system-specific user group information.
+</p>
+</dd>
+</dl>
+
+<dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
+
+<dd>
+<p>
+Although
+<a href="/pkg/reflect/#Value"><code>Value</code></a>'s
+<a href="/pkg/reflect/#Value.Field"><code>Field</code></a> method has always been documented to panic
+if the given field number <code>i</code> is out of range, it has instead
+silently returned a zero
+<a href="/pkg/reflect/#Value"><code>Value</code></a>.
+Go 1.7 changes the method to behave as documented.
+</p>
+
+<p>
+The new
+<a href="/pkg/reflect/#StructOf"><code>StructOf</code></a>
+function constructs a struct type at run time.
+It completes the set of type constructors, joining
+<a href="/pkg/reflect/#ArrayOf"><code>ArrayOf</code></a>,
+<a href="/pkg/reflect/#ChanOf"><code>ChanOf</code></a>,
+<a href="/pkg/reflect/#FuncOf"><code>FuncOf</code></a>,
+<a href="/pkg/reflect/#MapOf"><code>MapOf</code></a>,
+<a href="/pkg/reflect/#PtrTo"><code>PtrTo</code></a>,
+and
+<a href="/pkg/reflect/#SliceOf"><code>SliceOf</code></a>.
+</p>
+
+<p>
+<a href="/pkg/reflect/#StructTag"><code>StructTag</code></a>'s
+new method
+<a href="/pkg/reflect/#StructTag.Lookup"><code>Lookup</code></a>
+is like
+<a href="/pkg/reflect/#StructTag.Get"><code>Get</code></a>
+but distinguishes the tag not containing the given key
+from the tag associating an empty string with the given key.
+</p>
+
+<p>
+The
+<a href="/pkg/reflect/#Type.Method"><code>Method</code></a> and
+<a href="/pkg/reflect/#Type.NumMethod"><code>NumMethod</code></a>
+methods of
+<a href="/pkg/reflect/#Type"><code>Type</code></a> and
+<a href="/pkg/reflect/#Value"><code>Value</code></a>
+no longer return or count unexported methods.
+</p>
+</dd>
+</dl>
+
+<dl id="strings"><dt><a href="/pkg/strings/">strings</a></dt>
+
+<dd>
+<p>
+In previous releases of Go, if
+<a href="/pkg/strings/#Reader"><code>Reader</code></a>'s
+<a href="/pkg/strings/#Reader.Read"><code>Read</code></a> method
+were asked for zero bytes with no data remaining, it would
+return a count of 0 and no error.
+Now it returns a count of 0 and the error
+<a href="/pkg/io/#EOF"><code>io.EOF</code></a>.
+</p>
+
+<p>
+The
+<a href="/pkg/strings/#Reader"><code>Reader</code></a> type has a new method
+<a href="/pkg/strings/#Reader.Reset"><code>Reset</code></a> to allow reuse of a <code>Reader</code>.
+</p>
+</dd>
+</dl>
+
+<dl id="time"><dt><a href="/pkg/time/">time</a></dt>
+
+<dd>
+<p>
+<a href="/pkg/time/#Duration"><code>Duration</code></a>'s
+time.Duration.String method now reports the zero duration as <code>"0s"</code>, not <code>"0"</code>.
+<a href="/pkg/time/#ParseDuration"><code>ParseDuration</code></a> continues to accept both forms.
+</p>
+
+<p>
+The method call <code>time.Local.String()</code> now returns <code>"Local"</code> on all systems;
+in earlier releases, it returned an empty string on Windows.
+</p>
+
+<p>
+The time zone database in
+<code>$GOROOT/lib/time</code> has been updated
+to IANA release 2016d.
+This fallback database is only used when the system time zone database
+cannot be found, for example on Windows.
+The Windows time zone abbreviation list has also been updated.
+</p>
+</dd>
+</dl>
+
+<dl id="syscall"><dt><a href="/pkg/syscall/">syscall</a></dt>
+
+<dd>
+<p>
+On Linux, the
+<a href="/pkg/syscall/#SysProcAttr"><code>SysProcAttr</code></a> struct
+(as used in
+<a href="/pkg/os/exec/#Cmd"><code>os/exec.Cmd</code></a>'s <code>SysProcAttr</code> field)
+has a new <code>Unshareflags</code> field.
+If the field is nonzero, the child process created by
+<a href="/pkg/syscall/#ForkExec"><code>ForkExec</code></a>
+(as used in <code>exec.Cmd</code>'s <code>Run</code> method)
+will call the
+<a href="http://man7.org/linux/man-pages/man2/unshare.2.html"><i>unshare</i>(2)</a>
+system call before executing the new program.
+</p>
+</dd>
+</dl>
+
+
+<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 version 8.0 to
+<a href="http://www.unicode.org/versions/Unicode9.0.0/">Unicode 9.0</a>.
+</p>
+</dd>
+</dl>
diff --git a/_content/doc/go1.8.html b/_content/doc/go1.8.html
new file mode 100644
index 0000000..2a47fac
--- /dev/null
+++ b/_content/doc/go1.8.html
@@ -0,0 +1,1666 @@
+<!--{
+	"Title": "Go 1.8 Release Notes",
+	"Path":  "/doc/go1.8",
+	"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.8</h2>
+
+<p>
+The latest Go release, version 1.8, arrives six months after <a href="go1.7">Go 1.7</a>.
+Most of its changes are in the implementation of the toolchain, runtime, and libraries.
+There are <a href="#language">two minor changes</a> to the language specification.
+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>
+The release <a href="#ports">adds support for 32-bit MIPS</a>,
+<a href="#compiler">updates the compiler back end</a> to generate more efficient code,
+<a href="#gc">reduces GC pauses</a> by eliminating stop-the-world stack rescanning,
+<a href="#h2push">adds HTTP/2 Push support</a>,
+<a href="#http_shutdown">adds HTTP graceful shutdown</a>,
+<a href="#more_context">adds more context support</a>,
+<a href="#mutex_prof">enables profiling mutexes</a>,
+and <a href="#sort_slice">simplifies sorting slices</a>.
+</p>
+
+<h2 id="language">Changes to the language</h2>
+
+<p>
+  When explicitly converting a value from one struct type to another,
+  as of Go 1.8 the tags are ignored. Thus two structs that differ
+  only in their tags may be converted from one to the other:
+</p>
+
+<pre>
+func example() {
+	type T1 struct {
+		X int `json:"foo"`
+	}
+	type T2 struct {
+		X int `json:"bar"`
+	}
+	var v1 T1
+	var v2 T2
+	v1 = T1(v2) // now legal
+}
+</pre>
+
+
+<p> <!-- CL 17711 -->
+  The language specification now only requires that implementations
+  support up to 16-bit exponents in floating-point constants.  This does not affect
+  either the “<a href="/cmd/compile/"><code>gc</code></a>” or
+  <code>gccgo</code> compilers, both of
+  which still support 32-bit exponents.
+</p>
+
+<h2 id="ports">Ports</h2>
+
+<p>
+Go now supports 32-bit MIPS on Linux for both big-endian
+(<code>linux/mips</code>) and little-endian machines
+(<code>linux/mipsle</code>) that implement the MIPS32r1 instruction set with FPU
+or kernel FPU emulation. Note that many common MIPS-based routers lack an FPU and
+have firmware that doesn't enable kernel FPU emulation; Go won't run on such machines.
+</p>
+
+<p>
+On DragonFly BSD, Go now requires DragonFly 4.4.4 or later. <!-- CL 29491, CL 29971 -->
+</p>
+
+<p>
+On OpenBSD, Go now requires OpenBSD 5.9 or later. <!-- CL 34093 -->
+</p>
+
+<p>
+The Plan 9 port's networking support is now much more complete
+and matches the behavior of Unix and Windows with respect to deadlines
+and cancelation. For Plan 9 kernel requirements, see the
+<a href="https://golang.org/wiki/Plan9">Plan 9 wiki page</a>.
+</p>
+
+<p>
+  Go 1.8 now only supports OS X 10.8 or later. This is likely the last
+  Go release to support 10.8. Compiling Go or running
+  binaries on older OS X versions is untested.
+</p>
+
+<p>
+  Go 1.8 will be the last release to support Linux on ARMv5E and ARMv6 processors:
+  Go 1.9 will likely require the ARMv6K (as found in the Raspberry Pi 1) or later.
+  To identify whether a Linux system is ARMv6K or later, run
+  “<code>go</code> <code>tool</code> <code>dist</code> <code>-check-armv6k</code>”
+  (to facilitate testing, it is also possible to just copy the <code>dist</code> command to the
+  system without installing a full copy of Go 1.8)
+  and if the program terminates with output "ARMv6K supported." then the system
+  implements ARMv6K or later.
+  Go on non-Linux ARM systems already requires ARMv6K or later.
+</p>
+
+
+<h3 id="known_issues">Known Issues</h3>
+
+<p>
+There are some instabilities on FreeBSD and NetBSD that are known but not understood.
+These can lead to program crashes in rare cases.
+See
+<a href="https://golang.org/issue/15658">issue 15658</a> and
+<a href="https://golang.org/issue/16511">issue 16511</a>.
+Any help in solving these issues would be appreciated.
+</p>
+
+<h2 id="tools">Tools</h2>
+
+<h3 id="cmd_asm">Assembler</h3>
+
+<p>
+For 64-bit x86 systems, the following instructions have been added:
+<code>VBROADCASTSD</code>,
+<code>BROADCASTSS</code>,
+<code>MOVDDUP</code>,
+<code>MOVSHDUP</code>,
+<code>MOVSLDUP</code>,
+<code>VMOVDDUP</code>,
+<code>VMOVSHDUP</code>, and
+<code>VMOVSLDUP</code>.
+</p>
+
+<p>
+For 64-bit PPC systems, the common vector scalar instructions have been
+added:
+<code>LXS</code>,
+<code>LXSDX</code>,
+<code>LXSI</code>,
+<code>LXSIWAX</code>,
+<code>LXSIWZX</code>,
+<code>LXV</code>,
+<code>LXVD2X</code>,
+<code>LXVDSX</code>,
+<code>LXVW4X</code>,
+<code>MFVSR</code>,
+<code>MFVSRD</code>,
+<code>MFVSRWZ</code>,
+<code>MTVSR</code>,
+<code>MTVSRD</code>,
+<code>MTVSRWA</code>,
+<code>MTVSRWZ</code>,
+<code>STXS</code>,
+<code>STXSDX</code>,
+<code>STXSI</code>,
+<code>STXSIWX</code>,
+<code>STXV</code>,
+<code>STXVD2X</code>,
+<code>STXVW4X</code>,
+<code>XSCV</code>,
+<code>XSCVDPSP</code>,
+<code>XSCVDPSPN</code>,
+<code>XSCVDPSXDS</code>,
+<code>XSCVDPSXWS</code>,
+<code>XSCVDPUXDS</code>,
+<code>XSCVDPUXWS</code>,
+<code>XSCVSPDP</code>,
+<code>XSCVSPDPN</code>,
+<code>XSCVSXDDP</code>,
+<code>XSCVSXDSP</code>,
+<code>XSCVUXDDP</code>,
+<code>XSCVUXDSP</code>,
+<code>XSCVX</code>,
+<code>XSCVXP</code>,
+<code>XVCV</code>,
+<code>XVCVDPSP</code>,
+<code>XVCVDPSXDS</code>,
+<code>XVCVDPSXWS</code>,
+<code>XVCVDPUXDS</code>,
+<code>XVCVDPUXWS</code>,
+<code>XVCVSPDP</code>,
+<code>XVCVSPSXDS</code>,
+<code>XVCVSPSXWS</code>,
+<code>XVCVSPUXDS</code>,
+<code>XVCVSPUXWS</code>,
+<code>XVCVSXDDP</code>,
+<code>XVCVSXDSP</code>,
+<code>XVCVSXWDP</code>,
+<code>XVCVSXWSP</code>,
+<code>XVCVUXDDP</code>,
+<code>XVCVUXDSP</code>,
+<code>XVCVUXWDP</code>,
+<code>XVCVUXWSP</code>,
+<code>XVCVX</code>,
+<code>XVCVXP</code>,
+<code>XXLAND</code>,
+<code>XXLANDC</code>,
+<code>XXLANDQ</code>,
+<code>XXLEQV</code>,
+<code>XXLNAND</code>,
+<code>XXLNOR</code>,
+<code>XXLOR</code>,
+<code>XXLORC</code>,
+<code>XXLORQ</code>,
+<code>XXLXOR</code>,
+<code>XXMRG</code>,
+<code>XXMRGHW</code>,
+<code>XXMRGLW</code>,
+<code>XXPERM</code>,
+<code>XXPERMDI</code>,
+<code>XXSEL</code>,
+<code>XXSI</code>,
+<code>XXSLDWI</code>,
+<code>XXSPLT</code>, and
+<code>XXSPLTW</code>.
+</p>
+
+<h3 id="tool_yacc">Yacc</h3>
+
+<p> <!-- CL 27324, CL 27325 -->
+The <code>yacc</code> tool (previously available by running
+“<code>go</code> <code>tool</code> <code>yacc</code>”) has been removed.
+As of Go 1.7 it was no longer used by the Go compiler.
+It has moved to the “tools” repository and is now available at
+<code><a href="https://godoc.org/golang.org/x/tools/cmd/goyacc">golang.org/x/tools/cmd/goyacc</a></code>.
+</p>
+
+<h3 id="tool_fix">Fix</h3>
+
+<p> <!-- CL 28872 -->
+  The <code>fix</code> tool has a new “<code>context</code>”
+  fix to change imports from “<code>golang.org/x/net/context</code>”
+  to “<a href="/pkg/context/"><code>context</code></a>”.
+</p>
+
+<h3 id="tool_pprof">Pprof</h3>
+
+<p> <!-- CL 33157 -->
+  The <code>pprof</code> tool can now profile TLS servers
+  and skip certificate validation by using the “<code>https+insecure</code>”
+  URL scheme.
+</p>
+
+<p> <!-- CL 23781 -->
+  The callgrind output now has instruction-level granularity.
+</p>
+
+<h3 id="tool_trace">Trace</h3>
+
+<p> <!-- CL 23324 -->
+  The <code>trace</code> tool has a new <code>-pprof</code> flag for
+  producing pprof-compatible blocking and latency profiles from an
+  execution trace.
+</p>
+
+<p> <!-- CL 30017, CL 30702 -->
+  Garbage collection events are now shown more clearly in the
+  execution trace viewer. Garbage collection activity is shown on its
+  own row and GC helper goroutines are annotated with their roles.
+</p>
+
+<h3 id="tool_vet">Vet</h3>
+
+<p>Vet is stricter in some ways and looser where it
+  previously caused false positives.</p>
+
+<p>Vet now checks for copying an array of locks,
+  duplicate JSON and XML struct field tags,
+  non-space-separated struct tags,
+  deferred calls to HTTP <code>Response.Body.Close</code>
+  before checking errors, and
+  indexed arguments in <code>Printf</code>.
+  It also improves existing checks.</p>
+</p>
+
+<h3 id="compiler">Compiler Toolchain</h3>
+
+<p>
+Go 1.7 introduced a new compiler back end for 64-bit x86 systems.
+In Go 1.8, that back end has been developed further and is now used for
+all architectures.
+</p>
+
+<p>
+The new back end, based on
+<a href="https://en.wikipedia.org/wiki/Static_single_assignment_form">static single assignment form</a> (SSA),
+generates more compact, more efficient code
+and provides a better platform for optimizations
+such as bounds check elimination.
+The new back end reduces the CPU time required by
+<a href="https://golang.org/test/bench/go1/">our benchmark programs</a> by 20-30%
+on 32-bit ARM systems. For 64-bit x86 systems, which already used the SSA back end in
+Go 1.7, the gains are a more modest 0-10%. Other architectures will likely
+see improvements closer to the 32-bit ARM numbers.
+</p>
+
+<p>
+  The temporary <code>-ssa=0</code> compiler flag introduced in Go 1.7
+  to disable the new back end has been removed in Go 1.8.
+</p>
+
+<p>
+  In addition to enabling the new compiler back end for all systems,
+  Go 1.8 also introduces a new compiler front end. The new compiler
+  front end should not be noticeable to users but is the foundation for
+  future performance work.
+</p>
+
+<p>
+  The compiler and linker have been optimized and run faster in this
+  release than in Go 1.7, although they are still slower than we would
+  like and will continue to be optimized in future releases.
+  Compared to the previous release, Go 1.8 is
+  <a href="https://dave.cheney.net/2016/11/19/go-1-8-toolchain-improvements">about 15% faster</a>.
+</p>
+
+<h3 id="cmd_cgo">Cgo</h3>
+
+<p> <!-- CL 31141 -->
+The Go tool now remembers the value of the <code>CGO_ENABLED</code> environment
+variable set during <code>make.bash</code> and applies it to all future compilations
+by default to fix issue <a href="https://golang.org/issue/12808">#12808</a>.
+When doing native compilation, it is rarely necessary to explicitly set
+the <code>CGO_ENABLED</code> environment variable as <code>make.bash</code>
+will detect the correct setting automatically. The main reason to explicitly
+set the <code>CGO_ENABLED</code> environment variable is when your environment
+supports cgo, but you explicitly do not want cgo support, in which case, set
+<code>CGO_ENABLED=0</code> during <code>make.bash</code> or <code>all.bash</code>.
+</p>
+
+<p> <!-- CL 29991 -->
+The environment variable <code>PKG_CONFIG</code> may now be used to
+set the program to run to handle <code>#cgo</code> <code>pkg-config</code>
+directives.  The default is <code>pkg-config</code>, the program
+always used by earlier releases.  This is intended to make it easier
+to cross-compile
+<a href="/cmd/cgo/">cgo</a> code.
+</p>
+
+<p> <!-- CL 32354 -->
+The <a href="/cmd/cgo/">cgo</a> tool now supports a <code>-srcdir</code>
+option, which is used by the <a href="/cmd/go/">go</a> command.
+</p>
+
+<p> <!-- CL 31768, 31811 -->
+If <a href="/cmd/cgo/">cgo</a> code calls <code>C.malloc</code>, and
+<code>malloc</code> returns <code>NULL</code>, the program will now
+crash with an out of memory error.
+<code>C.malloc</code> will never return <code>nil</code>.
+Unlike most C functions, <code>C.malloc</code> may not be used in a
+two-result form returning an errno value.
+</p>
+
+<p> <!-- CL 33237 -->
+If <a href="/cmd/cgo/">cgo</a> is used to call a C function passing a
+pointer to a C union, and if the C union can contain any pointer
+values, and if <a href="/cmd/cgo/#hdr-Passing_pointers">cgo pointer
+checking</a> is enabled (as it is by default), the union value is now
+checked for Go pointers.
+</p>
+
+<h3 id="gccgo">Gccgo</h3>
+
+<p>
+Due to the alignment of Go's semiannual release schedule with GCC's
+annual release schedule,
+GCC release 6 contains the Go 1.6.1 version of gccgo.
+We expect that the next release, GCC 7, will contain the Go 1.8
+version of gccgo.
+</p>
+
+<h3 id="gopath">Default GOPATH</h3>
+
+<p>
+  The
+  <a href="/cmd/go/#hdr-GOPATH_environment_variable"><code>GOPATH</code>
+  environment variable</a> now has a default value if it
+  is unset. It defaults to
+  <code>$HOME/go</code> on Unix and
+  <code>%USERPROFILE%/go</code> on Windows.
+</p>
+
+<h3 id="go_get">Go get</h3>
+
+<p> <!-- CL 34818 -->
+  The “<code>go</code> <code>get</code>” command now always respects
+  HTTP proxy environment variables, regardless of whether
+  the <code style='white-space:nowrap'>-insecure</code> flag is used. In previous releases, the
+  <code style='white-space:nowrap'>-insecure</code> flag had the side effect of not using proxies.
+</p>
+
+<h3 id="go_bug">Go bug</h3>
+
+<p>
+  The new
+  “<a href="/cmd/go/#hdr-Print_information_for_bug_reports"><code>go</code> <code>bug</code></a>”
+  command starts a bug report on GitHub, prefilled
+  with information about the current system.
+</p>
+
+<h3 id="cmd_doc">Go doc</h3>
+
+<p> <!-- CL 25419 -->
+  The
+  “<a href="/cmd/go/#hdr-Show_documentation_for_package_or_symbol"><code>go</code> <code>doc</code></a>”
+  command now groups constants and variables with their type,
+  following the behavior of
+  <a href="/cmd/godoc/"><code>godoc</code></a>.
+</p>
+
+<p> <!-- CL 25420 -->
+  In order to improve the readability of <code>doc</code>'s
+  output, each summary of the first-level items is guaranteed to
+  occupy a single line.
+</p>
+
+<p> <!-- CL 31852 -->
+  Documentation for a specific method in an interface definition can
+  now be requested, as in
+  “<code>go</code> <code>doc</code> <code>net.Conn.SetDeadline</code>”.
+</p>
+
+<h3 id="plugin">Plugins</h3>
+
+<p>
+  Go now provides early support for plugins with a “<code>plugin</code>”
+  build mode for generating plugins written in Go, and a
+  new <a href="/pkg/plugin/"><code>plugin</code></a> package for
+  loading such plugins at run time. Plugin support is currently only
+  available on Linux. Please report any issues.
+</p>
+
+<h2 id="runtime">Runtime</h2>
+
+<h3 id="liveness">Argument Liveness</h3>
+
+<p>
+  <!-- Issue 15843 --> The garbage collector no longer considers
+  arguments live throughout the entirety of a function. For more
+  information, and for how to force a variable to remain live, see
+  the <a href="/pkg/runtime/#KeepAlive"><code>runtime.KeepAlive</code></a>
+  function added in Go 1.7.
+</p>
+
+<p>
+  <i>Updating:</i>
+  Code that sets a finalizer on an allocated object may need to add
+  calls to <code>runtime.KeepAlive</code> in functions or methods
+  using that object.
+  Read the
+  <a href="/pkg/runtime/#KeepAlive"><code>KeepAlive</code>
+  documentation</a> and its example for more details.
+</p>
+
+<h3 id="mapiter">Concurrent Map Misuse</h3>
+
+<p>
+In Go 1.6, the runtime
+<a href="/doc/go1.6#runtime">added lightweight,
+best-effort detection of concurrent misuse of maps</a>. This release
+improves that detector with support for detecting programs that
+concurrently write to and iterate over a map.
+</p>
+<p>
+As always, if one goroutine is writing to a map, no other goroutine should be
+reading (which includes iterating) or writing the map concurrently.
+If the runtime detects this condition, it prints a diagnosis and crashes the program.
+The best way to find out more about the problem is to run the program
+under the
+<a href="https://blog.golang.org/race-detector">race detector</a>,
+which will more reliably identify the race
+and give more detail.
+</p>
+
+<h3 id="memstats">MemStats Documentation</h3>
+
+<p> <!-- CL 28972 -->
+  The <a href="/pkg/runtime/#MemStats"><code>runtime.MemStats</code></a>
+  type has been more thoroughly documented.
+</p>
+
+<h2 id="performance">Performance</h2>
+
+<p>
+As always, the changes are so general and varied that precise statements
+about performance are difficult to make.
+Most programs should run a bit faster,
+due to speedups in the garbage collector and
+optimizations in the standard library.
+</p>
+
+<p>
+There have been optimizations to implementations in the
+<a href="/pkg/bytes/"><code>bytes</code></a>,
+<a href="/pkg/crypto/aes/"><code>crypto/aes</code></a>,
+<a href="/pkg/crypto/cipher/"><code>crypto/cipher</code></a>,
+<a href="/pkg/crypto/elliptic/"><code>crypto/elliptic</code></a>,
+<a href="/pkg/crypto/sha256/"><code>crypto/sha256</code></a>,
+<a href="/pkg/crypto/sha512/"><code>crypto/sha512</code></a>,
+<a href="/pkg/encoding/asn1/"><code>encoding/asn1</code></a>,
+<a href="/pkg/encoding/csv/"><code>encoding/csv</code></a>,
+<a href="/pkg/encoding/hex/"><code>encoding/hex</code></a>,
+<a href="/pkg/encoding/json/"><code>encoding/json</code></a>,
+<a href="/pkg/hash/crc32/"><code>hash/crc32</code></a>,
+<a href="/pkg/image/color/"><code>image/color</code></a>,
+<a href="/pkg/image/draw/"><code>image/draw</code></a>,
+<a href="/pkg/math/"><code>math</code></a>,
+<a href="/pkg/math/big/"><code>math/big</code></a>,
+<a href="/pkg/reflect/"><code>reflect</code></a>,
+<a href="/pkg/regexp/"><code>regexp</code></a>,
+<a href="/pkg/runtime/"><code>runtime</code></a>,
+<a href="/pkg/strconv/"><code>strconv</code></a>,
+<a href="/pkg/strings/"><code>strings</code></a>,
+<a href="/pkg/syscall/"><code>syscall</code></a>,
+<a href="/pkg/text/template/"><code>text/template</code></a>, and
+<a href="/pkg/unicode/utf8/"><code>unicode/utf8</code></a>
+packages.
+</p>
+
+<h3 id="gc">Garbage Collector</h3>
+
+<p>
+  Garbage collection pauses should be significantly shorter than they
+  were in Go 1.7, usually under 100 microseconds and often as low as
+  10 microseconds.
+  See the
+  <a href="https://github.com/golang/proposal/blob/master/design/17503-eliminate-rescan.md"
+     >document on eliminating stop-the-world stack re-scanning</a>
+  for details.  More work remains for Go 1.9.
+</p>
+
+<h3 id="defer">Defer</h3>
+
+<!-- CL 29656, CL 29656 -->
+<p>
+  The overhead of <a href="/ref/spec/#Defer_statements">deferred
+  function calls</a> has been reduced by about half.
+</p>
+
+<h3 id="cgoperf">Cgo</h3>
+
+<p>The overhead of calls from Go into C has been reduced by about half.</p>
+
+<h2 id="library">Standard library</h2>
+
+<h3 id="examples">Examples</h3>
+
+<p>
+Examples have been added to the documentation across many packages.
+</p>
+
+<h3 id="sort_slice">Sort</h3>
+
+<p>
+The <a href="/pkg/sort/">sort</a> package
+now includes a convenience function
+<a href="/pkg/sort/#Slice"><code>Slice</code></a> to sort a
+slice given a <em>less</em> function.
+
+In many cases this means that writing a new sorter type is not
+necessary.
+</p>
+
+<p>
+Also new are
+<a href="/pkg/sort/#SliceStable"><code>SliceStable</code></a> and
+<a href="/pkg/sort/#SliceIsSorted"><code>SliceIsSorted</code></a>.
+</p>
+
+<h3 id="h2push">HTTP/2 Push</h3>
+
+<p>
+The <a href="/pkg/net/http/">net/http</a> package now includes a
+mechanism to
+send HTTP/2 server pushes from a
+<a href="/pkg/net/http/#Handler"><code>Handler</code></a>.
+Similar to the existing <code>Flusher</code> and <code>Hijacker</code>
+interfaces, an HTTP/2
+<a href="/pkg/net/http/#ResponseWriter"><code>ResponseWriter</code></a>
+now implements the new
+<a href="/pkg/net/http/#Pusher"><code>Pusher</code></a> interface.
+</p>
+
+<h3 id="http_shutdown">HTTP Server Graceful Shutdown</h3>
+
+<p> <!-- CL 32329 -->
+  The HTTP Server now has support for graceful shutdown using the new
+  <a href="/pkg/net/http/#Server.Shutdown"><code>Server.Shutdown</code></a>
+  method and abrupt shutdown using the new
+  <a href="/pkg/net/http/#Server.Close"><code>Server.Close</code></a>
+  method.
+</p>
+
+<h3 id="more_context">More Context Support</h3>
+
+<p>
+  Continuing <a href="/doc/go1.7#context">Go 1.7's adoption</a>
+  of <a href="/pkg/context/#Context"><code>context.Context</code></a>
+  into the standard library, Go 1.8 adds more context support
+  to existing packages:
+</p>
+
+<ul>
+  <li>The new <a href="/pkg/net/http/#Server.Shutdown"><code>Server.Shutdown</code></a>
+    takes a context argument.</li>
+  <li>There have been <a href="#database_sql">significant additions</a> to the
+    <a href="/pkg/database/sql/">database/sql</a> package with context support.</li>
+  <li>All nine of the new <code>Lookup</code> methods on the new
+    <a href="/pkg/net/#Resolver"><code>net.Resolver</code></a> now
+    take a context.</li>
+  </ul>
+
+<h3 id="mutex_prof">Mutex Contention Profiling</h3>
+
+<p>
+  The runtime and tools now support profiling contended mutexes.
+</p>
+
+<p>
+  Most users will want to use the new <code>-mutexprofile</code>
+  flag with “<a href="/cmd/go/#hdr-Description_of_testing_flags"><code>go</code> <code>test</code></a>”,
+  and then use <a href="/cmd/pprof/">pprof</a> on the resultant file.
+</p>
+
+<p>
+  Lower-level support is also available via the new
+  <a href="/pkg/runtime/#MutexProfile"><code>MutexProfile</code></a>
+  and
+  <a href="/pkg/runtime/#SetMutexProfileFraction"><code>SetMutexProfileFraction</code></a>.
+</p>
+
+<p>
+  A known limitation for Go 1.8 is that the profile only reports contention for
+  <a href="/pkg/sync/#Mutex"><code>sync.Mutex</code></a>,
+  not 
+  <a href="/pkg/sync/#RWMutex"><code>sync.RWMutex</code></a>.
+</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. The following sections list the user visible changes and additions.
+Optimizations and minor bug fixes are not listed.
+</p>
+
+<dl id="archive_tar"><dt><a href="/pkg/archive/tar/">archive/tar</a></dt>
+  <dd>
+
+    <p> <!-- CL 28471, CL 31440, CL 31441, CL 31444, CL 28418, CL 31439 -->
+      The tar implementation corrects many bugs in corner cases of the file format.
+      The <a href="/pkg/archive/tar/#Reader"><code>Reader</code></a>
+      is now able to process tar files in the PAX format with entries larger than 8GB.
+      The <a href="/pkg/archive/tar/#Writer"><code>Writer</code></a>
+      no longer produces invalid tar files in some situations involving long pathnames.
+    </p>
+
+  </dd>
+</dl>
+
+<dl id="compress_flate"><dt><a href="/pkg/compress/flate/">compress/flate</a></dt>
+  <dd>
+
+    <p> <!-- CL 31640, CL 31174, CL 32149 -->
+      There have been some minor fixes to the encoder to improve the
+      compression ratio in certain situations. As a result, the exact
+      encoded output of <code>DEFLATE</code> may be different from Go 1.7. Since
+      <code>DEFLATE</code> is the underlying compression of gzip, png, zlib, and zip,
+      those formats may have changed outputs.
+    </p>
+
+    <p> <!-- CL 31174 -->
+      The encoder, when operating in
+      <a href="/pkg/compress/flate/#NoCompression"><code>NoCompression</code></a>
+      mode, now produces a consistent output that is not dependent on
+      the size of the slices passed to the
+      <a href="/pkg/compress/flate/#Writer.Write"><code>Write</code></a>
+      method.
+    </p>
+
+    <p> <!-- CL 28216 -->
+      The decoder, upon encountering an error, now returns any
+      buffered data it had uncompressed along with the error.
+    </p>
+
+  </dd>
+</dl>
+
+
+<dl id="compress_gzip"><dt><a href="/pkg/compress/gzip/">compress/gzip</a></dt>
+  <dd>
+
+    <p>
+      The <a href="/pkg/compress/gzip/#Writer"><code>Writer</code></a>
+      now encodes a zero <code>MTIME</code> field when
+      the <a href="/pkg/compress/gzip/#Header"><code>Header.ModTime</code></a>
+      field is the zero value.
+
+      In previous releases of Go, the <code>Writer</code> would encode
+      a nonsensical value.
+
+      Similarly,
+      the <a href="/pkg/compress/gzip/#Reader"><code>Reader</code></a>
+      now reports a zero encoded <code>MTIME</code> field as a zero
+      <code>Header.ModTime</code>.
+    </p>
+
+  </dd>
+</dl>
+
+<dl id="context"><dt><a href="/pkg/context/">context</a></dt>
+  <dd>
+    <p> <!-- CL 30370 -->
+      The <a href="/pkg/context#DeadlineExceeded"><code>DeadlineExceeded</code></a>
+      error now implements
+      <a href="/pkg/net/#Error"><code>net.Error</code></a>
+      and reports true for both the <code>Timeout</code> and
+      <code>Temporary</code> methods.
+    </p>
+  </dd>
+</dl>
+
+<dl id="crypto_tls"><dt><a href="/pkg/crypto/tls/">crypto/tls</a></dt>
+  <dd>
+    <p> <!-- CL 25159, CL 31318 -->
+      The new method
+      <a href="/pkg/crypto/tls/#Conn.CloseWrite"><code>Conn.CloseWrite</code></a>
+      allows TLS connections to be half closed.
+    </p>
+
+    <p> <!-- CL 28075 -->
+      The new method
+      <a href="/pkg/crypto/tls/#Config.Clone"><code>Config.Clone</code></a>
+      clones a TLS configuration.
+    </p>
+
+    <p>
+      <!-- CL 30790 -->
+      The new <a href="/pkg/crypto/tls/#Config.GetConfigForClient"><code>Config.GetConfigForClient</code></a>
+      callback allows selecting a configuration for a client dynamically, based
+      on the client's
+      <a href="/pkg/crypto/tls/#ClientHelloInfo"><code>ClientHelloInfo</code></a>.
+
+      <!-- CL 31391, CL 32119 -->
+      The <a href="/pkg/crypto/tls/#ClientHelloInfo"><code>ClientHelloInfo</code></a>
+      struct now has new
+      fields <code>Conn</code>, <code>SignatureSchemes</code> (using
+      the new
+      type <a href="/kg/crypto/tls/#SignatureScheme"><code>SignatureScheme</code></a>),
+      <code>SupportedProtos</code>, and <code>SupportedVersions</code>.
+    </p>
+
+    <p> <!-- CL 32115 -->
+      The new <a href="/pkg/crypto/tls/#Config.GetClientCertificate"><code>Config.GetClientCertificate</code></a>
+      callback allows selecting a client certificate based on the server's
+      TLS <code>CertificateRequest</code> message, represented by the new
+      <a href="/pkg/crypto/tls/#CertificateRequestInfo"><code>CertificateRequestInfo</code></a>.
+    </p>
+
+    <p> <!-- CL 27434 -->
+      The new
+      <a href="/pkg/crypto/tls/#Config.KeyLogWriter"><code>Config.KeyLogWriter</code></a>
+      allows debugging TLS connections
+      in <a href="https://www.wireshark.org/">WireShark</a> and
+      similar tools.
+    </p>
+
+    <p> <!-- CL 32115 -->
+      The new
+      <a href="/pkg/crypto/tls/#Config.VerifyPeerCertificate"><code>Config.VerifyPeerCertificate</code></a>
+      callback allows additional validation of a peer's presented certificate.
+    </p>
+
+    <p> <!-- CL 18130 -->
+      The <code>crypto/tls</code> package now implements basic
+      countermeasures against CBC padding oracles. There should be
+      no explicit secret-dependent timings, but it does not attempt to
+      normalize memory accesses to prevent cache timing leaks.
+    </p>
+
+    <p>
+      The <code>crypto/tls</code> package now supports
+      X25519 and <!-- CL 30824, CL 30825 -->
+      ChaCha20-Poly1305.  <!-- CL 30957, CL 30958 -->
+      ChaCha20-Poly1305 is now prioritized unless <!-- CL 32871 -->
+      hardware support for AES-GCM is present.
+    </p>
+
+    <p> <!-- CL 27315, CL 35290 -->
+      AES-128-CBC cipher suites with SHA-256 are also
+      now supported, but disabled by default.
+    </p>
+
+  </dd>
+</dl>
+
+<dl id="crypto_x509"><dt><a href="/pkg/crypto/x509/">crypto/x509</a></dt>
+  <dd>
+    <p> <!-- CL 24743 -->
+      PSS signatures are now supported.
+    </p>
+
+    <p> <!-- CL 32644 -->
+      <a href="/pkg/crypto/x509/#UnknownAuthorityError"><code>UnknownAuthorityError</code></a>
+      now has a <code>Cert</code> field, reporting the untrusted
+      certificate.
+    </p>
+
+    <p>
+      Certificate validation is more permissive in a few cases and
+      stricter in a few other cases.
+    <!--
+crypto/x509: allow a leaf certificate to be specified directly as root (CL 27393)
+crypto/x509: check that the issuer name matches the issuer's subject name (CL 23571)
+crypto/x509: don't accept a root that already appears in a chain. (CL 32121)
+crypto/x509: fix name constraints handling (CL 30155)
+crypto/x509: parse all names in an RDN (CL 30810)
+crypto/x509: recognise ISO OID for RSA+SHA1 (CL 27394)
+crypto/x509: require a NULL parameters for RSA public keys (CL 16166, CL 27312)
+crypto/x509: return error for missing SerialNumber (CL 27238)
+-->
+    </p>
+
+    <p><!-- CL 30375 -->
+      Root certificates will now also be looked for
+      at <code>/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem</code>
+      on Linux, to support RHEL and CentOS.
+    </p>
+
+  </dd>
+</dl>
+
+<dl id="database_sql"><dt><a href="/pkg/database/sql/">database/sql</a></dt>
+  <dd>
+    <p>
+      The package now supports <code>context.Context</code>. There are new methods
+      ending in <code>Context</code> such as
+      <a href="/pkg/database/sql/#DB.QueryContext"><code>DB.QueryContext</code></a> and
+      <a href="/pkg/database/sql/#DB.PrepareContext"><code>DB.PrepareContext</code></a>
+      that take context arguments. Using the new <code>Context</code> methods ensures that
+      connections are closed and returned to the connection pool when the
+      request is done; enables canceling in-progress queries
+      should the driver support that; and allows the database
+      pool to cancel waiting for the next available connection.
+    </p>
+    <p>
+      The <a href="/pkg/database/sql#IsolationLevel"><code>IsolationLevel</code></a>
+      can now be set when starting a transaction by setting the isolation level
+      on <a href="/pkg/database/sql#TxOptions.Isolation"><code>TxOptions.Isolation</code></a> and passing
+      it to <a href="/pkg/database/sql#DB.BeginTx"><code>DB.BeginTx</code></a>.
+      An error will be returned if an isolation level is selected that the driver
+      does not support. A read-only attribute may also be set on the transaction
+      by setting <a href="/pkg/database/sql/#TxOptions.ReadOnly"><code>TxOptions.ReadOnly</code></a>
+      to true.
+    </p>
+    <p>
+      Queries now expose the SQL column type information for drivers that support it.
+      Rows can return <a href="/pkg/database/sql#Rows.ColumnTypes"><code>ColumnTypes</code></a>
+      which can include SQL type information, column type lengths, and the Go type.
+    </p>
+    <p>
+      A <a href="/pkg/database/sql/#Rows"><code>Rows</code></a>
+      can now represent multiple result sets. After
+      <a href="/pkg/database/sql/#Rows.Next"><code>Rows.Next</code></a> returns false,
+      <a href="/pkg/database/sql/#Rows.NextResultSet"><code>Rows.NextResultSet</code></a>
+      may be called to advance to the next result set. The existing <code>Rows</code>
+      should continue to be used after it advances to the next result set.
+      </p>
+    <p>
+      <a href="/pkg/database/sql/#NamedArg"><code>NamedArg</code></a> may be used
+      as query arguments. The new function <a href="/pkg/database/sql/#Named"><code>Named</code></a>
+      helps create a <a href="/pkg/database/sql/#NamedArg"><code>NamedArg</code></a>
+      more succinctly.
+    <p>
+      If a driver supports the new
+      <a href="/pkg/database/sql/driver/#Pinger"><code>Pinger</code></a>
+      interface, the
+      <a href="/pkg/database/sql/#DB.Ping"><code>DB.Ping</code></a>
+      and
+      <a href="/pkg/database/sql/#DB.PingContext"><code>DB.PingContext</code></a>
+      methods will use that interface to check whether a
+      database connection is still valid.
+    </p>
+    <p>
+      The new <code>Context</code> query methods work for all drivers, but
+      <code>Context</code> cancelation is not responsive unless the driver has been
+      updated to use them. The other features require driver support in
+      <a href="/pkg/database/sql/driver"><code>database/sql/driver</code></a>.
+      Driver authors should review the new interfaces. Users of existing
+      driver should review the driver documentation to see what
+      it supports and any system specific documentation on each feature.
+    </p>
+  </dd>
+</dl>
+
+<dl id="debug_pe"><dt><a href="/pkg/debug/pe/">debug/pe</a></dt>
+  <dd>
+    <p> <!-- CL 22720, CL 27212, CL 22181, CL 22332, CL 22336, Issue 15345 -->
+      The package has been extended and is now used by
+      <a href="/cmd/link/">the Go linker</a> to read <code>gcc</code>-generated object files.
+      The new
+      <a href="/pkg/debug/pe/#File.StringTable"><code>File.StringTable</code></a>
+      and
+      <a href="/pkg/debug/pe/#Section.Relocs"><code>Section.Relocs</code></a>
+      fields provide access to the COFF string table and COFF relocations.
+      The new
+      <a href="/pkg/debug/pe/#File.COFFSymbols"><code>File.COFFSymbols</code></a>
+      allows low-level access to the COFF symbol table.
+      </p>
+  </dd>
+</dl>
+
+<dl id="encoding_base64"><dt><a href="/pkg/encoding/base64/">encoding/base64</a></dt>
+  <dd>
+    <p> <!-- CL 24964 -->
+      The new
+      <a href="/pkg/encoding/base64/#Encoding.Strict"><code>Encoding.Strict</code></a>
+      method returns an <code>Encoding</code> that causes the decoder
+      to return an error when the trailing padding bits are not zero.
+    </p>
+  </dd>
+</dl>
+
+<dl id="encoding_binary"><dt><a href="/pkg/encoding/binary/">encoding/binary</a></dt>
+  <dd>
+    <p> <!-- CL 28514 -->
+      <a href="/pkg/encoding/binary/#Read"><code>Read</code></a>
+      and
+      <a href="/pkg/encoding/binary/#Write"><code>Write</code></a>
+      now support booleans.
+    </p>
+  </dd>
+</dl>
+
+<dl id="encoding_json"><dt><a href="/pkg/encoding/json/">encoding/json</a></dt>
+  <dd>
+
+    <p> <!-- CL 18692  -->
+      <a href="/pkg/encoding/json/#UnmarshalTypeError"><code>UnmarshalTypeError</code></a>
+      now includes the struct and field name.
+    </p>
+
+    <p> <!-- CL 31932 -->
+      A nil <a href="/pkg/encoding/json/#Marshaler"><code>Marshaler</code></a>
+      now marshals as a JSON <code>null</code> value.
+    </p>
+
+    <p> <!-- CL 21811 -->
+      A <a href="/pkg/encoding/json/#RawMessage"><code>RawMessage</code></a> value now
+      marshals the same as its pointer type.
+    </p>
+
+    <p> <!-- CL 30371 -->
+      <a href="/pkg/encoding/json/#Marshal"><code>Marshal</code></a>
+      encodes floating-point numbers using the same format as in ES6,
+      preferring decimal (not exponential) notation for a wider range of values.
+      In particular, all floating-point integers up to 2<sup>64</sup> format the
+      same as the equivalent <code>int64</code> representation.
+    </p>
+
+    <p> <!-- CL 30944 -->
+      In previous versions of Go, unmarshaling a JSON <code>null</code> into an
+      <a href="/pkg/encoding/json/#Unmarshaler"><code>Unmarshaler</code></a>
+      was considered a no-op; now the <code>Unmarshaler</code>'s
+      <code>UnmarshalJSON</code> method is called with the JSON literal
+      <code>null</code> and can define the semantics of that case.
+    </p>
+
+  </dd>
+</dl>
+
+<dl id="encoding_pem"><dt><a href="/pkg/encoding/pem/">encoding/pem</a></dt>
+  <dd>
+    <p> <!-- CL 27391 -->
+      <a href="/pkg/encoding/pem/#Decode"><code>Decode</code></a>
+      is now strict about the format of the ending line.
+    </p>
+  </dd>
+</dl>
+
+<dl id="encoding_xml"><dt><a href="/pkg/encoding/xml/">encoding/xml</a></dt>
+  <dd>
+    <p> <!-- CL 30946 -->
+      <a href="/pkg/encoding/xml/#Unmarshal"><code>Unmarshal</code></a>
+      now has wildcard support for collecting all attributes using
+      the new <code>",any,attr"</code> struct tag.
+    </p>
+  </dd>
+</dl>
+
+<dl id="expvar"><dt><a href="/pkg/expvar/">expvar</a></dt>
+  <dd>
+    <p> <!-- CL 30917 -->
+      The new methods
+      <a href="/pkg/expvar/#Int.Value"><code>Int.Value</code></a>,
+      <a href="/pkg/expvar/#String.Value"><code>String.Value</code></a>,
+      <a href="/pkg/expvar/#Float.Value"><code>Float.Value</code></a>, and
+      <a href="/pkg/expvar/#Func.Value"><code>Func.Value</code></a>
+      report the current value of an exported variable.
+    </p>
+
+    <p> <!-- CL 24722 -->
+      The new
+      function <a href="/pkg/expvar/#Handler"><code>Handler</code></a>
+      returns the package's HTTP handler, to enable installing it in
+      non-standard locations.
+      </p>
+  </dd>
+</dl>
+
+<dl id="fmt"><dt><a href="/pkg/fmt/">fmt</a></dt>
+  <dd>
+    <p><!-- CL 30611 -->
+      <a href="/pkg/fmt/#Scanf"><code>Scanf</code></a>,
+      <a href="/pkg/fmt/#Fscanf"><code>Fscanf</code></a>, and
+      <a href="/pkg/fmt/#Sscanf"><code>Sscanf</code></a> now
+      handle spaces differently and more consistently than
+      previous releases. See the
+      <a href="/pkg/fmt/#hdr-Scanning">scanning documentation</a>
+      for details.
+    </p>
+  </dd>
+</dl>
+
+<dl id="go_doc"><dt><a href="/pkg/go/doc/">go/doc</a></dt>
+  <dd>
+    <p><!-- CL 29870 -->
+      The new <a href="/pkg/go/doc/#IsPredeclared"><code>IsPredeclared</code></a>
+      function reports whether a string is a predeclared identifier.
+    </p>
+  </dd>
+</dl>
+
+<dl id="go_types"><dt><a href="/pkg/go/types/">go/types</a></dt>
+  <dd>
+    <p><!-- CL 30715 -->
+      The new function
+      <a href="/pkg/go/types/#Default"><code>Default</code></a>
+      returns the default "typed" type for an "untyped" type.
+    </p>
+
+    <p><!-- CL 31939 -->
+      The alignment of <code>complex64</code> now matches
+      the <a href="/cmd/compile/">Go compiler</a>.
+    </p>
+  </dd>
+</dl>
+
+<dl id="html_template"><dt><a href="/pkg/html/template/">html/template</a></dt>
+  <dd>
+    <p><!-- CL 14336 -->
+      The package now validates
+      the <code>"type"</code> attribute on
+      a <code>&lt;script&gt;</code> tag.
+    </p>
+  </dd>
+</dl>
+
+<dl id="image_png"><dt><a href="/pkg/image/png/">image/png</a></dt>
+  <dd>
+    <p> <!-- CL 32143, CL 32140 -->
+      <a href="/pkg/image/png/#Decode"><code>Decode</code></a>
+      (and <code>DecodeConfig</code>)
+      now supports True Color and grayscale transparency.
+    </p>
+    <p> <!-- CL 29872 -->
+      <a href="/pkg/image/png/#Encoder"><code>Encoder</code></a>
+      is now faster and creates smaller output
+      when encoding paletted images.
+      </p>
+  </dd>
+</dl>
+
+<dl id="math_big"><dt><a href="/pkg/math/big/">math/big</a></dt>
+  <dd>
+    <p><!-- CL 30706 -->
+      The new method
+      <a href="/pkg/math/big/#Int.Sqrt"><code>Int.Sqrt</code></a>
+      calculates ⌊√x⌋.
+    </p>
+
+    <p>
+      The new method
+      <a href="/pkg/math/big/#Float.Scan"><code>Float.Scan</code></a>
+      is a support routine for
+      <a href="/pkg/fmt/#Scanner"><code>fmt.Scanner</code></a>.
+    </p>
+
+    <p>
+      <a href="/pkg/math/big/#Int.ModInverse"><code>Int.ModInverse</code></a>
+      now supports negative numbers.
+    </p>
+
+  </dd>
+</dl>
+
+<dl id="math_rand"><dt><a href="/pkg/math/rand/">math/rand</a></dt>
+  <dd>
+
+    <p><!-- CL 27253, CL 33456 -->
+      The new <a href="/pkg/math/rand/#Rand.Uint64"><code>Rand.Uint64</code></a>
+      method returns <code>uint64</code> values. The
+      new <a href="/pkg/math/rand/#Source64"><code>Source64</code></a>
+      interface describes sources capable of generating such values
+      directly; otherwise the <code>Rand.Uint64</code> method
+      constructs a <code>uint64</code> from two calls
+      to <a href="/pkg/math/rand/#Source"><code>Source</code></a>'s
+      <code>Int63</code> method.
+    </p>
+
+  </dd>
+</dl>
+
+<dl id="mime"><dt><a href="/pkg/mime/">mime</a></dt>
+  <dd>
+    <p> <!-- CL 32175 -->
+    <a href="/pkg/mime/#ParseMediaType"><code>ParseMediaType</code></a>
+    now preserves unnecessary backslash escapes as literals,
+    in order to support MSIE.
+    When MSIE sends a full file path (in “intranet mode”), it does not
+    escape backslashes: “<code>C:\dev\go\foo.txt</code>”, not
+    “<code>C:\\dev\\go\\foo.txt</code>”.
+    If we see an unnecessary backslash escape, we now assume it is from MSIE
+    and intended as a literal backslash.
+    No known MIME generators emit unnecessary backslash escapes
+    for simple token characters like numbers and letters.
+    </p>
+  </dd>
+</dl>
+
+<dl id="mime_quotedprintable"><dt><a href="/pkg/mime/quotedprintable/">mime/quotedprintable</a></dt>
+  <dd>
+
+    <p>
+      The
+      <a href="/pkg/mime/quotedprintable/#Reader"><code>Reader</code></a>'s
+      parsing has been relaxed in two ways to accept
+      more input seen in the wild.
+
+      <!-- CL 32174 -->
+      First, it accepts an equals sign (<code>=</code>) not followed
+      by two hex digits as a literal equal sign.
+
+      <!-- CL 27530 -->
+      Second, it silently ignores a trailing equals sign at the end of
+      an encoded input.
+    </p>
+
+  </dd>
+</dl>
+
+<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
+  <dd>
+
+    <p><!-- CL 30164, CL 33473 -->
+      The <a href="/pkg/net/#Conn"><code>Conn</code></a> documentation
+      has been updated to clarify expectations of an interface
+      implementation. Updates in the <code>net/http</code> packages
+      depend on implementations obeying the documentation.
+    </p>
+    <p><i>Updating:</i> implementations of the <code>Conn</code> interface should verify
+      they implement the documented semantics. The
+      <a href="https://godoc.org/golang.org/x/net/nettest">golang.org/x/net/nettest</a>
+      package will exercise a <code>Conn</code> and validate it behaves properly.
+    </p>
+
+    <p><!-- CL 32099 -->
+      The new method
+      <a href="/pkg/net/#UnixListener.SetUnlinkOnClose"><code>UnixListener.SetUnlinkOnClose</code></a>
+      sets whether the underlying socket file should be removed from the file system when
+      the listener is closed.
+    </p>
+
+    <p><!-- CL 29951 -->
+      The new <a href="/pkg/net/#Buffers"><code>Buffers</code></a> type permits
+      writing to the network more efficiently from multiple discontiguous buffers
+      in memory. On certain machines, for certain types of connections,
+      this is optimized into an OS-specific batch write operation (such as <code>writev</code>).
+    </p>
+
+    <p><!-- CL 29440 -->
+      The new <a href="/pkg/net/#Resolver"><code>Resolver</code></a> looks up names and numbers
+      and supports <a href="/pkg/context/#Context"><code>context.Context</code></a>.
+      The <a href="/pkg/net/#Dialer"><code>Dialer</code></a> now has an optional
+      <a href="/pkg/net/#Dialer.Resolver"><code>Resolver</code> field</a>.
+    </p>
+
+    <p><!-- CL 29892 -->
+      <a href="/pkg/net/#Interfaces"><code>Interfaces</code></a> is now supported on Solaris.
+    </p>
+
+    <p><!-- CL 29233, CL 24901 -->
+      The Go DNS resolver now supports <code>resolv.conf</code>'s “<code>rotate</code>”
+      and “<code>option</code> <code>ndots:0</code>” options. The “<code>ndots</code>” option is
+      now respected in the same way as <code>libresolve</code>.
+    </p>
+
+  </dd>
+</dl>
+
+<dl id="net_http"><dt><a href="/pkg/net/http/">net/http</a></dt>
+  <dd>
+
+    <p>Server changes:</p>
+    <ul>
+      <li>The server now supports graceful shutdown support, <a href="#http_shutdown">mentioned above</a>.</li>
+
+      <li> <!-- CL 32024 -->
+        The <a href="/pkg/net/http/#Server"><code>Server</code></a>
+        adds configuration options
+        <code>ReadHeaderTimeout</code> and <code>IdleTimeout</code>
+        and documents <code>WriteTimeout</code>.
+      </li>
+
+      <li> <!-- CL 32014 -->
+        <a href="/pkg/net/http/#FileServer"><code>FileServer</code></a>
+        and
+        <a href="/pkg/net/http/#ServeContent"><code>ServeContent</code></a>
+        now support HTTP <code>If-Match</code> conditional requests,
+        in addition to the previous <code>If-None-Match</code>
+        support for ETags properly formatted according to RFC 7232, section 2.3.
+      </li>
+    </ul>
+
+    <p>
+      There are several additions to what a server's <code>Handler</code> can do:
+    </p>
+
+    <ul>
+      <li><!-- CL 31173 -->
+        The <a href="/pkg/context/#Context"><code>Context</code></a>
+        returned
+        by <a href="/pkg/net/http/#Request.Context"><code>Request.Context</code></a>
+        is canceled if the underlying <code>net.Conn</code>
+        closes. For instance, if the user closes their browser in the
+        middle of a slow request, the <code>Handler</code> can now
+        detect that the user is gone. This complements the
+        existing <a href="/pkg/net/http/#CloseNotifier"><code>CloseNotifier</code></a>
+        support. This functionality requires that the underlying
+        <a href="/pkg/net/#Conn"><code>net.Conn</code></a> implements
+        <a href="#net">recently clarified interface documentation</a>.
+      </li>
+
+      <li><!-- CL 32479 -->
+        To serve trailers produced after the header has already been written,
+        see the new
+        <a href="/pkg/net/http/#TrailerPrefix"><code>TrailerPrefix</code></a>
+        mechanism.
+      </li>
+
+      <li><!-- CL 33099 -->
+        A <code>Handler</code> can now abort a response by panicking
+        with the error
+        <a href="/pkg/net/http/#ErrAbortHandler"><code>ErrAbortHandler</code></a>.
+      </li>
+
+      <li><!-- CL 30812 -->
+        A <code>Write</code> of zero bytes to a
+        <a href="/pkg/net/http/#ResponseWriter"><code>ResponseWriter</code></a>
+        is now defined as a
+        way to test whether a <code>ResponseWriter</code> has been hijacked:
+        if so, the <code>Write</code> returns
+        <a href="/pkg/net/http/#ErrHijacked"><code>ErrHijacked</code></a>
+        without printing an error
+        to the server's error log.
+      </li>
+
+    </ul>
+
+    <p>Client &amp; Transport changes:</p>
+    <ul>
+      <li><!-- CL 28930, CL 31435 -->
+        The <a href="/pkg/net/http/#Client"><code>Client</code></a>
+        now copies most request headers on redirect. See
+        <a href="/pkg/net/http/#Client">the documentation</a>
+        on the <code>Client</code> type for details.
+      </li>
+
+      <li><!-- CL 29072 -->
+        The <a href="/pkg/net/http/#Transport"><code>Transport</code></a>
+        now supports international domain names. Consequently, so do
+        <a href="/pkg/net/http/#Get">Get</a> and other helpers.
+      </li>
+
+      <li><!-- CL 31733, CL 29852 -->
+        The <code>Client</code> now supports 301, 307, and 308 redirects.
+
+        For example, <code>Client.Post</code> now follows 301
+        redirects, converting them to <code>GET</code> requests
+        without bodies, like it did for 302 and 303 redirect responses
+        previously.
+
+        The <code>Client</code> now also follows 307 and 308
+        redirects, preserving the original request method and body, if
+        any. If the redirect requires resending the request body, the
+        request must have the new
+        <a href="/pkg/net/http/#Request"><code>Request.GetBody</code></a>
+        field defined.
+        <a href="/pkg/net/http/#NewRequest"><code>NewRequest</code></a>
+        sets <code>Request.GetBody</code> automatically for common
+        body types.
+      </li>
+
+      <li><!-- CL 32482 -->
+        The <code>Transport</code> now rejects requests for URLs with
+        ports containing non-digit characters.
+      </li>
+
+      <li><!-- CL 27117 -->
+        The <code>Transport</code> will now retry non-idempotent
+        requests if no bytes were written before a network failure
+        and the request has no body.
+      </li>
+
+      <li><!-- CL 32481 -->
+        The
+        new <a href="/pkg/net/http/#Transport"><code>Transport.ProxyConnectHeader</code></a>
+        allows configuration of header values to send to a proxy
+        during a <code>CONNECT</code> request.
+      </li>
+
+      <li> <!-- CL 28077 -->
+        The <a href="/pkg/net/http/#DefaultTransport"><code>DefaultTransport.Dialer</code></a>
+        now enables <code>DualStack</code> ("<a href="https://tools.ietf.org/html/rfc6555">Happy Eyeballs</a>") support,
+        allowing the use of IPv4 as a backup if it looks like IPv6 might be
+        failing.
+      </li>
+
+      <li> <!-- CL 31726 -->
+        The <a href="/pkg/net/http/#Transport"><code>Transport</code></a>
+        no longer reads a byte of a non-nil
+        <a href="/pkg/net/http/#Request.Body"><code>Request.Body</code></a>
+        when the
+        <a href="/pkg/net/http/#Request.ContentLength"><code>Request.ContentLength</code></a>
+        is zero to determine whether the <code>ContentLength</code>
+        is actually zero or just undefined.
+        To explicitly signal that a body has zero length,
+        either set it to <code>nil</code>, or set it to the new value
+        <a href="/pkg/net/http/#NoBody"><code>NoBody</code></a>.
+        The new <code>NoBody</code> value is intended for use by <code>Request</code>
+        constructor functions; it is used by
+        <a href="/pkg/net/http/#NewRequest"><code>NewRequest</code></a>.
+      </li>
+    </ul>
+
+  </dd>
+</dl>
+
+<dl id="net_http_httptrace"><dt><a href="/pkg/net/http/httptrace/">net/http/httptrace</a></dt>
+  <dd>
+    <p> <!-- CL 30359 -->
+    There is now support for tracing a client request's TLS handshakes with
+    the new
+    <a href="/pkg/net/http/httptrace/#ClientTrace.TLSHandshakeStart"><code>ClientTrace.TLSHandshakeStart</code></a>
+    and
+    <a href="/pkg/net/http/httptrace/#ClientTrace.TLSHandshakeDone"><code>ClientTrace.TLSHandshakeDone</code></a>.
+    </p>
+  </dd>
+</dl>
+
+<dl id="net_http_httputil"><dt><a href="/pkg/net/http/httputil/">net/http/httputil</a></dt>
+  <dd>
+    <p> <!-- CL 32356 -->
+    The <a href="/pkg/net/http/httputil/#ReverseProxy"><code>ReverseProxy</code></a>
+    has a new optional hook,
+    <a href="/pkg/net/http/httputil/#ReverseProxy.ModifyResponse"><code>ModifyResponse</code></a>,
+    for modifying the response from the back end before proxying it to the client.
+    </p>
+
+  </dd>
+</dl>
+
+<dl id="net_mail"><dt><a href="/pkg/net/mail/">net/mail</a></dt>
+  <dd>
+
+    <p> <!-- CL 32176 -->
+      Empty quoted strings are once again allowed in the name part of
+      an address. That is, Go 1.4 and earlier accepted
+      <code>""</code> <code>&lt;gopher@example.com&gt;</code>,
+      but Go 1.5 introduced a bug that rejected this address.
+      The address is recognized again.
+    </p>
+
+    <p> <!-- CL 31581 -->
+      The
+      <a href="/pkg/net/mail/#Header.Date"><code>Header.Date</code></a>
+      method has always provided a way to parse
+      the <code>Date:</code> header.
+      A new function
+      <a href="/pkg/net/mail/#ParseDate"><code>ParseDate</code></a>
+      allows parsing dates found in other
+      header lines, such as the <code>Resent-Date:</code> header.
+    </p>
+
+  </dd>
+</dl>
+
+<dl id="net_smtp"><dt><a href="/pkg/net/smtp/">net/smtp</a></dt>
+  <dd>
+
+    <p> <!-- CL 33143 -->
+      If an implementation of the
+      <a href="/pkg/net/smtp/#Auth"><code>Auth.Start</code></a>
+      method returns an empty <code>toServer</code> value,
+      the package no longer sends
+      trailing whitespace in the SMTP <code>AUTH</code> command,
+      which some servers rejected.
+    </p>
+
+  </dd>
+</dl>
+
+<dl id="net_url"><dt><a href="/pkg/net/url/">net/url</a></dt>
+  <dd>
+
+    <p> <!-- CL 31322 -->
+      The new functions
+      <a href="/pkg/net/url/#PathEscape"><code>PathEscape</code></a>
+      and
+      <a href="/pkg/net/url/#PathUnescape"><code>PathUnescape</code></a>
+      are similar to the query escaping and unescaping functions but
+      for path elements.
+    </p>
+
+    <p> <!-- CL 28933 -->
+      The new methods
+      <a href="/pkg/net/url/#URL.Hostname"><code>URL.Hostname</code></a>
+      and
+      <a href="/pkg/net/url/#URL.Port"><code>URL.Port</code></a>
+      return the hostname and port fields of a URL,
+      correctly handling the case where the port may not be present.
+    </p>
+
+    <p> <!-- CL 28343 -->
+      The existing method
+      <a href="/pkg/net/url/#URL.ResolveReference"><code>URL.ResolveReference</code></a>
+      now properly handles paths with escaped bytes without losing
+      the escaping.
+    </p>
+
+    <p> <!-- CL 31467 -->
+      The <code>URL</code> type now implements
+      <a href="/pkg/encoding/#BinaryMarshaler"><code>encoding.BinaryMarshaler</code></a> and
+      <a href="/pkg/encoding/#BinaryUnmarshaler"><code>encoding.BinaryUnmarshaler</code></a>,
+      making it possible to process URLs in <a href="/pkg/encoding/gob/">gob data</a>.
+    </p>
+
+    <p> <!-- CL 29610, CL 31582 -->
+      Following RFC 3986,
+      <a href="/pkg/net/url/#Parse"><code>Parse</code></a>
+      now rejects URLs like <code>this_that:other/thing</code> instead of
+      interpreting them as relative paths (<code>this_that</code> is not a valid scheme).
+      To force interpretation as a relative path,
+      such URLs should be prefixed with “<code>./</code>”.
+      The <code>URL.String</code> method now inserts this prefix as needed.
+    </p>
+
+  </dd>
+</dl>
+
+<dl id="os"><dt><a href="/pkg/os/">os</a></dt>
+  <dd>
+    <p> <!-- CL 16551 -->
+      The new function
+      <a href="/pkg/os/#Executable"><code>Executable</code></a> returns
+      the path name of the running executable.
+    </p>
+
+    <p> <!-- CL 30614 -->
+      An attempt to call a method on
+      an <a href="/pkg/os/#File"><code>os.File</code></a> that has
+      already been closed will now return the new error
+      value <a href="/pkg/os/#ErrClosed"><code>os.ErrClosed</code></a>.
+      Previously it returned a system-specific error such
+      as <code>syscall.EBADF</code>.
+    </p>
+
+    <p> <!-- CL 31358 -->
+      On Unix systems, <a href="/pkg/os/#Rename"><code>os.Rename</code></a>
+      will now return an error when used to rename a directory to an
+      existing empty directory.
+      Previously it would fail when renaming to a non-empty directory
+      but succeed when renaming to an empty directory.
+      This makes the behavior on Unix correspond to that of other systems.
+    </p>
+
+    <p> <!-- CL 32451 -->
+      On Windows, long absolute paths are now transparently converted to
+      extended-length paths (paths that start with “<code>\\?\</code>”).
+      This permits the package to work with files whose path names are
+      longer than 260 characters.
+    </p>
+
+    <p> <!-- CL 29753 -->
+      On Windows, <a href="/pkg/os/#IsExist"><code>os.IsExist</code></a>
+      will now return <code>true</code> for the system
+      error <code>ERROR_DIR_NOT_EMPTY</code>.
+      This roughly corresponds to the existing handling of the Unix
+      error <code>ENOTEMPTY</code>.
+    </p>
+
+    <p> <!-- CL 32152 -->
+      On Plan 9, files that are not served by <code>#M</code> will now
+      have <a href="/pkg/os/#ModeDevice"><code>ModeDevice</code></a> set in
+      the value returned
+      by <a href="/pkg/os/#FileInfo"><code>FileInfo.Mode</code></a>.
+    </p>
+  </dd>
+</dl>
+
+<dl id="path_filepath"><dt><a href="/pkg/path/filepath/">path/filepath</a></dt>
+  <dd>
+    <p>
+      A number of bugs and corner cases on Windows were fixed:
+      <a href="/pkg/path/filepath/#Abs"><code>Abs</code></a> now calls <code>Clean</code> as documented,
+      <a href="/pkg/path/filepath/#Glob"><code>Glob</code></a> now matches
+      “<code>\\?\c:\*</code>”,
+      <a href="/pkg/path/filepath/#EvalSymlinks"><code>EvalSymlinks</code></a> now
+      correctly handles “<code>C:.</code>”, and
+      <a href="/pkg/path/filepath/#Clean"><code>Clean</code></a> now properly
+      handles a leading “<code>..</code>” in the path.
+    </p>
+  </dd>
+</dl>
+
+<dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
+  <dd>
+    <p> <!-- CL 30088 -->
+      The new function
+      <a href="/pkg/reflect/#Swapper"><code>Swapper</code></a> was
+      added to support <a href="#sortslice"><code>sort.Slice</code></a>.
+    </p>
+  </dd>
+</dl>
+
+<dl id="strconv"><dt><a href="/pkg/strconv/">strconv</a></dt>
+  <dd>
+    <p> <!-- CL 31210 -->
+      The <a href="/pkg/strconv/#Unquote"><code>Unquote</code></a>
+      function now strips carriage returns (<code>\r</code>) in
+      backquoted raw strings, following the
+      <a href="/ref/spec#String_literals">Go language semantics</a>.
+    </p>
+  </dd>
+</dl>
+
+<dl id="syscall"><dt><a href="/pkg/syscall/">syscall</a></dt>
+  <dd>
+    <p> <!-- CL 25050, CL 25022 -->
+      The <a href="/pkg/syscall/#Getpagesize"><code>Getpagesize</code></a>
+      now returns the system's size, rather than a constant value.
+      Previously it always returned 4KB.
+    </p>
+
+    <p> <!-- CL 31446 -->
+      The signature
+      of <a href="/pkg/syscall/#Utimes"><code>Utimes</code></a> has
+      changed on Solaris to match all the other Unix systems'
+      signature. Portable code should continue to use
+      <a href="/pkg/os/#Chtimes"><code>os.Chtimes</code></a> instead.
+    </p>
+
+    <p> <!-- CL 32319 -->
+      The <code>X__cmsg_data</code> field has been removed from
+      <a href="/pkg/syscall/#Cmsghdr"><code>Cmsghdr</code></a>.
+      </p>
+  </dd>
+</dl>
+
+<dl id="text_template"><dt><a href="/pkg/text/template/">text/template</a></dt>
+  <dd>
+    <p> <!-- CL 31462 -->
+      <a href="/pkg/text/template/#Template.Execute"><code>Template.Execute</code></a>
+      can now take a
+      <a href="/pkg/reflect/#Value"><code>reflect.Value</code></a> as its data
+      argument, and
+      <a href="/pkg/text/template/#FuncMap"><code>FuncMap</code></a>
+      functions can also accept and return <code>reflect.Value</code>.
+    </p>
+
+  </dd>
+</dl>
+
+<dl id="time"><dt><a href="/pkg/time/">time</a></dt>
+  <dd>
+
+    <p> <!-- CL 20118 --> The new function
+      <a href="/pkg/time/#Until"><code>Until</code></a> complements
+      the analogous <code>Since</code> function.
+    </p>
+
+    <p> <!-- CL 29338 -->
+      <a href="/pkg/time/#ParseDuration"><code>ParseDuration</code></a>
+      now accepts long fractional parts.
+    </p>
+
+    <p> <!-- CL 33429 -->
+      <a href="/pkg/time/#Parse"><code>Parse</code></a>
+      now rejects dates before the start of a month, such as June 0;
+      it already rejected dates beyond the end of the month, such as
+      June 31 and July 32.
+    </p>
+
+    <p> <!-- CL 33029 --> <!-- CL 34816 -->
+      The <code>tzdata</code> database has been updated to version
+      2016j for systems that don't already have a local time zone
+      database.
+    </p>
+
+    <p>
+  </dd>
+</dl>
+
+<dl id="testing"><dt><a href="/pkg/testing/">testing</a></dt>
+  <dd>
+    <p><!-- CL 29970 -->
+      The new method
+      <a href="/pkg/testing/#T.Name"><code>T.Name</code></a>
+      (and <code>B.Name</code>) returns the name of the current
+      test or benchmark.
+    </p>
+
+    <p><!-- CL 32483 -->
+      The new function
+      <a href="/pkg/testing/#CoverMode"><code>CoverMode</code></a>
+      reports the test coverage mode.
+    </p>
+
+    <p><!-- CL 32615 -->
+      Tests and benchmarks are now marked as failed if the race
+      detector is enabled and a data race occurs during execution.
+      Previously, individual test cases would appear to pass,
+      and only the overall execution of the test binary would fail.
+    </p>
+
+    <p><!-- CL 32455 -->
+      The signature of the
+      <a href="/pkg/testing/#MainStart"><code>MainStart</code></a>
+      function has changed, as allowed by the documentation. It is an
+      internal detail and not part of the Go 1 compatibility promise.
+      If you're not calling <code>MainStart</code> directly but see
+      errors, that likely means you set the
+      normally-empty <code>GOROOT</code> environment variable and it
+      doesn't match the version of your <code>go</code> command's binary.
+    </p>
+
+  </dd>
+</dl>
+
+<dl id="unicode"><dt><a href="/pkg/unicode/">unicode</a></dt>
+  <dd>
+    <p><!-- CL 30935 -->
+      <a href="/pkg/unicode/#SimpleFold"><code>SimpleFold</code></a>
+      now returns its argument unchanged if the provided input was an invalid rune.
+      Previously, the implementation failed with an index bounds check panic.
+    </p>
+  </dd>
+</dl>
diff --git a/_content/doc/go1.9.html b/_content/doc/go1.9.html
new file mode 100644
index 0000000..86ee257
--- /dev/null
+++ b/_content/doc/go1.9.html
@@ -0,0 +1,1024 @@
+<!--{
+	"Title": "Go 1.9 Release Notes",
+	"Path":  "/doc/go1.9",
+	"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.9</h2>
+
+<p>
+  The latest Go release, version 1.9, arrives six months
+  after <a href="go1.8">Go 1.8</a> and is the tenth release in
+  the <a href="https://golang.org/doc/devel/release.html">Go 1.x
+  series</a>.
+  There are two <a href="#language">changes to the language</a>:
+  adding support for type aliases and defining when implementations
+  may fuse floating point operations.
+  Most of the 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>
+  The release
+  adds <a href="#monotonic-time">transparent monotonic time support</a>,
+  <a href="#parallel-compile">parallelizes compilation of functions</a> within a package,
+  better supports <a href="#test-helper">test helper functions</a>,
+  includes a new <a href="#math-bits">bit manipulation package</a>,
+  and has a new <a href="#sync-map">concurrent map type</a>.
+</p>
+
+<h2 id="language">Changes to the language</h2>
+
+<p>
+  There are two changes to the language.
+</p>
+<p>
+  Go now supports type aliases to support gradual code repair while
+  moving a type between packages.
+  The <a href="https://golang.org/design/18130-type-alias">type alias
+  design document</a>
+  and <a href="https://talks.golang.org/2016/refactor.article">an
+  article on refactoring</a> cover the problem in detail.
+  In short, a type alias declaration has the form:
+</p>
+
+<pre>
+type T1 = T2
+</pre>
+
+<p>
+  This declaration introduces an alias name <code>T1</code>—an
+  alternate spelling—for the type denoted by <code>T2</code>; that is,
+  both <code>T1</code> and <code>T2</code> denote the same type.
+</p>
+
+<p> <!-- CL 40391 -->
+  A smaller language change is that the
+  <a href="/ref/spec#Floating_point_operators">language specification
+  now states</a> when implementations are allowed to fuse floating
+  point operations together, such as by using an architecture's "fused
+  multiply and add" (FMA) instruction to compute <code>x*y</code>&nbsp;<code>+</code>&nbsp;<code>z</code>
+  without rounding the intermediate result <code>x*y</code>.
+  To force the intermediate rounding, write <code>float64(x*y)</code>&nbsp;<code>+</code>&nbsp;<code>z</code>.
+</p>
+
+<h2 id="ports">Ports</h2>
+
+<p>
+  There are no new supported operating systems or processor
+  architectures in this release.
+</p>
+
+<h3 id="power8">ppc64x requires POWER8</h3>
+
+<p> <!-- CL 36725, CL 36832 -->
+  Both <code>GOARCH=ppc64</code> and <code>GOARCH=ppc64le</code> now
+  require at least POWER8 support. In previous releases,
+  only <code>GOARCH=ppc64le</code> required POWER8 and the big
+  endian <code>ppc64</code> architecture supported older
+  hardware.
+<p>
+
+<h3 id="freebsd">FreeBSD</h3>
+
+<p>
+  Go 1.9 is the last release that will run on FreeBSD 9.3,
+  which is already
+  <a href="https://www.freebsd.org/security/unsupported.html">unsupported by FreeBSD</a>.
+  Go 1.10 will require FreeBSD 10.3+.
+</p>
+
+<h3 id="openbsd">OpenBSD 6.0</h3>
+
+<p> <!-- CL 40331 -->
+  Go 1.9 now enables PT_TLS generation for cgo binaries and thus
+  requires OpenBSD 6.0 or newer. Go 1.9 no longer supports
+  OpenBSD 5.9.
+<p>
+
+<h3 id="known_issues">Known Issues</h3>
+
+<p>
+  There are some instabilities on FreeBSD that are known but not understood.
+  These can lead to program crashes in rare cases.
+  See <a href="https://golang.org/issue/15658">issue 15658</a>.
+  Any help in solving this FreeBSD-specific issue would be appreciated.
+</p>
+
+<p>
+  Go stopped running NetBSD builders during the Go 1.9 development
+  cycle due to NetBSD kernel crashes, up to and including NetBSD 7.1.
+  As Go 1.9 is being released, NetBSD 7.1.1 is being released with a fix.
+  However, at this time we have no NetBSD builders passing our test suite.
+  Any help investigating the
+  <a href="https://github.com/golang/go/labels/OS-NetBSD">various NetBSD issues</a>
+  would be appreciated.
+</p>
+
+<h2 id="tools">Tools</h2>
+
+<h3 id="parallel-compile">Parallel Compilation</h3>
+
+<p>
+  The Go compiler now supports compiling a package's functions in parallel, taking
+  advantage of multiple cores. This is in addition to the <code>go</code> command's
+  existing support for parallel compilation of separate packages.
+  Parallel compilation is on by default, but it can be disabled by setting the
+  environment variable <code>GO19CONCURRENTCOMPILATION</code> to <code>0</code>.
+</p>
+
+<h3 id="vendor-dotdotdot">Vendor matching with ./...</h3>
+
+<p><!-- CL 38745 -->
+  By popular request, <code>./...</code> no longer matches packages
+  in <code>vendor</code> directories in tools accepting package names,
+  such as <code>go</code> <code>test</code>. To match vendor
+  directories, write <code>./vendor/...</code>.
+</p>
+
+<h3 id="goroot">Moved GOROOT</h3>
+
+<p><!-- CL 42533 -->
+  The <a href="/cmd/go/">go tool</a> will now use the path from which it
+  was invoked to attempt to locate the root of the Go install tree.
+  This means that if the entire Go installation is moved to a new
+  location, the go tool should continue to work as usual.
+  This may be overridden by setting <code>GOROOT</code> in the environment,
+  which should only be done in unusual circumstances.
+  Note that this does not affect the result of
+  the <a href="/pkg/runtime/#GOROOT">runtime.GOROOT</a> function, which
+  will continue to report the original installation location;
+  this may be fixed in later releases.
+</p>
+
+<h3 id="compiler">Compiler Toolchain</h3>
+
+<p><!-- CL 37441 -->
+  Complex division is now C99-compatible. This has always been the
+  case in gccgo and is now fixed in the gc toolchain.
+</p>
+
+<p> <!-- CL 36983 -->
+  The linker will now generate DWARF information for cgo executables on Windows.
+</p>
+
+<p> <!-- CL 44210, CL 40095 -->
+  The compiler now includes lexical scopes in the generated DWARF if the
+  <code>-N -l</code> flags are provided, allowing
+  debuggers to hide variables that are not in scope. The <code>.debug_info</code>
+  section is now DWARF version 4.
+</p>
+
+<p> <!-- CL 43855 -->
+  The values of <code>GOARM</code> and <code>GO386</code> now affect a
+  compiled package's build ID, as used by the <code>go</code> tool's
+  dependency caching.
+</p>
+
+<h3 id="asm">Assembler</h3>
+
+<p> <!-- CL 42028 -->
+  The four-operand ARM <code>MULA</code> instruction is now assembled correctly,
+  with the addend register as the third argument and the result
+  register as the fourth and final argument.
+  In previous releases, the two meanings were reversed.
+  The three-operand form, in which the fourth argument is implicitly
+  the same as the third, is unaffected.
+  Code using four-operand <code>MULA</code> instructions
+  will need to be updated, but we believe this form is very rarely used.
+  <code>MULAWT</code> and <code>MULAWB</code> were already
+  using the correct order in all forms and are unchanged.
+</p>
+
+<p> <!-- CL 42990 -->
+  The assembler now supports <code>ADDSUBPS/PD</code>, completing the
+  two missing x86 SSE3 instructions.
+</p>
+
+<h3 id="go-doc">Doc</h3>
+
+<p><!-- CL 36031 -->
+  Long lists of arguments are now truncated. This improves the readability
+  of <code>go</code> <code>doc</code> on some generated code.
+</p>
+
+<p><!-- CL 38438 -->
+  Viewing documentation on struct fields is now supported.
+  For example, <code>go</code> <code>doc</code> <code>http.Client.Jar</code>.
+</p>
+
+<h3 id="go-env-json">Env</h3>
+
+<p> <!-- CL 38757 -->
+  The new <code>go</code> <code>env</code> <code>-json</code> flag
+  enables JSON output, instead of the default OS-specific output
+  format.
+</p>
+
+<h3 id="go-test-list">Test</h3>
+
+<p> <!-- CL 41195 -->
+  The <a href="/cmd/go/#hdr-Description_of_testing_flags"><code>go</code> <code>test</code></a>
+  command accepts a new <code>-list</code> flag, which takes a regular
+  expression as an argument and prints to stdout the name of any
+  tests, benchmarks, or examples that match it, without running them.
+</p>
+
+
+<h3 id="go-tool-pprof">Pprof</h3>
+
+<p> <!-- CL 34192 -->
+  Profiles produced by the <code>runtime/pprof</code> package now
+  include symbol information, so they can be viewed
+  in <code>go</code> <code>tool</code> <code>pprof</code>
+  without the binary that produced the profile.
+</p>
+
+<p> <!-- CL 38343 -->
+  The <code>go</code> <code>tool</code> <code>pprof</code> command now
+  uses the HTTP proxy information defined in the environment, using
+  <a href="/pkg/net/http/#ProxyFromEnvironment"><code>http.ProxyFromEnvironment</code></a>.
+</p>
+
+<h3 id="vet">Vet</h3>
+
+<!-- CL 40112 -->
+<p>
+  The <a href="/cmd/vet/"><code>vet</code> command</a>
+  has been better integrated into the
+  <a href="/cmd/go/"><code>go</code> tool</a>,
+  so <code>go</code> <code>vet</code> now supports all standard build
+  flags while <code>vet</code>'s own flags are now available
+  from <code>go</code> <code>vet</code> as well as
+  from <code>go</code> <code>tool</code> <code>vet</code>.
+</p>
+
+<h3 id="gccgo">Gccgo</h3>
+
+<p>
+Due to the alignment of Go's semiannual release schedule with GCC's
+annual release schedule,
+GCC release 7 contains the Go 1.8.3 version of gccgo.
+We expect that the next release, GCC 8, will contain the Go 1.10
+version of gccgo.
+</p>
+
+<h2 id="runtime">Runtime</h2>
+
+<h3 id="callersframes">Call stacks with inlined frames</h3>
+
+<p>
+  Users of
+  <a href="/pkg/runtime#Callers"><code>runtime.Callers</code></a>
+  should avoid directly inspecting the resulting PC slice and instead use
+  <a href="/pkg/runtime#CallersFrames"><code>runtime.CallersFrames</code></a>
+  to get a complete view of the call stack, or
+  <a href="/pkg/runtime#Caller"><code>runtime.Caller</code></a>
+  to get information about a single caller.
+  This is because an individual element of the PC slice cannot account
+  for inlined frames or other nuances of the call stack.
+</p>
+
+<p>
+  Specifically, code that directly iterates over the PC slice and uses
+  functions such as
+  <a href="/pkg/runtime#FuncForPC"><code>runtime.FuncForPC</code></a>
+  to resolve each PC individually will miss inlined frames.
+  To get a complete view of the stack, such code should instead use
+  <code>CallersFrames</code>.
+  Likewise, code should not assume that the length returned by
+  <code>Callers</code> is any indication of the call depth.
+  It should instead count the number of frames returned by
+  <code>CallersFrames</code>.
+</p>
+
+<p>
+  Code that queries a single caller at a specific depth should use
+  <code>Caller</code> rather than passing a slice of length 1 to
+  <code>Callers</code>.
+</p>
+
+<p>
+  <a href="/pkg/runtime#CallersFrames"><code>runtime.CallersFrames</code></a>
+  has been available since Go 1.7, so code can be updated prior to
+  upgrading to Go 1.9.
+</p>
+
+<h2 id="performance">Performance</h2>
+
+<p>
+  As always, the changes are so general and varied that precise
+  statements about performance are difficult to make.  Most programs
+  should run a bit faster, due to speedups in the garbage collector,
+  better generated code, and optimizations in the core library.
+</p>
+
+<h3 id="gc">Garbage Collector</h3>
+
+<p> <!-- CL 37520 -->
+  Library functions that used to trigger stop-the-world garbage
+  collection now trigger concurrent garbage collection.
+
+  Specifically, <a href="/pkg/runtime/#GC"><code>runtime.GC</code></a>,
+  <a href="/pkg/runtime/debug/#SetGCPercent"><code>debug.SetGCPercent</code></a>,
+  and
+  <a href="/pkg/runtime/debug/#FreeOSMemory"><code>debug.FreeOSMemory</code></a>,
+  now trigger concurrent garbage collection, blocking only the calling
+  goroutine until the garbage collection is done.
+</p>
+
+<p> <!-- CL 34103, CL 39835 -->
+  The
+  <a href="/pkg/runtime/debug/#SetGCPercent"><code>debug.SetGCPercent</code></a>
+  function only triggers a garbage collection if one is immediately
+  necessary because of the new GOGC value.
+  This makes it possible to adjust GOGC on-the-fly.
+</p>
+
+<p> <!-- CL 38732 -->
+  Large object allocation performance is significantly improved in
+  applications using large (&gt;50GB) heaps containing many large
+  objects.
+</p>
+
+<p> <!-- CL 34937 -->
+  The <a href="/pkg/runtime/#ReadMemStats"><code>runtime.ReadMemStats</code></a>
+  function now takes less than 100µs even for very large heaps.
+</p>
+
+<h2 id="library">Core library</h2>
+
+<h3 id="monotonic-time">Transparent Monotonic Time support</h3>
+
+<p> <!-- CL 36255 -->
+  The <a href="/pkg/time/"><code>time</code></a> package now transparently
+  tracks monotonic time in each <a href="/pkg/time/#Time"><code>Time</code></a>
+  value, making computing durations between two <code>Time</code> values
+  a safe operation in the presence of wall clock adjustments.
+  See the <a href="/pkg/time/#hdr-Monotonic_Clocks">package docs</a> and
+  <a href="https://golang.org/design/12914-monotonic">design document</a>
+  for details.
+</p>
+
+<h3 id="math-bits">New bit manipulation package</h3>
+
+<p> <!-- CL 36315 -->
+  Go 1.9 includes a new package,
+  <a href="/pkg/math/bits/"><code>math/bits</code></a>, with optimized
+  implementations for manipulating bits. On most architectures,
+  functions in this package are additionally recognized by the
+  compiler and treated as intrinsics for additional performance.
+</p>
+
+<h3 id="test-helper">Test Helper Functions</h3>
+
+<p> <!-- CL 38796 -->
+  The
+  new <a href="/pkg/testing/#T.Helper"><code>(*T).Helper</code></a>
+  and <a href="/pkg/testing/#B.Helper"><code>(*B).Helper</code></a>
+  methods mark the calling function as a test helper function.  When
+  printing file and line information, that function will be skipped.
+  This permits writing test helper functions while still having useful
+  line numbers for users.
+</p>
+
+<h3 id="sync-map">Concurrent Map</h3>
+
+<p> <!-- CL 36617 -->
+  The new <a href="/pkg/sync/#Map"><code>Map</code></a> type
+  in the <a href="/pkg/sync/"><code>sync</code></a> package
+  is a concurrent map with amortized-constant-time loads, stores, and
+  deletes. It is safe for multiple goroutines to call a <code>Map</code>'s methods
+  concurrently.
+</p>
+
+<h3 id="pprof-labels">Profiler Labels</h3>
+
+<p><!-- CL 34198 -->
+  The <a href="/pkg/runtime/pprof"><code>runtime/pprof</code> package</a>
+  now supports adding labels to <code>pprof</code> profiler records.
+  Labels form a key-value map that is used to distinguish calls of the
+  same function in different contexts when looking at profiles
+  with the <a href="/cmd/pprof/"><code>pprof</code> command</a>.
+  The <code>pprof</code> package's
+  new <a href="/pkg/runtime/pprof/#Do"><code>Do</code> function</a>
+  runs code associated with some provided labels. Other new functions
+  in the package help work with labels.
+</p>
+
+</dl><!-- runtime/pprof -->
+
+
+<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="archive/zip"><dt><a href="/pkg/archive/zip/">archive/zip</a></dt>
+  <dd>
+    <p><!-- CL 39570 -->
+      The
+      ZIP <a href="/pkg/archive/zip/#Writer"><code>Writer</code></a>
+      now sets the UTF-8 bit in
+      the <a href="/pkg/archive/zip/#FileHeader.Flags"><code>FileHeader.Flags</code></a>
+      when appropriate.
+    </p>
+
+</dl><!-- archive/zip -->
+
+<dl id="crypto/rand"><dt><a href="/pkg/crypto/rand/">crypto/rand</a></dt>
+  <dd>
+    <p><!-- CL 43852 -->
+      On Linux, Go now calls the <code>getrandom</code> system call
+      without the <code>GRND_NONBLOCK</code> flag; it will now block
+      until the kernel has sufficient randomness. On kernels predating
+      the <code>getrandom</code> system call, Go continues to read
+      from <code>/dev/urandom</code>.
+    </p>
+
+</dl><!-- crypto/rand -->
+
+<dl id="crypto/x509"><dt><a href="/pkg/crypto/x509/">crypto/x509</a></dt>
+  <dd>
+    <p><!-- CL 36093 -->
+
+      On Unix systems the environment
+      variables <code>SSL_CERT_FILE</code>
+      and <code>SSL_CERT_DIR</code> can now be used to override the
+      system default locations for the SSL certificate file and SSL
+      certificate files directory, respectively.
+    </p>
+
+    <p>The FreeBSD file <code>/usr/local/etc/ssl/cert.pem</code> is
+      now included in the certificate search path.
+    </p>
+
+    <p><!-- CL 36900 -->
+
+      The package now supports excluded domains in name constraints.
+      In addition to enforcing such constraints,
+      <a href="/pkg/crypto/x509/#CreateCertificate"><code>CreateCertificate</code></a>
+      will create certificates with excluded name constraints
+      if the provided template certificate has the new
+      field
+      <a href="/pkg/crypto/x509/#Certificate.ExcludedDNSDomains"><code>ExcludedDNSDomains</code></a>
+      populated.
+    </p>
+
+    <p><!-- CL 36696 -->
+
+    If any SAN extension, including with no DNS names, is present
+    in the certificate, then the Common Name from
+    <a href="/pkg/crypto/x509/#Certificate.Subject"><code>Subject</code></a> is ignored.
+    In previous releases, the code tested only whether DNS-name SANs were
+    present in a certificate.
+    </p>
+
+</dl><!-- crypto/x509 -->
+
+<dl id="database/sql"><dt><a href="/pkg/database/sql/">database/sql</a></dt>
+  <dd>
+    <p><!-- CL 35476 -->
+      The package will now use a cached <a href="/pkg/database/sql/#Stmt"><code>Stmt</code></a> if
+      available in <a href="/pkg/database/sql/#Tx.Stmt"><code>Tx.Stmt</code></a>.
+      This prevents statements from being re-prepared each time
+      <a href="/pkg/database/sql/#Tx.Stmt"><code>Tx.Stmt</code></a> is called.
+    </p>
+
+    <p><!-- CL 38533 -->
+      The package now allows drivers to implement their own argument checkers by implementing
+      <a href="/pkg/database/sql/driver/#NamedValueChecker"><code>driver.NamedValueChecker</code></a>.
+      This also allows drivers to support <code>OUTPUT</code> and <code>INOUT</code> parameter types.
+      <a href="/pkg/database/sql/#Out"><code>Out</code></a> should be used to return output parameters
+      when supported by the driver.
+    </p>
+
+    <p><!-- CL 39031 -->
+      <a href="/pkg/database/sql/#Rows.Scan"><code>Rows.Scan</code></a> can now scan user-defined string types.
+      Previously the package supported scanning into numeric types like <code>type</code> <code>Int</code> <code>int64</code>. It now also supports
+      scanning into string types like <code>type</code> <code>String</code> <code>string</code>.
+    </p>
+
+    <p><!-- CL 40694 -->
+      The new <a href="/pkg/database/sql/#DB.Conn"><code>DB.Conn</code></a> method returns the new
+      <a href="/pkg/database/sql/#Conn"><code>Conn</code></a> type representing an
+      exclusive connection to the database from the connection pool. All queries run on
+      a <a href="/pkg/database/sql/#Conn"><code>Conn</code></a> will use the same underlying
+      connection until <a href="/pkg/database/sql/#Conn.Close"><code>Conn.Close</code></a> is called
+      to return the connection to the connection pool.
+    </p>
+
+</dl><!-- database/sql -->
+
+<dl id="encoding/asn1"><dt><a href="/pkg/encoding/asn1/">encoding/asn1</a></dt>
+  <dd>
+    <p><!-- CL 38660 -->
+	  The new
+	  <a href="/pkg/encoding/asn1/#NullBytes"><code>NullBytes</code></a>
+	  and
+	  <a href="/pkg/encoding/asn1/#NullRawValue"><code>NullRawValue</code></a>
+	  represent the ASN.1 NULL type.
+    </p>
+
+</dl><!-- encoding/asn1 -->
+
+<dl id="encoding/base32"><dt><a href="/pkg/encoding/base32/">encoding/base32</a></dt>
+  <dd>
+    <p><!-- CL 38634 -->
+	  The new <a href="/pkg/encoding/base32/#Encoding.WithPadding">Encoding.WithPadding</a>
+	  method adds support for custom padding characters and disabling padding.
+    </p>
+
+</dl><!-- encoding/base32 -->
+
+<dl id="encoding/csv"><dt><a href="/pkg/encoding/csv/">encoding/csv</a></dt>
+  <dd>
+    <p><!-- CL 41730 -->
+      The new field
+      <a href="/pkg/encoding/csv/#Reader.ReuseRecord"><code>Reader.ReuseRecord</code></a>
+      controls whether calls to
+      <a href="/pkg/encoding/csv/#Reader.Read"><code>Read</code></a>
+      may return a slice sharing the backing array of the previous
+      call's returned slice for improved performance.
+    </p>
+
+</dl><!-- encoding/csv -->
+
+<dl id="fmt"><dt><a href="/pkg/fmt/">fmt</a></dt>
+  <dd>
+    <p><!-- CL 37051 -->
+      The sharp flag ('<code>#</code>') is now supported when printing
+      floating point and complex numbers. It will always print a
+      decimal point
+      for <code>%e</code>, <code>%E</code>, <code>%f</code>, <code>%F</code>, <code>%g</code>
+      and <code>%G</code>; it will not remove trailing zeros
+      for <code>%g</code> and <code>%G</code>.
+    </p>
+
+</dl><!-- fmt -->
+
+<dl id="hash/fnv"><dt><a href="/pkg/hash/fnv/">hash/fnv</a></dt>
+  <dd>
+    <p><!-- CL 38356 -->
+      The package now includes 128-bit FNV-1 and FNV-1a hash support with
+      <a href="/pkg/hash/fnv/#New128"><code>New128</code></a> and
+      <a href="/pkg/hash/fnv/#New128a"><code>New128a</code></a>, respectively.
+    </p>
+
+</dl><!-- hash/fnv -->
+
+<dl id="html/template"><dt><a href="/pkg/html/template/">html/template</a></dt>
+  <dd>
+    <p><!-- CL 37880, CL 40936 -->
+	  The package now reports an error if a predefined escaper (one of
+	  "html", "urlquery" and "js") is found in a pipeline and does not match
+	  what the auto-escaper would have decided on its own.
+	  This avoids certain security or correctness issues.
+	  Now use of one of these escapers is always either a no-op or an error.
+	  (The no-op case eases migration from <a href="/pkg/text/template/">text/template</a>.)
+    </p>
+
+</dl><!-- html/template -->
+
+<dl id="image"><dt><a href="/pkg/image/">image</a></dt>
+  <dd>
+    <p><!-- CL 36734 -->
+	  The <a href="/pkg/image/#Rectangle.Intersect"><code>Rectangle.Intersect</code></a>
+	  method now returns a zero <code>Rectangle</code> when called on
+	  adjacent but non-overlapping rectangles, as documented. In
+	  earlier releases it would incorrectly return an empty but
+	  non-zero <code>Rectangle</code>.
+    </p>
+
+</dl><!-- image -->
+
+<dl id="image/color"><dt><a href="/pkg/image/color/">image/color</a></dt>
+  <dd>
+    <p><!-- CL 36732 -->
+	  The YCbCr to RGBA conversion formula has been tweaked to ensure
+	  that rounding adjustments span the complete [0, 0xffff] RGBA
+	  range.
+    </p>
+
+</dl><!-- image/color -->
+
+<dl id="image/png"><dt><a href="/pkg/image/png/">image/png</a></dt>
+  <dd>
+    <p><!-- CL 34150 -->
+	  The new <a href="/pkg/image/png/#Encoder.BufferPool"><code>Encoder.BufferPool</code></a>
+	  field allows specifying an <a href="/pkg/image/png/#EncoderBufferPool"><code>EncoderBufferPool</code></a>,
+	  that will be used by the encoder to get temporary <code>EncoderBuffer</code>
+	  buffers when encoding a PNG image.
+
+	  The use of a <code>BufferPool</code> reduces the number of
+	  memory allocations performed while encoding multiple images.
+    </p>
+
+    <p><!-- CL 38271 -->
+	  The package now supports the decoding of transparent 8-bit
+	  grayscale ("Gray8") images.
+    </p>
+
+</dl><!-- image/png -->
+
+<dl id="math/big"><dt><a href="/pkg/math/big/">math/big</a></dt>
+  <dd>
+    <p><!-- CL 36487 -->
+      The new
+      <a href="/pkg/math/big/#Int.IsInt64"><code>IsInt64</code></a>
+      and
+      <a href="/pkg/math/big/#Int.IsUint64"><code>IsUint64</code></a>
+      methods report whether an <code>Int</code>
+      may be represented as an <code>int64</code> or <code>uint64</code>
+      value.
+    </p>
+
+</dl><!-- math/big -->
+
+<dl id="mime/multipart"><dt><a href="/pkg/mime/multipart/">mime/multipart</a></dt>
+  <dd>
+    <p><!-- CL 39223 -->
+      The new
+      <a href="/pkg/mime/multipart/#FileHeader.Size"><code>FileHeader.Size</code></a>
+      field describes the size of a file in a multipart message.
+    </p>
+
+</dl><!-- mime/multipart -->
+
+<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
+  <dd>
+    <p><!-- CL 32572 -->
+      The new
+      <a href="/pkg/net/#Resolver.StrictErrors"><code>Resolver.StrictErrors</code></a>
+      provides control over how Go's built-in DNS resolver handles
+      temporary errors during queries composed of multiple sub-queries,
+      such as an A+AAAA address lookup.
+    </p>
+
+    <p><!-- CL 37260 -->
+      The new
+      <a href="/pkg/net/#Resolver.Dial"><code>Resolver.Dial</code></a>
+      allows a <code>Resolver</code> to use a custom dial function.
+    </p>
+
+    <p><!-- CL 40510 -->
+      <a href="/pkg/net/#JoinHostPort"><code>JoinHostPort</code></a> now only places an address in square brackets if the host contains a colon.
+      In previous releases it would also wrap addresses in square brackets if they contained a percent ('<code>%</code>') sign.
+    </p>
+
+    <p><!-- CL 37913 -->
+      The new methods
+      <a href="/pkg/net/#TCPConn.SyscallConn"><code>TCPConn.SyscallConn</code></a>,
+      <a href="/pkg/net/#IPConn.SyscallConn"><code>IPConn.SyscallConn</code></a>,
+      <a href="/pkg/net/#UDPConn.SyscallConn"><code>UDPConn.SyscallConn</code></a>,
+      and
+      <a href="/pkg/net/#UnixConn.SyscallConn"><code>UnixConn.SyscallConn</code></a>
+      provide access to the connections' underlying file descriptors.
+    </p>
+
+    <p><!-- 45088 -->
+      It is now safe to call <a href="/pkg/net/#Dial"><code>Dial</code></a> with the address obtained from
+      <code>(*TCPListener).String()</code> after creating the listener with
+      <code><a href="/pkg/net/#Listen">Listen</a>("tcp", ":0")</code>.
+      Previously it failed on some machines with half-configured IPv6 stacks.
+    </p>
+
+</dl><!-- net -->
+
+<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
+  <dd>
+
+    <p><!-- CL 37328 -->
+      The <a href="/pkg/net/http/#Cookie.String"><code>Cookie.String</code></a> method, used for
+      <code>Cookie</code> and <code>Set-Cookie</code> headers, now encloses values in double quotes
+      if the value contains either a space or a comma.
+    </p>
+
+    <p>Server changes:</p>
+    <ul>
+      <li><!-- CL 38194 -->
+        <a href="/pkg/net/http/#ServeMux"><code>ServeMux</code></a> now ignores ports in the host
+        header when matching handlers. The host is matched unmodified for <code>CONNECT</code> requests.
+      </li>
+
+      <li><!-- CL 44074 -->
+        The new <a href="/pkg/net/http/#Server.ServeTLS"><code>Server.ServeTLS</code></a> method wraps
+        <a href="/pkg/net/http/#Server.Serve"><code>Server.Serve</code></a> with added TLS support.
+      </li>
+
+      <li><!-- CL 34727 -->
+        <a href="/pkg/net/http/#Server.WriteTimeout"><code>Server.WriteTimeout</code></a>
+        now applies to HTTP/2 connections and is enforced per-stream.
+      </li>
+
+      <li><!-- CL 43231 -->
+        HTTP/2 now uses the priority write scheduler by default.
+        Frames are scheduled by following HTTP/2 priorities as described in
+        <a href="https://tools.ietf.org/html/rfc7540#section-5.3">RFC 7540 Section 5.3</a>.
+      </li>
+
+      <li><!-- CL 36483 -->
+        The HTTP handler returned by <a href="/pkg/net/http/#StripPrefix"><code>StripPrefix</code></a>
+        now calls its provided handler with a modified clone of the original <code>*http.Request</code>.
+        Any code storing per-request state in maps keyed by <code>*http.Request</code> should
+        use
+        <a href="/pkg/net/http/#Request.Context"><code>Request.Context</code></a>,
+        <a href="/pkg/net/http/#Request.WithContext"><code>Request.WithContext</code></a>,
+        and
+        <a href="/pkg/context/#WithValue"><code>context.WithValue</code></a> instead.
+      </li>
+
+      <li><!-- CL 35490 -->
+        <a href="/pkg/net/http/#LocalAddrContextKey"><code>LocalAddrContextKey</code></a> now contains
+        the connection's actual network address instead of the interface address used by the listener.
+      </li>
+    </ul>
+
+    <p>Client &amp; Transport changes:</p>
+    <ul>
+      <li><!-- CL 35488 -->
+        The <a href="/pkg/net/http/#Transport"><code>Transport</code></a>
+        now supports making requests via SOCKS5 proxy when the URL returned by
+        <a href="/pkg/net/http/#Transport.Proxy"><code>Transport.Proxy</code></a>
+        has the scheme <code>socks5</code>.
+      </li>
+    </ul>
+
+</dl><!-- net/http -->
+
+<dl id="net/http/fcgi"><dt><a href="/pkg/net/http/fcgi/">net/http/fcgi</a></dt>
+  <dd>
+    <p><!-- CL 40012 -->
+      The new
+      <a href="/pkg/net/http/fcgi/#ProcessEnv"><code>ProcessEnv</code></a>
+      function returns FastCGI environment variables associated with an HTTP request
+      for which there are no appropriate
+      <a href="/pkg/net/http/#Request"><code>http.Request</code></a>
+      fields, such as <code>REMOTE_USER</code>.
+    </p>
+
+</dl><!-- net/http/fcgi -->
+
+<dl id="net/http/httptest"><dt><a href="/pkg/net/http/httptest/">net/http/httptest</a></dt>
+  <dd>
+    <p><!-- CL 34639 -->
+      The new
+      <a href="/pkg/net/http/httptest/#Server.Client"><code>Server.Client</code></a>
+      method returns an HTTP client configured for making requests to the test server.
+    </p>
+
+    <p>
+      The new
+      <a href="/pkg/net/http/httptest/#Server.Certificate"><code>Server.Certificate</code></a>
+      method returns the test server's TLS certificate, if any.
+    </p>
+
+</dl><!-- net/http/httptest -->
+
+<dl id="net/http/httputil"><dt><a href="/pkg/net/http/httputil/">net/http/httputil</a></dt>
+  <dd>
+    <p><!-- CL 43712 -->
+      The <a href="/pkg/net/http/httputil/#ReverseProxy"><code>ReverseProxy</code></a>
+      now proxies all HTTP/2 response trailers, even those not declared in the initial response
+      header. Such undeclared trailers are used by the gRPC protocol.
+    </p>
+
+</dl><!-- net/http/httputil -->
+
+<dl id="os"><dt><a href="/pkg/os/">os</a></dt>
+  <dd>
+    <p><!-- CL 36800 -->
+      The <code>os</code> package now uses the internal runtime poller
+      for file I/O.
+      This reduces the number of threads required for read/write
+      operations on pipes, and it eliminates races when one goroutine
+      closes a file while another is using the file for I/O.
+    </p>
+
+  <dd>
+    <p><!-- CL 37915 -->
+      On Windows,
+      <a href="/pkg/os/#Args"><code>Args</code></a>
+      is now populated without <code>shell32.dll</code>, improving process start-up time by 1-7 ms.
+      </p>
+
+</dl><!-- os -->
+
+<dl id="os/exec"><dt><a href="/pkg/os/exec/">os/exec</a></dt>
+  <dd>
+    <p><!-- CL 37586 -->
+      The <code>os/exec</code> package now prevents child processes from being created with
+      any duplicate environment variables.
+      If <a href="/pkg/os/exec/#Cmd.Env"><code>Cmd.Env</code></a>
+      contains duplicate environment keys, only the last
+      value in the slice for each duplicate key is used.
+    </p>
+
+</dl><!-- os/exec -->
+
+<dl id="os/user"><dt><a href="/pkg/os/user/">os/user</a></dt>
+  <dd>
+    <p><!-- CL 37664 -->
+      <a href="/pkg/os/user/#Lookup"><code>Lookup</code></a> and
+      <a href="/pkg/os/user/#LookupId"><code>LookupId</code></a> now
+      work on Unix systems when <code>CGO_ENABLED=0</code> by reading
+      the <code>/etc/passwd</code> file.
+    </p>
+
+    <p><!-- CL 33713 -->
+      <a href="/pkg/os/user/#LookupGroup"><code>LookupGroup</code></a> and
+      <a href="/pkg/os/user/#LookupGroupId"><code>LookupGroupId</code></a> now
+      work on Unix systems when <code>CGO_ENABLED=0</code> by reading
+      the <code>/etc/group</code> file.
+    </p>
+
+</dl><!-- os/user -->
+
+<dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
+  <dd>
+    <p><!-- CL 38335 -->
+      The new
+      <a href="/pkg/reflect/#MakeMapWithSize"><code>MakeMapWithSize</code></a>
+      function creates a map with a capacity hint.
+    </p>
+
+</dl><!-- reflect -->
+
+<dl id="pkg-runtime"><dt><a href="/pkg/runtime/">runtime</a></dt>
+  <dd>
+    <p><!-- CL 37233, CL 37726 -->
+      Tracebacks generated by the runtime and recorded in profiles are
+      now accurate in the presence of inlining.
+      To retrieve tracebacks programmatically, applications should use
+      <a href="/pkg/runtime/#CallersFrames"><code>runtime.CallersFrames</code></a>
+      rather than directly iterating over the results of
+      <a href="/pkg/runtime/#Callers"><code>runtime.Callers</code></a>.
+    </p>
+
+    <p><!-- CL 38403 -->
+      On Windows, Go no longer forces the system timer to run at high
+      resolution when the program is idle.
+      This should reduce the impact of Go programs on battery life.
+    </p>
+
+    <p><!-- CL 29341 -->
+      On FreeBSD, <code>GOMAXPROCS</code> and
+      <a href="/pkg/runtime/#NumCPU"><code>runtime.NumCPU</code></a>
+      are now based on the process' CPU mask, rather than the total
+      number of CPUs.
+    </p>
+
+    <p><!-- CL 43641 -->
+      The runtime has preliminary support for Android O.
+    </p>
+
+</dl><!-- runtime -->
+
+<dl id="runtime/debug"><dt><a href="/pkg/runtime/debug/">runtime/debug</a></dt>
+  <dd>
+    <p><!-- CL 34013 -->
+      Calling
+      <a href="/pkg/runtime/debug/#SetGCPercent"><code>SetGCPercent</code></a>
+      with a negative value no longer runs an immediate garbage collection.
+    </p>
+
+</dl><!-- runtime/debug -->
+
+<dl id="runtime/trace"><dt><a href="/pkg/runtime/trace/">runtime/trace</a></dt>
+  <dd>
+    <p><!-- CL 36015 -->
+      The execution trace now displays mark assist events, which
+      indicate when an application goroutine is forced to assist
+      garbage collection because it is allocating too quickly.
+    </p>
+
+    <p><!-- CL 40810 -->
+      "Sweep" events now encompass the entire process of finding free
+      space for an allocation, rather than recording each individual
+      span that is swept.
+      This reduces allocation latency when tracing allocation-heavy
+      programs.
+      The sweep event shows how many bytes were swept and how many
+      were reclaimed.
+    </p>
+
+</dl><!-- runtime/trace -->
+
+<dl id="sync"><dt><a href="/pkg/sync/">sync</a></dt>
+  <dd>
+    <p><!-- CL 34310 -->
+      <a href="/pkg/sync/#Mutex"><code>Mutex</code></a> is now more fair.
+    </p>
+
+</dl><!-- sync -->
+
+<dl id="syscall"><dt><a href="/pkg/syscall/">syscall</a></dt>
+  <dd>
+    <p><!-- CL 36697 -->
+      The new field
+      <a href="/pkg/syscall/#Credential.NoSetGroups"><code>Credential.NoSetGroups</code></a>
+      controls whether Unix systems make a <code>setgroups</code> system call
+      to set supplementary groups when starting a new process.
+    </p>
+
+    <p><!-- CL 43512 -->
+      The new field
+      <a href="/pkg/syscall/#SysProcAttr.AmbientCaps"><code>SysProcAttr.AmbientCaps</code></a>
+      allows setting ambient capabilities on Linux 4.3+ when creating
+      a new process.
+    </p>
+
+    <p><!-- CL 37439 -->
+      On 64-bit x86 Linux, process creation latency has been optimized with
+      use of <code>CLONE_VFORK</code> and <code>CLONE_VM</code>.
+    </p>
+
+    <p><!-- CL 37913 -->
+      The new
+      <a href="/pkg/syscall/#Conn"><code>Conn</code></a>
+      interface describes some types in the
+      <a href="/pkg/net/"><code>net</code></a>
+      package that can provide access to their underlying file descriptor
+      using the new
+      <a href="/pkg/syscall/#RawConn"><code>RawConn</code></a>
+      interface.
+    </p>
+
+</dl><!-- syscall -->
+
+
+<dl id="testing/quick"><dt><a href="/pkg/testing/quick/">testing/quick</a></dt>
+  <dd>
+    <p><!-- CL 39152 -->
+      The package now chooses values in the full range when
+      generating <code>int64</code> and <code>uint64</code> random
+      numbers; in earlier releases generated values were always
+      limited to the [-2<sup>62</sup>, 2<sup>62</sup>) range.
+    </p>
+
+    <p>
+      In previous releases, using a nil
+      <a href="/pkg/testing/quick/#Config.Rand"><code>Config.Rand</code></a>
+      value caused a fixed deterministic random number generator to be used.
+      It now uses a random number generator seeded with the current time.
+      For the old behavior, set <code>Config.Rand</code> to <code>rand.New(rand.NewSource(0))</code>.
+    </p>
+
+</dl><!-- testing/quick -->
+
+<dl id="text/template"><dt><a href="/pkg/text/template/">text/template</a></dt>
+  <dd>
+    <p><!-- CL 38420 -->
+	  The handling of empty blocks, which was broken by a Go 1.8
+	  change that made the result dependent on the order of templates,
+	  has been fixed, restoring the old Go 1.7 behavior.
+    </p>
+
+</dl><!-- text/template -->
+
+<dl id="time"><dt><a href="/pkg/time/">time</a></dt>
+  <dd>
+    <p><!-- CL 36615 -->
+      The new methods
+      <a href="/pkg/time/#Duration.Round"><code>Duration.Round</code></a>
+      and
+      <a href="/pkg/time/#Duration.Truncate"><code>Duration.Truncate</code></a>
+      handle rounding and truncating durations to multiples of a given duration.
+    </p>
+
+    <p><!-- CL 35710 -->
+      Retrieving the time and sleeping now work correctly under Wine.
+    </p>
+
+    <p>
+      If a <code>Time</code> value has a monotonic clock reading, its
+      string representation (as returned by <code>String</code>) now includes a
+      final field <code>"m=±value"</code>, where <code>value</code> is the
+      monotonic clock reading formatted as a decimal number of seconds.
+    </p>
+
+    <p><!-- CL 44832 -->
+      The included <code>tzdata</code> timezone database has been
+      updated to version 2017b. As always, it is only used if the
+      system does not already have the database available.
+    </p>
+
+</dl><!-- time -->
diff --git a/_content/doc/go1.html b/_content/doc/go1.html
new file mode 100644
index 0000000..939ee24
--- /dev/null
+++ b/_content/doc/go1.html
@@ -0,0 +1,2038 @@
+<!--{
+	"Title": "Go 1 Release Notes",
+	"Path":  "/doc/go1",
+	"Template": true
+}-->
+
+<h2 id="introduction">Introduction to Go 1</h2>
+
+<p>
+Go version 1, Go 1 for short, defines a language and a set of core libraries
+that provide a stable foundation for creating reliable products, projects, and
+publications.
+</p>
+
+<p>
+The driving motivation for Go 1 is stability for its users. People should be able to
+write Go programs and expect that they will continue to compile and run without
+change, on a time scale of years, including in production environments such as
+Google App Engine. Similarly, people should be able to write books about Go, be
+able to say which version of Go the book is describing, and have that version
+number still be meaningful much later.
+</p>
+
+<p>
+Code that compiles in Go 1 should, with few exceptions, continue to compile and
+run throughout the lifetime of that version, even as we issue updates and bug
+fixes such as Go version 1.1, 1.2, and so on. Other than critical fixes, changes
+made to the language and library for subsequent releases of Go 1 may
+add functionality but will not break existing Go 1 programs.
+<a href="go1compat.html">The Go 1 compatibility document</a>
+explains the compatibility guidelines in more detail.
+</p>
+
+<p>
+Go 1 is a representation of Go as it used today, not a wholesale rethinking of
+the language. We avoided designing new features and instead focused on cleaning
+up problems and inconsistencies and improving portability. There are a number
+changes to the Go language and packages that we had considered for some time and
+prototyped but not released primarily because they are significant and
+backwards-incompatible. Go 1 was an opportunity to get them out, which is
+helpful for the long term, but also means that Go 1 introduces incompatibilities
+for old programs. Fortunately, the <code>go</code> <code>fix</code> tool can
+automate much of the work needed to bring programs up to the Go 1 standard.
+</p>
+
+<p>
+This document outlines the major changes in Go 1 that will affect programmers
+updating existing code; its reference point is the prior release, r60 (tagged as
+r60.3). It also explains how to update code from r60 to run under Go 1.
+</p>
+
+<h2 id="language">Changes to the language</h2>
+
+<h3 id="append">Append</h3>
+
+<p>
+The <code>append</code> predeclared variadic function makes it easy to grow a slice
+by adding elements to the end.
+A common use is to add bytes to the end of a byte slice when generating output.
+However, <code>append</code> did not provide a way to append a string to a <code>[]byte</code>,
+which is another common case.
+</p>
+
+{{code "/doc/progs/go1.go" `/greeting := ..byte/` `/append.*hello/`}}
+
+<p>
+By analogy with the similar property of <code>copy</code>, Go 1
+permits a string to be appended (byte-wise) directly to a byte
+slice, reducing the friction between strings and byte slices.
+The conversion is no longer necessary:
+</p>
+
+{{code "/doc/progs/go1.go" `/append.*world/`}}
+
+<p>
+<em>Updating</em>:
+This is a new feature, so existing code needs no changes.
+</p>
+
+<h3 id="close">Close</h3>
+
+<p>
+The <code>close</code> predeclared function provides a mechanism
+for a sender to signal that no more values will be sent.
+It is important to the implementation of <code>for</code> <code>range</code>
+loops over channels and is helpful in other situations.
+Partly by design and partly because of race conditions that can occur otherwise,
+it is intended for use only by the goroutine sending on the channel,
+not by the goroutine receiving data.
+However, before Go 1 there was no compile-time checking that <code>close</code>
+was being used correctly.
+</p>
+
+<p>
+To close this gap, at least in part, Go 1 disallows <code>close</code> on receive-only channels.
+Attempting to close such a channel is a compile-time error.
+</p>
+
+<pre>
+    var c chan int
+    var csend chan&lt;- int = c
+    var crecv &lt;-chan int = c
+    close(c)     // legal
+    close(csend) // legal
+    close(crecv) // illegal
+</pre>
+
+<p>
+<em>Updating</em>:
+Existing code that attempts to close a receive-only channel was
+erroneous even before Go 1 and should be fixed.  The compiler will
+now reject such code.
+</p>
+
+<h3 id="literals">Composite literals</h3>
+
+<p>
+In Go 1, a composite literal of array, slice, or map type can elide the
+type specification for the elements' initializers if they are of pointer type.
+All four of the initializations in this example are legal; the last one was illegal before Go 1.
+</p>
+
+{{code "/doc/progs/go1.go" `/type Date struct/` `/STOP/`}}
+
+<p>
+<em>Updating</em>:
+This change has no effect on existing code, but the command
+<code>gofmt</code> <code>-s</code> applied to existing source
+will, among other things, elide explicit element types wherever permitted.
+</p>
+
+
+<h3 id="init">Goroutines during init</h3>
+
+<p>
+The old language defined that <code>go</code> statements executed during initialization created goroutines but that they did not begin to run until initialization of the entire program was complete.
+This introduced clumsiness in many places and, in effect, limited the utility
+of the <code>init</code> construct:
+if it was possible for another package to use the library during initialization, the library
+was forced to avoid goroutines.
+This design was done for reasons of simplicity and safety but,
+as our confidence in the language grew, it seemed unnecessary.
+Running goroutines during initialization is no more complex or unsafe than running them during normal execution.
+</p>
+
+<p>
+In Go 1, code that uses goroutines can be called from
+<code>init</code> routines and global initialization expressions
+without introducing a deadlock.
+</p>
+
+{{code "/doc/progs/go1.go" `/PackageGlobal/` `/^}/`}}
+
+<p>
+<em>Updating</em>:
+This is a new feature, so existing code needs no changes,
+although it's possible that code that depends on goroutines not starting before <code>main</code> will break.
+There was no such code in the standard repository.
+</p>
+
+<h3 id="rune">The rune type</h3>
+
+<p>
+The language spec allows the <code>int</code> type to be 32 or 64 bits wide, but current implementations set <code>int</code> to 32 bits even on 64-bit platforms.
+It would be preferable to have <code>int</code> be 64 bits on 64-bit platforms.
+(There are important consequences for indexing large slices.)
+However, this change would waste space when processing Unicode characters with
+the old language because the <code>int</code> type was also used to hold Unicode code points: each code point would waste an extra 32 bits of storage if <code>int</code> grew from 32 bits to 64.
+</p>
+
+<p>
+To make changing to 64-bit <code>int</code> feasible,
+Go 1 introduces a new basic type, <code>rune</code>, to represent
+individual Unicode code points.
+It is an alias for <code>int32</code>, analogous to <code>byte</code>
+as an alias for <code>uint8</code>.
+</p>
+
+<p>
+Character literals such as <code>'a'</code>, <code>'語'</code>, and <code>'\u0345'</code>
+now have default type <code>rune</code>,
+analogous to <code>1.0</code> having default type <code>float64</code>.
+A variable initialized to a character constant will therefore
+have type <code>rune</code> unless otherwise specified.
+</p>
+
+<p>
+Libraries have been updated to use <code>rune</code> rather than <code>int</code>
+when appropriate. For instance, the functions <code>unicode.ToLower</code> and
+relatives now take and return a <code>rune</code>.
+</p>
+
+{{code "/doc/progs/go1.go" `/STARTRUNE/` `/ENDRUNE/`}}
+
+<p>
+<em>Updating</em>:
+Most source code will be unaffected by this because the type inference from
+<code>:=</code> initializers introduces the new type silently, and it propagates
+from there.
+Some code may get type errors that a trivial conversion will resolve.
+</p>
+
+<h3 id="error">The error type</h3>
+
+<p>
+Go 1 introduces a new built-in type, <code>error</code>, which has the following definition:
+</p>
+
+<pre>
+    type error interface {
+        Error() string
+    }
+</pre>
+
+<p>
+Since the consequences of this type are all in the package library,
+it is discussed <a href="#errors">below</a>.
+</p>
+
+<h3 id="delete">Deleting from maps</h3>
+
+<p>
+In the old language, to delete the entry with key <code>k</code> from map <code>m</code>, one wrote the statement,
+</p>
+
+<pre>
+    m[k] = value, false
+</pre>
+
+<p>
+This syntax was a peculiar special case, the only two-to-one assignment.
+It required passing a value (usually ignored) that is evaluated but discarded,
+plus a boolean that was nearly always the constant <code>false</code>.
+It did the job but was odd and a point of contention.
+</p>
+
+<p>
+In Go 1, that syntax has gone; instead there is a new built-in
+function, <code>delete</code>.  The call
+</p>
+
+{{code "/doc/progs/go1.go" `/delete\(m, k\)/`}}
+
+<p>
+will delete the map entry retrieved by the expression <code>m[k]</code>.
+There is no return value. Deleting a non-existent entry is a no-op.
+</p>
+
+<p>
+<em>Updating</em>:
+Running <code>go</code> <code>fix</code> will convert expressions of the form <code>m[k] = value,
+false</code> into <code>delete(m, k)</code> when it is clear that
+the ignored value can be safely discarded from the program and
+<code>false</code> refers to the predefined boolean constant.
+The fix tool
+will flag other uses of the syntax for inspection by the programmer.
+</p>
+
+<h3 id="iteration">Iterating in maps</h3>
+
+<p>
+The old language specification did not define the order of iteration for maps,
+and in practice it differed across hardware platforms.
+This caused tests that iterated over maps to be fragile and non-portable, with the
+unpleasant property that a test might always pass on one machine but break on another.
+</p>
+
+<p>
+In Go 1, the order in which elements are visited when iterating
+over a map using a <code>for</code> <code>range</code> statement
+is defined to be unpredictable, even if the same loop is run multiple
+times with the same map.
+Code should not assume that the elements are visited in any particular order.
+</p>
+
+<p>
+This change means that code that depends on iteration order is very likely to break early and be fixed long before it becomes a problem.
+Just as important, it allows the map implementation to ensure better map balancing even when programs are using range loops to select an element from a map.
+</p>
+
+{{code "/doc/progs/go1.go" `/Sunday/` `/^	}/`}}
+
+<p>
+<em>Updating</em>:
+This is one change where tools cannot help.  Most existing code
+will be unaffected, but some programs may break or misbehave; we
+recommend manual checking of all range statements over maps to
+verify they do not depend on iteration order. There were a few such
+examples in the standard repository; they have been fixed.
+Note that it was already incorrect to depend on the iteration order, which
+was unspecified. This change codifies the unpredictability.
+</p>
+
+<h3 id="multiple_assignment">Multiple assignment</h3>
+
+<p>
+The language specification has long guaranteed that in assignments
+the right-hand-side expressions are all evaluated before any left-hand-side expressions are assigned.
+To guarantee predictable behavior,
+Go 1 refines the specification further.
+</p>
+
+<p>
+If the left-hand side of the assignment
+statement contains expressions that require evaluation, such as
+function calls or array indexing operations, these will all be done
+using the usual left-to-right rule before any variables are assigned
+their value.  Once everything is evaluated, the actual assignments
+proceed in left-to-right order.
+</p>
+
+<p>
+These examples illustrate the behavior.
+</p>
+
+{{code "/doc/progs/go1.go" `/sa :=/` `/then sc.0. = 2/`}}
+
+<p>
+<em>Updating</em>:
+This is one change where tools cannot help, but breakage is unlikely.
+No code in the standard repository was broken by this change, and code
+that depended on the previous unspecified behavior was already incorrect.
+</p>
+
+<h3 id="shadowing">Returns and shadowed variables</h3>
+
+<p>
+A common mistake is to use <code>return</code> (without arguments) after an assignment to a variable that has the same name as a result variable but is not the same variable.
+This situation is called <em>shadowing</em>: the result variable has been shadowed by another variable with the same name declared in an inner scope.
+</p>
+
+<p>
+In functions with named return values,
+the Go 1 compilers disallow return statements without arguments if any of the named return values is shadowed at the point of the return statement.
+(It isn't part of the specification, because this is one area we are still exploring;
+the situation is analogous to the compilers rejecting functions that do not end with an explicit return statement.)
+</p>
+
+<p>
+This function implicitly returns a shadowed return value and will be rejected by the compiler:
+</p>
+
+<pre>
+    func Bug() (i, j, k int) {
+        for i = 0; i &lt; 5; i++ {
+            for j := 0; j &lt; 5; j++ { // Redeclares j.
+                k += i*j
+                if k > 100 {
+                    return // Rejected: j is shadowed here.
+                }
+            }
+        }
+        return // OK: j is not shadowed here.
+    }
+</pre>
+
+<p>
+<em>Updating</em>:
+Code that shadows return values in this way will be rejected by the compiler and will need to be fixed by hand.
+The few cases that arose in the standard repository were mostly bugs.
+</p>
+
+<h3 id="unexported">Copying structs with unexported fields</h3>
+
+<p>
+The old language did not allow a package to make a copy of a struct value containing unexported fields belonging to a different package.
+There was, however, a required exception for a method receiver;
+also, the implementations of <code>copy</code> and <code>append</code> have never honored the restriction.
+</p>
+
+<p>
+Go 1 will allow packages to copy struct values containing unexported fields from other packages.
+Besides resolving the inconsistency,
+this change admits a new kind of API: a package can return an opaque value without resorting to a pointer or interface.
+The new implementations of <code>time.Time</code> and
+<code>reflect.Value</code> are examples of types taking advantage of this new property.
+</p>
+
+<p>
+As an example, if package <code>p</code> includes the definitions,
+</p>
+
+<pre>
+    type Struct struct {
+        Public int
+        secret int
+    }
+    func NewStruct(a int) Struct {  // Note: not a pointer.
+        return Struct{a, f(a)}
+    }
+    func (s Struct) String() string {
+        return fmt.Sprintf("{%d (secret %d)}", s.Public, s.secret)
+    }
+</pre>
+
+<p>
+a package that imports <code>p</code> can assign and copy values of type
+<code>p.Struct</code> at will.
+Behind the scenes the unexported fields will be assigned and copied just
+as if they were exported,
+but the client code will never be aware of them. The code
+</p>
+
+<pre>
+    import "p"
+
+    myStruct := p.NewStruct(23)
+    copyOfMyStruct := myStruct
+    fmt.Println(myStruct, copyOfMyStruct)
+</pre>
+
+<p>
+will show that the secret field of the struct has been copied to the new value.
+</p>
+
+<p>
+<em>Updating</em>:
+This is a new feature, so existing code needs no changes.
+</p>
+
+<h3 id="equality">Equality</h3>
+
+<p>
+Before Go 1, the language did not define equality on struct and array values.
+This meant,
+among other things, that structs and arrays could not be used as map keys.
+On the other hand, Go did define equality on function and map values.
+Function equality was problematic in the presence of closures
+(when are two closures equal?)
+while map equality compared pointers, not the maps' content, which was usually
+not what the user would want.
+</p>
+
+<p>
+Go 1 addressed these issues.
+First, structs and arrays can be compared for equality and inequality
+(<code>==</code> and <code>!=</code>),
+and therefore be used as map keys,
+provided they are composed from elements for which equality is also defined,
+using element-wise comparison.
+</p>
+
+{{code "/doc/progs/go1.go" `/type Day struct/` `/Printf/`}}
+
+<p>
+Second, Go 1 removes the definition of equality for function values,
+except for comparison with <code>nil</code>.
+Finally, map equality is gone too, also except for comparison with <code>nil</code>.
+</p>
+
+<p>
+Note that equality is still undefined for slices, for which the
+calculation is in general infeasible.  Also note that the ordered
+comparison operators (<code>&lt;</code> <code>&lt;=</code>
+<code>&gt;</code> <code>&gt;=</code>) are still undefined for
+structs and arrays.
+
+<p>
+<em>Updating</em>:
+Struct and array equality is a new feature, so existing code needs no changes.
+Existing code that depends on function or map equality will be
+rejected by the compiler and will need to be fixed by hand.
+Few programs will be affected, but the fix may require some
+redesign.
+</p>
+
+<h2 id="packages">The package hierarchy</h2>
+
+<p>
+Go 1 addresses many deficiencies in the old standard library and
+cleans up a number of packages, making them more internally consistent
+and portable.
+</p>
+
+<p>
+This section describes how the packages have been rearranged in Go 1.
+Some have moved, some have been renamed, some have been deleted.
+New packages are described in later sections.
+</p>
+
+<h3 id="hierarchy">The package hierarchy</h3>
+
+<p>
+Go 1 has a rearranged package hierarchy that groups related items
+into subdirectories. For instance, <code>utf8</code> and
+<code>utf16</code> now occupy subdirectories of <code>unicode</code>.
+Also, <a href="#subrepo">some packages</a> have moved into
+subrepositories of
+<a href="//code.google.com/p/go"><code>code.google.com/p/go</code></a>
+while <a href="#deleted">others</a> have been deleted outright.
+</p>
+
+<table class="codetable" frame="border" summary="Moved packages">
+<colgroup align="left" width="60%"></colgroup>
+<colgroup align="left" width="40%"></colgroup>
+<tr>
+<th align="left">Old path</th>
+<th align="left">New path</th>
+</tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>asn1</td> <td>encoding/asn1</td></tr>
+<tr><td>csv</td> <td>encoding/csv</td></tr>
+<tr><td>gob</td> <td>encoding/gob</td></tr>
+<tr><td>json</td> <td>encoding/json</td></tr>
+<tr><td>xml</td> <td>encoding/xml</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>exp/template/html</td> <td>html/template</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>big</td> <td>math/big</td></tr>
+<tr><td>cmath</td> <td>math/cmplx</td></tr>
+<tr><td>rand</td> <td>math/rand</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>http</td> <td>net/http</td></tr>
+<tr><td>http/cgi</td> <td>net/http/cgi</td></tr>
+<tr><td>http/fcgi</td> <td>net/http/fcgi</td></tr>
+<tr><td>http/httptest</td> <td>net/http/httptest</td></tr>
+<tr><td>http/pprof</td> <td>net/http/pprof</td></tr>
+<tr><td>mail</td> <td>net/mail</td></tr>
+<tr><td>rpc</td> <td>net/rpc</td></tr>
+<tr><td>rpc/jsonrpc</td> <td>net/rpc/jsonrpc</td></tr>
+<tr><td>smtp</td> <td>net/smtp</td></tr>
+<tr><td>url</td> <td>net/url</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>exec</td> <td>os/exec</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>scanner</td> <td>text/scanner</td></tr>
+<tr><td>tabwriter</td> <td>text/tabwriter</td></tr>
+<tr><td>template</td> <td>text/template</td></tr>
+<tr><td>template/parse</td> <td>text/template/parse</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>utf8</td> <td>unicode/utf8</td></tr>
+<tr><td>utf16</td> <td>unicode/utf16</td></tr>
+</table>
+
+<p>
+Note that the package names for the old <code>cmath</code> and
+<code>exp/template/html</code> packages have changed to <code>cmplx</code>
+and <code>template</code>.
+</p>
+
+<p>
+<em>Updating</em>:
+Running <code>go</code> <code>fix</code> will update all imports and package renames for packages that
+remain inside the standard repository.  Programs that import packages
+that are no longer in the standard repository will need to be edited
+by hand.
+</p>
+
+<h3 id="exp">The package tree exp</h3>
+
+<p>
+Because they are not standardized, the packages under the <code>exp</code> directory will not be available in the
+standard Go 1 release distributions, although they will be available in source code form
+in <a href="//code.google.com/p/go/">the repository</a> for
+developers who wish to use them.
+</p>
+
+<p>
+Several packages have moved under <code>exp</code> at the time of Go 1's release:
+</p>
+
+<ul>
+<li><code>ebnf</code></li>
+<li><code>html</code><sup>&#8224;</sup></li>
+<li><code>go/types</code></li>
+</ul>
+
+<p>
+(<sup>&#8224;</sup>The <code>EscapeString</code> and <code>UnescapeString</code> types remain
+in package <code>html</code>.)
+</p>
+
+<p>
+All these packages are available under the same names, with the prefix <code>exp/</code>: <code>exp/ebnf</code> etc.
+</p>
+
+<p>
+Also, the <code>utf8.String</code> type has been moved to its own package, <code>exp/utf8string</code>.
+</p>
+
+<p>
+Finally, the <code>gotype</code> command now resides in <code>exp/gotype</code>, while
+<code>ebnflint</code> is now in <code>exp/ebnflint</code>.
+If they are installed, they now reside in <code>$GOROOT/bin/tool</code>.
+</p>
+
+<p>
+<em>Updating</em>:
+Code that uses packages in <code>exp</code> will need to be updated by hand,
+or else compiled from an installation that has <code>exp</code> available.
+The <code>go</code> <code>fix</code> tool or the compiler will complain about such uses.
+</p>
+
+<h3 id="old">The package tree old</h3>
+
+<p>
+Because they are deprecated, the packages under the <code>old</code> directory will not be available in the
+standard Go 1 release distributions, although they will be available in source code form for
+developers who wish to use them.
+</p>
+
+<p>
+The packages in their new locations are:
+</p>
+
+<ul>
+<li><code>old/netchan</code></li>
+</ul>
+
+<p>
+<em>Updating</em>:
+Code that uses packages now in <code>old</code> will need to be updated by hand,
+or else compiled from an installation that has <code>old</code> available.
+The <code>go</code> <code>fix</code> tool will warn about such uses.
+</p>
+
+<h3 id="deleted">Deleted packages</h3>
+
+<p>
+Go 1 deletes several packages outright:
+</p>
+
+<ul>
+<li><code>container/vector</code></li>
+<li><code>exp/datafmt</code></li>
+<li><code>go/typechecker</code></li>
+<li><code>old/regexp</code></li>
+<li><code>old/template</code></li>
+<li><code>try</code></li>
+</ul>
+
+<p>
+and also the command <code>gotry</code>.
+</p>
+
+<p>
+<em>Updating</em>:
+Code that uses <code>container/vector</code> should be updated to use
+slices directly.  See
+<a href="//code.google.com/p/go-wiki/wiki/SliceTricks">the Go
+Language Community Wiki</a> for some suggestions.
+Code that uses the other packages (there should be almost zero) will need to be rethought.
+</p>
+
+<h3 id="subrepo">Packages moving to subrepositories</h3>
+
+<p>
+Go 1 has moved a number of packages into other repositories, usually sub-repositories of
+<a href="//code.google.com/p/go/">the main Go repository</a>.
+This table lists the old and new import paths:
+
+<table class="codetable" frame="border" summary="Sub-repositories">
+<colgroup align="left" width="40%"></colgroup>
+<colgroup align="left" width="60%"></colgroup>
+<tr>
+<th align="left">Old</th>
+<th align="left">New</th>
+</tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>crypto/bcrypt</td> <td>code.google.com/p/go.crypto/bcrypt</tr>
+<tr><td>crypto/blowfish</td> <td>code.google.com/p/go.crypto/blowfish</tr>
+<tr><td>crypto/cast5</td> <td>code.google.com/p/go.crypto/cast5</tr>
+<tr><td>crypto/md4</td> <td>code.google.com/p/go.crypto/md4</tr>
+<tr><td>crypto/ocsp</td> <td>code.google.com/p/go.crypto/ocsp</tr>
+<tr><td>crypto/openpgp</td> <td>code.google.com/p/go.crypto/openpgp</tr>
+<tr><td>crypto/openpgp/armor</td> <td>code.google.com/p/go.crypto/openpgp/armor</tr>
+<tr><td>crypto/openpgp/elgamal</td> <td>code.google.com/p/go.crypto/openpgp/elgamal</tr>
+<tr><td>crypto/openpgp/errors</td> <td>code.google.com/p/go.crypto/openpgp/errors</tr>
+<tr><td>crypto/openpgp/packet</td> <td>code.google.com/p/go.crypto/openpgp/packet</tr>
+<tr><td>crypto/openpgp/s2k</td> <td>code.google.com/p/go.crypto/openpgp/s2k</tr>
+<tr><td>crypto/ripemd160</td> <td>code.google.com/p/go.crypto/ripemd160</tr>
+<tr><td>crypto/twofish</td> <td>code.google.com/p/go.crypto/twofish</tr>
+<tr><td>crypto/xtea</td> <td>code.google.com/p/go.crypto/xtea</tr>
+<tr><td>exp/ssh</td> <td>code.google.com/p/go.crypto/ssh</tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>image/bmp</td> <td>code.google.com/p/go.image/bmp</tr>
+<tr><td>image/tiff</td> <td>code.google.com/p/go.image/tiff</tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>net/dict</td> <td>code.google.com/p/go.net/dict</tr>
+<tr><td>net/websocket</td> <td>code.google.com/p/go.net/websocket</tr>
+<tr><td>exp/spdy</td> <td>code.google.com/p/go.net/spdy</tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>encoding/git85</td> <td>code.google.com/p/go.codereview/git85</tr>
+<tr><td>patch</td> <td>code.google.com/p/go.codereview/patch</tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>exp/wingui</td> <td>code.google.com/p/gowingui</tr>
+</table>
+
+<p>
+<em>Updating</em>:
+Running <code>go</code> <code>fix</code> will update imports of these packages to use the new import paths.
+Installations that depend on these packages will need to install them using
+a <code>go get</code> command.
+</p>
+
+<h2 id="major">Major changes to the library</h2>
+
+<p>
+This section describes significant changes to the core libraries, the ones that
+affect the most programs.
+</p>
+
+<h3 id="errors">The error type and errors package</h3>
+
+<p>
+The placement of <code>os.Error</code> in package <code>os</code> is mostly historical: errors first came up when implementing package <code>os</code>, and they seemed system-related at the time.
+Since then it has become clear that errors are more fundamental than the operating system.  For example, it would be nice to use <code>Errors</code> in packages that <code>os</code> depends on, like <code>syscall</code>.
+Also, having <code>Error</code> in <code>os</code> introduces many dependencies on <code>os</code> that would otherwise not exist.
+</p>
+
+<p>
+Go 1 solves these problems by introducing a built-in <code>error</code> interface type and a separate <code>errors</code> package (analogous to <code>bytes</code> and <code>strings</code>) that contains utility functions.
+It replaces <code>os.NewError</code> with
+<a href="/pkg/errors/#New"><code>errors.New</code></a>,
+giving errors a more central place in the environment.
+</p>
+
+<p>
+So the widely-used <code>String</code> method does not cause accidental satisfaction
+of the <code>error</code> interface, the <code>error</code> interface uses instead
+the name <code>Error</code> for that method:
+</p>
+
+<pre>
+    type error interface {
+        Error() string
+    }
+</pre>
+
+<p>
+The <code>fmt</code> library automatically invokes <code>Error</code>, as it already
+does for <code>String</code>, for easy printing of error values.
+</p>
+
+{{code "/doc/progs/go1.go" `/START ERROR EXAMPLE/` `/END ERROR EXAMPLE/`}}
+
+<p>
+All standard packages have been updated to use the new interface; the old <code>os.Error</code> is gone.
+</p>
+
+<p>
+A new package, <a href="/pkg/errors/"><code>errors</code></a>, contains the function
+</p>
+
+<pre>
+func New(text string) error
+</pre>
+
+<p>
+to turn a string into an error. It replaces the old <code>os.NewError</code>.
+</p>
+
+{{code "/doc/progs/go1.go" `/ErrSyntax/`}}
+
+<p>
+<em>Updating</em>:
+Running <code>go</code> <code>fix</code> will update almost all code affected by the change.
+Code that defines error types with a <code>String</code> method will need to be updated
+by hand to rename the methods to <code>Error</code>.
+</p>
+
+<h3 id="errno">System call errors</h3>
+
+<p>
+The old <code>syscall</code> package, which predated <code>os.Error</code>
+(and just about everything else),
+returned errors as <code>int</code> values.
+In turn, the <code>os</code> package forwarded many of these errors, such
+as <code>EINVAL</code>, but using a different set of errors on each platform.
+This behavior was unpleasant and unportable.
+</p>
+
+<p>
+In Go 1, the
+<a href="/pkg/syscall/"><code>syscall</code></a>
+package instead returns an <code>error</code> for system call errors.
+On Unix, the implementation is done by a
+<a href="/pkg/syscall/#Errno"><code>syscall.Errno</code></a> type
+that satisfies <code>error</code> and replaces the old <code>os.Errno</code>.
+</p>
+
+<p>
+The changes affecting <code>os.EINVAL</code> and relatives are
+described <a href="#os">elsewhere</a>.
+
+<p>
+<em>Updating</em>:
+Running <code>go</code> <code>fix</code> will update almost all code affected by the change.
+Regardless, most code should use the <code>os</code> package
+rather than <code>syscall</code> and so will be unaffected.
+</p>
+
+<h3 id="time">Time</h3>
+
+<p>
+Time is always a challenge to support well in a programming language.
+The old Go <code>time</code> package had <code>int64</code> units, no
+real type safety,
+and no distinction between absolute times and durations.
+</p>
+
+<p>
+One of the most sweeping changes in the Go 1 library is therefore a
+complete redesign of the
+<a href="/pkg/time/"><code>time</code></a> package.
+Instead of an integer number of nanoseconds as an <code>int64</code>,
+and a separate <code>*time.Time</code> type to deal with human
+units such as hours and years,
+there are now two fundamental types:
+<a href="/pkg/time/#Time"><code>time.Time</code></a>
+(a value, so the <code>*</code> is gone), which represents a moment in time;
+and <a href="/pkg/time/#Duration"><code>time.Duration</code></a>,
+which represents an interval.
+Both have nanosecond resolution.
+A <code>Time</code> can represent any time into the ancient
+past and remote future, while a <code>Duration</code> can
+span plus or minus only about 290 years.
+There are methods on these types, plus a number of helpful
+predefined constant durations such as <code>time.Second</code>.
+</p>
+
+<p>
+Among the new methods are things like
+<a href="/pkg/time/#Time.Add"><code>Time.Add</code></a>,
+which adds a <code>Duration</code> to a <code>Time</code>, and
+<a href="/pkg/time/#Time.Sub"><code>Time.Sub</code></a>,
+which subtracts two <code>Times</code> to yield a <code>Duration</code>.
+</p>
+
+<p>
+The most important semantic change is that the Unix epoch (Jan 1, 1970) is now
+relevant only for those functions and methods that mention Unix:
+<a href="/pkg/time/#Unix"><code>time.Unix</code></a>
+and the <a href="/pkg/time/#Time.Unix"><code>Unix</code></a>
+and <a href="/pkg/time/#Time.UnixNano"><code>UnixNano</code></a> methods
+of the <code>Time</code> type.
+In particular,
+<a href="/pkg/time/#Now"><code>time.Now</code></a>
+returns a <code>time.Time</code> value rather than, in the old
+API, an integer nanosecond count since the Unix epoch.
+</p>
+
+{{code "/doc/progs/go1.go" `/sleepUntil/` `/^}/`}}
+
+<p>
+The new types, methods, and constants have been propagated through
+all the standard packages that use time, such as <code>os</code> and
+its representation of file time stamps.
+</p>
+
+<p>
+<em>Updating</em>:
+The <code>go</code> <code>fix</code> tool will update many uses of the old <code>time</code> package to use the new
+types and methods, although it does not replace values such as <code>1e9</code>
+representing nanoseconds per second.
+Also, because of type changes in some of the values that arise,
+some of the expressions rewritten by the fix tool may require
+further hand editing; in such cases the rewrite will include
+the correct function or method for the old functionality, but
+may have the wrong type or require further analysis.
+</p>
+
+<h2 id="minor">Minor changes to the library</h2>
+
+<p>
+This section describes smaller changes, such as those to less commonly
+used packages or that affect
+few programs beyond the need to run <code>go</code> <code>fix</code>.
+This category includes packages that are new in Go 1.
+Collectively they improve portability, regularize behavior, and
+make the interfaces more modern and Go-like.
+</p>
+
+<h3 id="archive_zip">The archive/zip package</h3>
+
+<p>
+In Go 1, <a href="/pkg/archive/zip/#Writer"><code>*zip.Writer</code></a> no
+longer has a <code>Write</code> method. Its presence was a mistake.
+</p>
+
+<p>
+<em>Updating</em>:
+What little code is affected will be caught by the compiler and must be updated by hand.
+</p>
+
+<h3 id="bufio">The bufio package</h3>
+
+<p>
+In Go 1, <a href="/pkg/bufio/#NewReaderSize"><code>bufio.NewReaderSize</code></a>
+and
+<a href="/pkg/bufio/#NewWriterSize"><code>bufio.NewWriterSize</code></a>
+functions no longer return an error for invalid sizes.
+If the argument size is too small or invalid, it is adjusted.
+</p>
+
+<p>
+<em>Updating</em>:
+Running <code>go</code> <code>fix</code> will update calls that assign the error to _.
+Calls that aren't fixed will be caught by the compiler and must be updated by hand.
+</p>
+
+<h3 id="compress">The compress/flate, compress/gzip and compress/zlib packages</h3>
+
+<p>
+In Go 1, the <code>NewWriterXxx</code> functions in
+<a href="/pkg/compress/flate"><code>compress/flate</code></a>,
+<a href="/pkg/compress/gzip"><code>compress/gzip</code></a> and
+<a href="/pkg/compress/zlib"><code>compress/zlib</code></a>
+all return <code>(*Writer, error)</code> if they take a compression level,
+and <code>*Writer</code> otherwise. Package <code>gzip</code>'s
+<code>Compressor</code> and <code>Decompressor</code> types have been renamed
+to <code>Writer</code> and <code>Reader</code>. Package <code>flate</code>'s
+<code>WrongValueError</code> type has been removed.
+</p>
+
+<p>
+<em>Updating</em>
+Running <code>go</code> <code>fix</code> will update old names and calls that assign the error to _.
+Calls that aren't fixed will be caught by the compiler and must be updated by hand.
+</p>
+
+<h3 id="crypto_aes_des">The crypto/aes and crypto/des packages</h3>
+
+<p>
+In Go 1, the <code>Reset</code> method has been removed. Go does not guarantee
+that memory is not copied and therefore this method was misleading.
+</p>
+
+<p>
+The cipher-specific types <code>*aes.Cipher</code>, <code>*des.Cipher</code>,
+and <code>*des.TripleDESCipher</code> have been removed in favor of
+<code>cipher.Block</code>.
+</p>
+
+<p>
+<em>Updating</em>:
+Remove the calls to Reset. Replace uses of the specific cipher types with
+cipher.Block.
+</p>
+
+<h3 id="crypto_elliptic">The crypto/elliptic package</h3>
+
+<p>
+In Go 1, <a href="/pkg/crypto/elliptic/#Curve"><code>elliptic.Curve</code></a>
+has been made an interface to permit alternative implementations. The curve
+parameters have been moved to the
+<a href="/pkg/crypto/elliptic/#CurveParams"><code>elliptic.CurveParams</code></a>
+structure.
+</p>
+
+<p>
+<em>Updating</em>:
+Existing users of <code>*elliptic.Curve</code> will need to change to
+simply <code>elliptic.Curve</code>. Calls to <code>Marshal</code>,
+<code>Unmarshal</code> and <code>GenerateKey</code> are now functions
+in <code>crypto/elliptic</code> that take an <code>elliptic.Curve</code>
+as their first argument.
+</p>
+
+<h3 id="crypto_hmac">The crypto/hmac package</h3>
+
+<p>
+In Go 1, the hash-specific functions, such as <code>hmac.NewMD5</code>, have
+been removed from <code>crypto/hmac</code>. Instead, <code>hmac.New</code> takes
+a function that returns a <code>hash.Hash</code>, such as <code>md5.New</code>.
+</p>
+
+<p>
+<em>Updating</em>:
+Running <code>go</code> <code>fix</code> will perform the needed changes.
+</p>
+
+<h3 id="crypto_x509">The crypto/x509 package</h3>
+
+<p>
+In Go 1, the
+<a href="/pkg/crypto/x509/#CreateCertificate"><code>CreateCertificate</code></a>
+function and
+<a href="/pkg/crypto/x509/#Certificate.CreateCRL"><code>CreateCRL</code></a>
+method in <code>crypto/x509</code> have been altered to take an
+<code>interface{}</code> where they previously took a <code>*rsa.PublicKey</code>
+or <code>*rsa.PrivateKey</code>. This will allow other public key algorithms
+to be implemented in the future.
+</p>
+
+<p>
+<em>Updating</em>:
+No changes will be needed.
+</p>
+
+<h3 id="encoding_binary">The encoding/binary package</h3>
+
+<p>
+In Go 1, the <code>binary.TotalSize</code> function has been replaced by
+<a href="/pkg/encoding/binary/#Size"><code>Size</code></a>,
+which takes an <code>interface{}</code> argument rather than
+a <code>reflect.Value</code>.
+</p>
+
+<p>
+<em>Updating</em>:
+What little code is affected will be caught by the compiler and must be updated by hand.
+</p>
+
+<h3 id="encoding_xml">The encoding/xml package</h3>
+
+<p>
+In Go 1, the <a href="/pkg/encoding/xml/"><code>xml</code></a> package
+has been brought closer in design to the other marshaling packages such
+as <a href="/pkg/encoding/gob/"><code>encoding/gob</code></a>.
+</p>
+
+<p>
+The old <code>Parser</code> type is renamed
+<a href="/pkg/encoding/xml/#Decoder"><code>Decoder</code></a> and has a new
+<a href="/pkg/encoding/xml/#Decoder.Decode"><code>Decode</code></a> method. An
+<a href="/pkg/encoding/xml/#Encoder"><code>Encoder</code></a> type was also introduced.
+</p>
+
+<p>
+The functions <a href="/pkg/encoding/xml/#Marshal"><code>Marshal</code></a>
+and <a href="/pkg/encoding/xml/#Unmarshal"><code>Unmarshal</code></a>
+work with <code>[]byte</code> values now. To work with streams,
+use the new <a href="/pkg/encoding/xml/#Encoder"><code>Encoder</code></a>
+and <a href="/pkg/encoding/xml/#Decoder"><code>Decoder</code></a> types.
+</p>
+
+<p>
+When marshaling or unmarshaling values, the format of supported flags in
+field tags has changed to be closer to the
+<a href="/pkg/encoding/json"><code>json</code></a> package
+(<code>`xml:"name,flag"`</code>). The matching done between field tags, field
+names, and the XML attribute and element names is now case-sensitive.
+The <code>XMLName</code> field tag, if present, must also match the name
+of the XML element being marshaled.
+</p>
+
+<p>
+<em>Updating</em>:
+Running <code>go</code> <code>fix</code> will update most uses of the package except for some calls to
+<code>Unmarshal</code>. Special care must be taken with field tags,
+since the fix tool will not update them and if not fixed by hand they will
+misbehave silently in some cases. For example, the old
+<code>"attr"</code> is now written <code>",attr"</code> while plain
+<code>"attr"</code> remains valid but with a different meaning.
+</p>
+
+<h3 id="expvar">The expvar package</h3>
+
+<p>
+In Go 1, the <code>RemoveAll</code> function has been removed.
+The <code>Iter</code> function and Iter method on <code>*Map</code> have
+been replaced by
+<a href="/pkg/expvar/#Do"><code>Do</code></a>
+and
+<a href="/pkg/expvar/#Map.Do"><code>(*Map).Do</code></a>.
+</p>
+
+<p>
+<em>Updating</em>:
+Most code using <code>expvar</code> will not need changing. The rare code that used
+<code>Iter</code> can be updated to pass a closure to <code>Do</code> to achieve the same effect.
+</p>
+
+<h3 id="flag">The flag package</h3>
+
+<p>
+In Go 1, the interface <a href="/pkg/flag/#Value"><code>flag.Value</code></a> has changed slightly.
+The <code>Set</code> method now returns an <code>error</code> instead of
+a <code>bool</code> to indicate success or failure.
+</p>
+
+<p>
+There is also a new kind of flag, <code>Duration</code>, to support argument
+values specifying time intervals.
+Values for such flags must be given units, just as <code>time.Duration</code>
+formats them: <code>10s</code>, <code>1h30m</code>, etc.
+</p>
+
+{{code "/doc/progs/go1.go" `/timeout/`}}
+
+<p>
+<em>Updating</em>:
+Programs that implement their own flags will need minor manual fixes to update their
+<code>Set</code> methods.
+The <code>Duration</code> flag is new and affects no existing code.
+</p>
+
+
+<h3 id="go">The go/* packages</h3>
+
+<p>
+Several packages under <code>go</code> have slightly revised APIs.
+</p>
+
+<p>
+A concrete <code>Mode</code> type was introduced for configuration mode flags
+in the packages
+<a href="/pkg/go/scanner/"><code>go/scanner</code></a>,
+<a href="/pkg/go/parser/"><code>go/parser</code></a>,
+<a href="/pkg/go/printer/"><code>go/printer</code></a>, and
+<a href="/pkg/go/doc/"><code>go/doc</code></a>.
+</p>
+
+<p>
+The modes <code>AllowIllegalChars</code> and <code>InsertSemis</code> have been removed
+from the <a href="/pkg/go/scanner/"><code>go/scanner</code></a> package. They were mostly
+useful for scanning text other then Go source files. Instead, the
+<a href="/pkg/text/scanner/"><code>text/scanner</code></a> package should be used
+for that purpose.
+</p>
+
+<p>
+The <a href="/pkg/go/scanner/#ErrorHandler"><code>ErrorHandler</code></a> provided
+to the scanner's <a href="/pkg/go/scanner/#Scanner.Init"><code>Init</code></a> method is
+now simply a function rather than an interface. The <code>ErrorVector</code> type has
+been removed in favor of the (existing) <a href="/pkg/go/scanner/#ErrorList"><code>ErrorList</code></a>
+type, and the <code>ErrorVector</code> methods have been migrated. Instead of embedding
+an <code>ErrorVector</code> in a client of the scanner, now a client should maintain
+an <code>ErrorList</code>.
+</p>
+
+<p>
+The set of parse functions provided by the <a href="/pkg/go/parser/"><code>go/parser</code></a>
+package has been reduced to the primary parse function
+<a href="/pkg/go/parser/#ParseFile"><code>ParseFile</code></a>, and a couple of
+convenience functions <a href="/pkg/go/parser/#ParseDir"><code>ParseDir</code></a>
+and <a href="/pkg/go/parser/#ParseExpr"><code>ParseExpr</code></a>.
+</p>
+
+<p>
+The <a href="/pkg/go/printer/"><code>go/printer</code></a> package supports an additional
+configuration mode <a href="/pkg/go/printer/#Mode"><code>SourcePos</code></a>;
+if set, the printer will emit <code>//line</code> comments such that the generated
+output contains the original source code position information. The new type
+<a href="/pkg/go/printer/#CommentedNode"><code>CommentedNode</code></a> can be
+used to provide comments associated with an arbitrary
+<a href="/pkg/go/ast/#Node"><code>ast.Node</code></a> (until now only
+<a href="/pkg/go/ast/#File"><code>ast.File</code></a> carried comment information).
+</p>
+
+<p>
+The type names of the <a href="/pkg/go/doc/"><code>go/doc</code></a> package have been
+streamlined by removing the <code>Doc</code> suffix: <code>PackageDoc</code>
+is now <code>Package</code>, <code>ValueDoc</code> is <code>Value</code>, etc.
+Also, all types now consistently have a <code>Name</code> field (or <code>Names</code>,
+in the case of type <code>Value</code>) and <code>Type.Factories</code> has become
+<code>Type.Funcs</code>.
+Instead of calling <code>doc.NewPackageDoc(pkg, importpath)</code>,
+documentation for a package is created with:
+</p>
+
+<pre>
+    doc.New(pkg, importpath, mode)
+</pre>
+
+<p>
+where the new <code>mode</code> parameter specifies the operation mode:
+if set to <a href="/pkg/go/doc/#AllDecls"><code>AllDecls</code></a>, all declarations
+(not just exported ones) are considered.
+The function <code>NewFileDoc</code> was removed, and the function
+<code>CommentText</code> has become the method
+<a href="/pkg/go/ast/#CommentGroup.Text"><code>Text</code></a> of
+<a href="/pkg/go/ast/#CommentGroup"><code>ast.CommentGroup</code></a>.
+</p>
+
+<p>
+In package <a href="/pkg/go/token/"><code>go/token</code></a>, the
+<a href="/pkg/go/token/#FileSet"><code>token.FileSet</code></a> method <code>Files</code>
+(which originally returned a channel of <code>*token.File</code>s) has been replaced
+with the iterator <a href="/pkg/go/token/#FileSet.Iterate"><code>Iterate</code></a> that
+accepts a function argument instead.
+</p>
+
+<p>
+In package <a href="/pkg/go/build/"><code>go/build</code></a>, the API
+has been nearly completely replaced.
+The package still computes Go package information
+but it does not run the build: the <code>Cmd</code> and <code>Script</code>
+types are gone.
+(To build code, use the new
+<a href="/cmd/go/"><code>go</code></a> command instead.)
+The <code>DirInfo</code> type is now named
+<a href="/pkg/go/build/#Package"><code>Package</code></a>.
+<code>FindTree</code> and <code>ScanDir</code> are replaced by
+<a href="/pkg/go/build/#Import"><code>Import</code></a>
+and
+<a href="/pkg/go/build/#ImportDir"><code>ImportDir</code></a>.
+</p>
+
+<p>
+<em>Updating</em>:
+Code that uses packages in <code>go</code> will have to be updated by hand; the
+compiler will reject incorrect uses. Templates used in conjunction with any of the
+<code>go/doc</code> types may need manual fixes; the renamed fields will lead
+to run-time errors.
+</p>
+
+<h3 id="hash">The hash package</h3>
+
+<p>
+In Go 1, the definition of <a href="/pkg/hash/#Hash"><code>hash.Hash</code></a> includes
+a new method, <code>BlockSize</code>.  This new method is used primarily in the
+cryptographic libraries.
+</p>
+
+<p>
+The <code>Sum</code> method of the
+<a href="/pkg/hash/#Hash"><code>hash.Hash</code></a> interface now takes a
+<code>[]byte</code> argument, to which the hash value will be appended.
+The previous behavior can be recreated by adding a <code>nil</code> argument to the call.
+</p>
+
+<p>
+<em>Updating</em>:
+Existing implementations of <code>hash.Hash</code> will need to add a
+<code>BlockSize</code> method.  Hashes that process the input one byte at
+a time can implement <code>BlockSize</code> to return 1.
+Running <code>go</code> <code>fix</code> will update calls to the <code>Sum</code> methods of the various
+implementations of <code>hash.Hash</code>.
+</p>
+
+<p>
+<em>Updating</em>:
+Since the package's functionality is new, no updating is necessary.
+</p>
+
+<h3 id="http">The http package</h3>
+
+<p>
+In Go 1 the <a href="/pkg/net/http/"><code>http</code></a> package is refactored,
+putting some of the utilities into a
+<a href="/pkg/net/http/httputil/"><code>httputil</code></a> subdirectory.
+These pieces are only rarely needed by HTTP clients.
+The affected items are:
+</p>
+
+<ul>
+<li>ClientConn</li>
+<li>DumpRequest</li>
+<li>DumpRequestOut</li>
+<li>DumpResponse</li>
+<li>NewChunkedReader</li>
+<li>NewChunkedWriter</li>
+<li>NewClientConn</li>
+<li>NewProxyClientConn</li>
+<li>NewServerConn</li>
+<li>NewSingleHostReverseProxy</li>
+<li>ReverseProxy</li>
+<li>ServerConn</li>
+</ul>
+
+<p>
+The <code>Request.RawURL</code> field has been removed; it was a
+historical artifact.
+</p>
+
+<p>
+The <code>Handle</code> and <code>HandleFunc</code>
+functions, and the similarly-named methods of <code>ServeMux</code>,
+now panic if an attempt is made to register the same pattern twice.
+</p>
+
+<p>
+<em>Updating</em>:
+Running <code>go</code> <code>fix</code> will update the few programs that are affected except for
+uses of <code>RawURL</code>, which must be fixed by hand.
+</p>
+
+<h3 id="image">The image package</h3>
+
+<p>
+The <a href="/pkg/image/"><code>image</code></a> package has had a number of
+minor changes, rearrangements and renamings.
+</p>
+
+<p>
+Most of the color handling code has been moved into its own package,
+<a href="/pkg/image/color/"><code>image/color</code></a>.
+For the elements that moved, a symmetry arises; for instance,
+each pixel of an
+<a href="/pkg/image/#RGBA"><code>image.RGBA</code></a>
+is a
+<a href="/pkg/image/color/#RGBA"><code>color.RGBA</code></a>.
+</p>
+
+<p>
+The old <code>image/ycbcr</code> package has been folded, with some
+renamings, into the
+<a href="/pkg/image/"><code>image</code></a>
+and
+<a href="/pkg/image/color/"><code>image/color</code></a>
+packages.
+</p>
+
+<p>
+The old <code>image.ColorImage</code> type is still in the <code>image</code>
+package but has been renamed
+<a href="/pkg/image/#Uniform"><code>image.Uniform</code></a>,
+while <code>image.Tiled</code> has been removed.
+</p>
+
+<p>
+This table lists the renamings.
+</p>
+
+<table class="codetable" frame="border" summary="image renames">
+<colgroup align="left" width="50%"></colgroup>
+<colgroup align="left" width="50%"></colgroup>
+<tr>
+<th align="left">Old</th>
+<th align="left">New</th>
+</tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>image.Color</td> <td>color.Color</td></tr>
+<tr><td>image.ColorModel</td> <td>color.Model</td></tr>
+<tr><td>image.ColorModelFunc</td> <td>color.ModelFunc</td></tr>
+<tr><td>image.PalettedColorModel</td> <td>color.Palette</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>image.RGBAColor</td> <td>color.RGBA</td></tr>
+<tr><td>image.RGBA64Color</td> <td>color.RGBA64</td></tr>
+<tr><td>image.NRGBAColor</td> <td>color.NRGBA</td></tr>
+<tr><td>image.NRGBA64Color</td> <td>color.NRGBA64</td></tr>
+<tr><td>image.AlphaColor</td> <td>color.Alpha</td></tr>
+<tr><td>image.Alpha16Color</td> <td>color.Alpha16</td></tr>
+<tr><td>image.GrayColor</td> <td>color.Gray</td></tr>
+<tr><td>image.Gray16Color</td> <td>color.Gray16</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>image.RGBAColorModel</td> <td>color.RGBAModel</td></tr>
+<tr><td>image.RGBA64ColorModel</td> <td>color.RGBA64Model</td></tr>
+<tr><td>image.NRGBAColorModel</td> <td>color.NRGBAModel</td></tr>
+<tr><td>image.NRGBA64ColorModel</td> <td>color.NRGBA64Model</td></tr>
+<tr><td>image.AlphaColorModel</td> <td>color.AlphaModel</td></tr>
+<tr><td>image.Alpha16ColorModel</td> <td>color.Alpha16Model</td></tr>
+<tr><td>image.GrayColorModel</td> <td>color.GrayModel</td></tr>
+<tr><td>image.Gray16ColorModel</td> <td>color.Gray16Model</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>ycbcr.RGBToYCbCr</td> <td>color.RGBToYCbCr</td></tr>
+<tr><td>ycbcr.YCbCrToRGB</td> <td>color.YCbCrToRGB</td></tr>
+<tr><td>ycbcr.YCbCrColorModel</td> <td>color.YCbCrModel</td></tr>
+<tr><td>ycbcr.YCbCrColor</td> <td>color.YCbCr</td></tr>
+<tr><td>ycbcr.YCbCr</td> <td>image.YCbCr</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>ycbcr.SubsampleRatio444</td> <td>image.YCbCrSubsampleRatio444</td></tr>
+<tr><td>ycbcr.SubsampleRatio422</td> <td>image.YCbCrSubsampleRatio422</td></tr>
+<tr><td>ycbcr.SubsampleRatio420</td> <td>image.YCbCrSubsampleRatio420</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>image.ColorImage</td> <td>image.Uniform</td></tr>
+</table>
+
+<p>
+The image package's <code>New</code> functions
+(<a href="/pkg/image/#NewRGBA"><code>NewRGBA</code></a>,
+<a href="/pkg/image/#NewRGBA64"><code>NewRGBA64</code></a>, etc.)
+take an <a href="/pkg/image/#Rectangle"><code>image.Rectangle</code></a> as an argument
+instead of four integers.
+</p>
+
+<p>
+Finally, there are new predefined <code>color.Color</code> variables
+<a href="/pkg/image/color/#Black"><code>color.Black</code></a>,
+<a href="/pkg/image/color/#White"><code>color.White</code></a>,
+<a href="/pkg/image/color/#Opaque"><code>color.Opaque</code></a>
+and
+<a href="/pkg/image/color/#Transparent"><code>color.Transparent</code></a>.
+</p>
+
+<p>
+<em>Updating</em>:
+Running <code>go</code> <code>fix</code> will update almost all code affected by the change.
+</p>
+
+<h3 id="log_syslog">The log/syslog package</h3>
+
+<p>
+In Go 1, the <a href="/pkg/log/syslog/#NewLogger"><code>syslog.NewLogger</code></a>
+function returns an error as well as a <code>log.Logger</code>.
+</p>
+
+<p>
+<em>Updating</em>:
+What little code is affected will be caught by the compiler and must be updated by hand.
+</p>
+
+<h3 id="mime">The mime package</h3>
+
+<p>
+In Go 1, the <a href="/pkg/mime/#FormatMediaType"><code>FormatMediaType</code></a> function
+of the <code>mime</code> package has  been simplified to make it
+consistent with
+<a href="/pkg/mime/#ParseMediaType"><code>ParseMediaType</code></a>.
+It now takes <code>"text/html"</code> rather than <code>"text"</code> and <code>"html"</code>.
+</p>
+
+<p>
+<em>Updating</em>:
+What little code is affected will be caught by the compiler and must be updated by hand.
+</p>
+
+<h3 id="net">The net package</h3>
+
+<p>
+In Go 1, the various <code>SetTimeout</code>,
+<code>SetReadTimeout</code>, and <code>SetWriteTimeout</code> methods
+have been replaced with
+<a href="/pkg/net/#IPConn.SetDeadline"><code>SetDeadline</code></a>,
+<a href="/pkg/net/#IPConn.SetReadDeadline"><code>SetReadDeadline</code></a>, and
+<a href="/pkg/net/#IPConn.SetWriteDeadline"><code>SetWriteDeadline</code></a>,
+respectively.  Rather than taking a timeout value in nanoseconds that
+apply to any activity on the connection, the new methods set an
+absolute deadline (as a <code>time.Time</code> value) after which
+reads and writes will time out and no longer block.
+</p>
+
+<p>
+There are also new functions
+<a href="/pkg/net/#DialTimeout"><code>net.DialTimeout</code></a>
+to simplify timing out dialing a network address and
+<a href="/pkg/net/#ListenMulticastUDP"><code>net.ListenMulticastUDP</code></a>
+to allow multicast UDP to listen concurrently across multiple listeners.
+The <code>net.ListenMulticastUDP</code> function replaces the old
+<code>JoinGroup</code> and <code>LeaveGroup</code> methods.
+</p>
+
+<p>
+<em>Updating</em>:
+Code that uses the old methods will fail to compile and must be updated by hand.
+The semantic change makes it difficult for the fix tool to update automatically.
+</p>
+
+<h3 id="os">The os package</h3>
+
+<p>
+The <code>Time</code> function has been removed; callers should use
+the <a href="/pkg/time/#Time"><code>Time</code></a> type from the
+<code>time</code> package.
+</p>
+
+<p>
+The <code>Exec</code> function has been removed; callers should use
+<code>Exec</code> from the <code>syscall</code> package, where available.
+</p>
+
+<p>
+The <code>ShellExpand</code> function has been renamed to <a
+href="/pkg/os/#ExpandEnv"><code>ExpandEnv</code></a>.
+</p>
+
+<p>
+The <a href="/pkg/os/#NewFile"><code>NewFile</code></a> function
+now takes a <code>uintptr</code> fd, instead of an <code>int</code>.
+The <a href="/pkg/os/#File.Fd"><code>Fd</code></a> method on files now
+also returns a <code>uintptr</code>.
+</p>
+
+<p>
+There are no longer error constants such as <code>EINVAL</code>
+in the <code>os</code> package, since the set of values varied with
+the underlying operating system. There are new portable functions like
+<a href="/pkg/os/#IsPermission"><code>IsPermission</code></a>
+to test common error properties, plus a few new error values
+with more Go-like names, such as
+<a href="/pkg/os/#ErrPermission"><code>ErrPermission</code></a>
+and
+<a href="/pkg/os/#ErrNotExist"><code>ErrNotExist</code></a>.
+</p>
+
+<p>
+The <code>Getenverror</code> function has been removed. To distinguish
+between a non-existent environment variable and an empty string,
+use <a href="/pkg/os/#Environ"><code>os.Environ</code></a> or
+<a href="/pkg/syscall/#Getenv"><code>syscall.Getenv</code></a>.
+</p>
+
+
+<p>
+The <a href="/pkg/os/#Process.Wait"><code>Process.Wait</code></a> method has
+dropped its option argument and the associated constants are gone
+from the package.
+Also, the function <code>Wait</code> is gone; only the method of
+the <code>Process</code> type persists.
+</p>
+
+<p>
+The <code>Waitmsg</code> type returned by
+<a href="/pkg/os/#Process.Wait"><code>Process.Wait</code></a>
+has been replaced with a more portable
+<a href="/pkg/os/#ProcessState"><code>ProcessState</code></a>
+type with accessor methods to recover information about the
+process.
+Because of changes to <code>Wait</code>, the <code>ProcessState</code>
+value always describes an exited process.
+Portability concerns simplified the interface in other ways, but the values returned by the
+<a href="/pkg/os/#ProcessState.Sys"><code>ProcessState.Sys</code></a> and
+<a href="/pkg/os/#ProcessState.SysUsage"><code>ProcessState.SysUsage</code></a>
+methods can be type-asserted to underlying system-specific data structures such as
+<a href="/pkg/syscall/#WaitStatus"><code>syscall.WaitStatus</code></a> and
+<a href="/pkg/syscall/#Rusage"><code>syscall.Rusage</code></a> on Unix.
+</p>
+
+<p>
+<em>Updating</em>:
+Running <code>go</code> <code>fix</code> will drop a zero argument to <code>Process.Wait</code>.
+All other changes will be caught by the compiler and must be updated by hand.
+</p>
+
+<h4 id="os_fileinfo">The os.FileInfo type</h4>
+
+<p>
+Go 1 redefines the <a href="/pkg/os/#FileInfo"><code>os.FileInfo</code></a> type,
+changing it from a struct to an interface:
+</p>
+
+<pre>
+    type FileInfo interface {
+        Name() string       // base name of the file
+        Size() int64        // length in bytes
+        Mode() FileMode     // file mode bits
+        ModTime() time.Time // modification time
+        IsDir() bool        // abbreviation for Mode().IsDir()
+        Sys() interface{}   // underlying data source (can return nil)
+    }
+</pre>
+
+<p>
+The file mode information has been moved into a subtype called
+<a href="/pkg/os/#FileMode"><code>os.FileMode</code></a>,
+a simple integer type with <code>IsDir</code>, <code>Perm</code>, and <code>String</code>
+methods.
+</p>
+
+<p>
+The system-specific details of file modes and properties such as (on Unix)
+i-number have been removed from <code>FileInfo</code> altogether.
+Instead, each operating system's <code>os</code> package provides an
+implementation of the <code>FileInfo</code> interface, which
+has a <code>Sys</code> method that returns the
+system-specific representation of file metadata.
+For instance, to discover the i-number of a file on a Unix system, unpack
+the <code>FileInfo</code> like this:
+</p>
+
+<pre>
+    fi, err := os.Stat("hello.go")
+    if err != nil {
+        log.Fatal(err)
+    }
+    // Check that it's a Unix file.
+    unixStat, ok := fi.Sys().(*syscall.Stat_t)
+    if !ok {
+        log.Fatal("hello.go: not a Unix file")
+    }
+    fmt.Printf("file i-number: %d\n", unixStat.Ino)
+</pre>
+
+<p>
+Assuming (which is unwise) that <code>"hello.go"</code> is a Unix file,
+the i-number expression could be contracted to
+</p>
+
+<pre>
+    fi.Sys().(*syscall.Stat_t).Ino
+</pre>
+
+<p>
+The vast majority of uses of <code>FileInfo</code> need only the methods
+of the standard interface.
+</p>
+
+<p>
+The <code>os</code> package no longer contains wrappers for the POSIX errors
+such as <code>ENOENT</code>.
+For the few programs that need to verify particular error conditions, there are
+now the boolean functions
+<a href="/pkg/os/#IsExist"><code>IsExist</code></a>,
+<a href="/pkg/os/#IsNotExist"><code>IsNotExist</code></a>
+and
+<a href="/pkg/os/#IsPermission"><code>IsPermission</code></a>.
+</p>
+
+{{code "/doc/progs/go1.go" `/os\.Open/` `/}/`}}
+
+<p>
+<em>Updating</em>:
+Running <code>go</code> <code>fix</code> will update code that uses the old equivalent of the current <code>os.FileInfo</code>
+and <code>os.FileMode</code> API.
+Code that needs system-specific file details will need to be updated by hand.
+Code that uses the old POSIX error values from the <code>os</code> package
+will fail to compile and will also need to be updated by hand.
+</p>
+
+<h3 id="os_signal">The os/signal package</h3>
+
+<p>
+The <code>os/signal</code> package in Go 1 replaces the
+<code>Incoming</code> function, which returned a channel
+that received all incoming signals,
+with the selective <code>Notify</code> function, which asks
+for delivery of specific signals on an existing channel.
+</p>
+
+<p>
+<em>Updating</em>:
+Code must be updated by hand.
+A literal translation of
+</p>
+<pre>
+c := signal.Incoming()
+</pre>
+<p>
+is
+</p>
+<pre>
+c := make(chan os.Signal, 1)
+signal.Notify(c) // ask for all signals
+</pre>
+<p>
+but most code should list the specific signals it wants to handle instead:
+</p>
+<pre>
+c := make(chan os.Signal, 1)
+signal.Notify(c, syscall.SIGHUP, syscall.SIGQUIT)
+</pre>
+
+<h3 id="path_filepath">The path/filepath package</h3>
+
+<p>
+In Go 1, the <a href="/pkg/path/filepath/#Walk"><code>Walk</code></a> function of the
+<code>path/filepath</code> package
+has been changed to take a function value of type
+<a href="/pkg/path/filepath/#WalkFunc"><code>WalkFunc</code></a>
+instead of a <code>Visitor</code> interface value.
+<code>WalkFunc</code> unifies the handling of both files and directories.
+</p>
+
+<pre>
+    type WalkFunc func(path string, info os.FileInfo, err error) error
+</pre>
+
+<p>
+The <code>WalkFunc</code> function will be called even for files or directories that could not be opened;
+in such cases the error argument will describe the failure.
+If a directory's contents are to be skipped,
+the function should return the value <a href="/pkg/path/filepath/#pkg-variables"><code>filepath.SkipDir</code></a>
+</p>
+
+{{code "/doc/progs/go1.go" `/STARTWALK/` `/ENDWALK/`}}
+
+<p>
+<em>Updating</em>:
+The change simplifies most code but has subtle consequences, so affected programs
+will need to be updated by hand.
+The compiler will catch code using the old interface.
+</p>
+
+<h3 id="regexp">The regexp package</h3>
+
+<p>
+The <a href="/pkg/regexp/"><code>regexp</code></a> package has been rewritten.
+It has the same interface but the specification of the regular expressions
+it supports has changed from the old "egrep" form to that of
+<a href="//code.google.com/p/re2/">RE2</a>.
+</p>
+
+<p>
+<em>Updating</em>:
+Code that uses the package should have its regular expressions checked by hand.
+</p>
+
+<h3 id="runtime">The runtime package</h3>
+
+<p>
+In Go 1, much of the API exported by package
+<code>runtime</code> has been removed in favor of
+functionality provided by other packages.
+Code using the <code>runtime.Type</code> interface
+or its specific concrete type implementations should
+now use package <a href="/pkg/reflect/"><code>reflect</code></a>.
+Code using <code>runtime.Semacquire</code> or <code>runtime.Semrelease</code>
+should use channels or the abstractions in package <a href="/pkg/sync/"><code>sync</code></a>.
+The <code>runtime.Alloc</code>, <code>runtime.Free</code>,
+and <code>runtime.Lookup</code> functions, an unsafe API created for
+debugging the memory allocator, have no replacement.
+</p>
+
+<p>
+Before, <code>runtime.MemStats</code> was a global variable holding
+statistics about memory allocation, and calls to <code>runtime.UpdateMemStats</code>
+ensured that it was up to date.
+In Go 1, <code>runtime.MemStats</code> is a struct type, and code should use
+<a href="/pkg/runtime/#ReadMemStats"><code>runtime.ReadMemStats</code></a>
+to obtain the current statistics.
+</p>
+
+<p>
+The package adds a new function,
+<a href="/pkg/runtime/#NumCPU"><code>runtime.NumCPU</code></a>, that returns the number of CPUs available
+for parallel execution, as reported by the operating system kernel.
+Its value can inform the setting of <code>GOMAXPROCS</code>.
+The <code>runtime.Cgocalls</code> and <code>runtime.Goroutines</code> functions
+have been renamed to <code>runtime.NumCgoCall</code> and <code>runtime.NumGoroutine</code>.
+</p>
+
+<p>
+<em>Updating</em>:
+Running <code>go</code> <code>fix</code> will update code for the function renamings.
+Other code will need to be updated by hand.
+</p>
+
+<h3 id="strconv">The strconv package</h3>
+
+<p>
+In Go 1, the
+<a href="/pkg/strconv/"><code>strconv</code></a>
+package has been significantly reworked to make it more Go-like and less C-like,
+although <code>Atoi</code> lives on (it's similar to
+<code>int(ParseInt(x, 10, 0))</code>, as does
+<code>Itoa(x)</code> (<code>FormatInt(int64(x), 10)</code>).
+There are also new variants of some of the functions that append to byte slices rather than
+return strings, to allow control over allocation.
+</p>
+
+<p>
+This table summarizes the renamings; see the
+<a href="/pkg/strconv/">package documentation</a>
+for full details.
+</p>
+
+<table class="codetable" frame="border" summary="strconv renames">
+<colgroup align="left" width="50%"></colgroup>
+<colgroup align="left" width="50%"></colgroup>
+<tr>
+<th align="left">Old call</th>
+<th align="left">New call</th>
+</tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>Atob(x)</td> <td>ParseBool(x)</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>Atof32(x)</td> <td>ParseFloat(x, 32)§</td></tr>
+<tr><td>Atof64(x)</td> <td>ParseFloat(x, 64)</td></tr>
+<tr><td>AtofN(x, n)</td> <td>ParseFloat(x, n)</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>Atoi(x)</td> <td>Atoi(x)</td></tr>
+<tr><td>Atoi(x)</td> <td>ParseInt(x, 10, 0)§</td></tr>
+<tr><td>Atoi64(x)</td> <td>ParseInt(x, 10, 64)</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>Atoui(x)</td> <td>ParseUint(x, 10, 0)§</td></tr>
+<tr><td>Atoui64(x)</td> <td>ParseUint(x, 10, 64)</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>Btoi64(x, b)</td> <td>ParseInt(x, b, 64)</td></tr>
+<tr><td>Btoui64(x, b)</td> <td>ParseUint(x, b, 64)</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>Btoa(x)</td> <td>FormatBool(x)</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>Ftoa32(x, f, p)</td> <td>FormatFloat(float64(x), f, p, 32)</td></tr>
+<tr><td>Ftoa64(x, f, p)</td> <td>FormatFloat(x, f, p, 64)</td></tr>
+<tr><td>FtoaN(x, f, p, n)</td> <td>FormatFloat(x, f, p, n)</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>Itoa(x)</td> <td>Itoa(x)</td></tr>
+<tr><td>Itoa(x)</td> <td>FormatInt(int64(x), 10)</td></tr>
+<tr><td>Itoa64(x)</td> <td>FormatInt(x, 10)</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>Itob(x, b)</td> <td>FormatInt(int64(x), b)</td></tr>
+<tr><td>Itob64(x, b)</td> <td>FormatInt(x, b)</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>Uitoa(x)</td> <td>FormatUint(uint64(x), 10)</td></tr>
+<tr><td>Uitoa64(x)</td> <td>FormatUint(x, 10)</td></tr>
+<tr>
+<td colspan="2"><hr></td>
+</tr>
+<tr><td>Uitob(x, b)</td> <td>FormatUint(uint64(x), b)</td></tr>
+<tr><td>Uitob64(x, b)</td> <td>FormatUint(x, b)</td></tr>
+</table>
+
+<p>
+<em>Updating</em>:
+Running <code>go</code> <code>fix</code> will update almost all code affected by the change.
+<br>
+§ <code>Atoi</code> persists but <code>Atoui</code> and <code>Atof32</code> do not, so
+they may require
+a cast that must be added by hand; the <code>go</code> <code>fix</code> tool will warn about it.
+</p>
+
+
+<h3 id="templates">The template packages</h3>
+
+<p>
+The <code>template</code> and <code>exp/template/html</code> packages have moved to
+<a href="/pkg/text/template/"><code>text/template</code></a> and
+<a href="/pkg/html/template/"><code>html/template</code></a>.
+More significant, the interface to these packages has been simplified.
+The template language is the same, but the concept of "template set" is gone
+and the functions and methods of the packages have changed accordingly,
+often by elimination.
+</p>
+
+<p>
+Instead of sets, a <code>Template</code> object
+may contain multiple named template definitions,
+in effect constructing
+name spaces for template invocation.
+A template can invoke any other template associated with it, but only those
+templates associated with it.
+The simplest way to associate templates is to parse them together, something
+made easier with the new structure of the packages.
+</p>
+
+<p>
+<em>Updating</em>:
+The imports will be updated by fix tool.
+Single-template uses will be otherwise be largely unaffected.
+Code that uses multiple templates in concert will need to be updated by hand.
+The <a href="/pkg/text/template/#pkg-examples">examples</a> in
+the documentation for <code>text/template</code> can provide guidance.
+</p>
+
+<h3 id="testing">The testing package</h3>
+
+<p>
+The testing package has a type, <code>B</code>, passed as an argument to benchmark functions.
+In Go 1, <code>B</code> has new methods, analogous to those of <code>T</code>, enabling
+logging and failure reporting.
+</p>
+
+{{code "/doc/progs/go1.go" `/func.*Benchmark/` `/^}/`}}
+
+<p>
+<em>Updating</em>:
+Existing code is unaffected, although benchmarks that use <code>println</code>
+or <code>panic</code> should be updated to use the new methods.
+</p>
+
+<h3 id="testing_script">The testing/script package</h3>
+
+<p>
+The testing/script package has been deleted. It was a dreg.
+</p>
+
+<p>
+<em>Updating</em>:
+No code is likely to be affected.
+</p>
+
+<h3 id="unsafe">The unsafe package</h3>
+
+<p>
+In Go 1, the functions
+<code>unsafe.Typeof</code>, <code>unsafe.Reflect</code>,
+<code>unsafe.Unreflect</code>, <code>unsafe.New</code>, and
+<code>unsafe.NewArray</code> have been removed;
+they duplicated safer functionality provided by
+package <a href="/pkg/reflect/"><code>reflect</code></a>.
+</p>
+
+<p>
+<em>Updating</em>:
+Code using these functions must be rewritten to use
+package <a href="/pkg/reflect/"><code>reflect</code></a>.
+The changes to <a href="//golang.org/change/2646dc956207">encoding/gob</a> and the <a href="//code.google.com/p/goprotobuf/source/detail?r=5340ad310031">protocol buffer library</a>
+may be helpful as examples.
+</p>
+
+<h3 id="url">The url package</h3>
+
+<p>
+In Go 1 several fields from the <a href="/pkg/net/url/#URL"><code>url.URL</code></a> type
+were removed or replaced.
+</p>
+
+<p>
+The <a href="/pkg/net/url/#URL.String"><code>String</code></a> method now
+predictably rebuilds an encoded URL string using all of <code>URL</code>'s
+fields as necessary. The resulting string will also no longer have
+passwords escaped.
+</p>
+
+<p>
+The <code>Raw</code> field has been removed. In most cases the <code>String</code>
+method may be used in its place.
+</p>
+
+<p>
+The old <code>RawUserinfo</code> field is replaced by the <code>User</code>
+field, of type <a href="/pkg/net/url/#Userinfo"><code>*net.Userinfo</code></a>.
+Values of this type may be created using the new <a href="/pkg/net/url/#User"><code>net.User</code></a>
+and <a href="/pkg/net/url/#UserPassword"><code>net.UserPassword</code></a>
+functions. The <code>EscapeUserinfo</code> and <code>UnescapeUserinfo</code>
+functions are also gone.
+</p>
+
+<p>
+The <code>RawAuthority</code> field has been removed. The same information is
+available in the <code>Host</code> and <code>User</code> fields.
+</p>
+
+<p>
+The <code>RawPath</code> field and the <code>EncodedPath</code> method have
+been removed. The path information in rooted URLs (with a slash following the
+schema) is now available only in decoded form in the <code>Path</code> field.
+Occasionally, the encoded data may be required to obtain information that
+was lost in the decoding process. These cases must be handled by accessing
+the data the URL was built from.
+</p>
+
+<p>
+URLs with non-rooted paths, such as <code>"mailto:dev@golang.org?subject=Hi"</code>,
+are also handled differently. The <code>OpaquePath</code> boolean field has been
+removed and a new <code>Opaque</code> string field introduced to hold the encoded
+path for such URLs. In Go 1, the cited URL parses as:
+</p>
+
+<pre>
+    URL{
+        Scheme: "mailto",
+        Opaque: "dev@golang.org",
+        RawQuery: "subject=Hi",
+    }
+</pre>
+
+<p>
+A new <a href="/pkg/net/url/#URL.RequestURI"><code>RequestURI</code></a> method was
+added to <code>URL</code>.
+</p>
+
+<p>
+The <code>ParseWithReference</code> function has been renamed to <code>ParseWithFragment</code>.
+</p>
+
+<p>
+<em>Updating</em>:
+Code that uses the old fields will fail to compile and must be updated by hand.
+The semantic changes make it difficult for the fix tool to update automatically.
+</p>
+
+<h2 id="cmd_go">The go command</h2>
+
+<p>
+Go 1 introduces the <a href="/cmd/go/">go command</a>, a tool for fetching,
+building, and installing Go packages and commands. The <code>go</code> command
+does away with makefiles, instead using Go source code to find dependencies and
+determine build conditions. Most existing Go programs will no longer require
+makefiles to be built.
+</p>
+
+<p>
+See <a href="/doc/code.html">How to Write Go Code</a> for a primer on the
+<code>go</code> command and the <a href="/cmd/go/">go command documentation</a>
+for the full details.
+</p>
+
+<p>
+<em>Updating</em>:
+Projects that depend on the Go project's old makefile-based build
+infrastructure (<code>Make.pkg</code>, <code>Make.cmd</code>, and so on) should
+switch to using the <code>go</code> command for building Go code and, if
+necessary, rewrite their makefiles to perform any auxiliary build tasks.
+</p>
+
+<h2 id="cmd_cgo">The cgo command</h2>
+
+<p>
+In Go 1, the <a href="/cmd/cgo">cgo command</a>
+uses a different <code>_cgo_export.h</code>
+file, which is generated for packages containing <code>//export</code> lines.
+The <code>_cgo_export.h</code> file now begins with the C preamble comment,
+so that exported function definitions can use types defined there.
+This has the effect of compiling the preamble multiple times, so a
+package using <code>//export</code> must not put function definitions
+or variable initializations in the C preamble.
+</p>
+
+<h2 id="releases">Packaged releases</h2>
+
+<p>
+One of the most significant changes associated with Go 1 is the availability
+of prepackaged, downloadable distributions.
+They are available for many combinations of architecture and operating system
+(including Windows) and the list will grow.
+Installation details are described on the
+<a href="/doc/install">Getting Started</a> page, while
+the distributions themselves are listed on the
+<a href="/dl/">downloads page</a>.
diff --git a/_content/doc/go1compat.html b/_content/doc/go1compat.html
new file mode 100644
index 0000000..a5624ef
--- /dev/null
+++ b/_content/doc/go1compat.html
@@ -0,0 +1,202 @@
+<!--{
+	"Title": "Go 1 and the Future of Go Programs",
+	"Path":  "/doc/go1compat"
+}-->
+
+<h2 id="introduction">Introduction</h2>
+<p>
+The release of Go version 1, Go 1 for short, is a major milestone
+in the development of the language. Go 1 is a stable platform for
+the growth of programs and projects written in Go.
+</p>
+
+<p>
+Go 1 defines two things: first, the specification of the language;
+and second, the specification of a set of core APIs, the "standard
+packages" of the Go library. The Go 1 release includes their
+implementation in the form of two compiler suites (gc and gccgo),
+and the core libraries themselves.
+</p>
+
+<p>
+It is intended that programs written to the Go 1 specification will
+continue to compile and run correctly, unchanged, over the lifetime
+of that specification. At some indefinite point, a Go 2 specification
+may arise, but until that time, Go programs that work today should
+continue to work even as future "point" releases of Go 1 arise (Go
+1.1, Go 1.2, etc.).
+</p>
+
+<p>
+Compatibility is at the source level. Binary compatibility for
+compiled packages is not guaranteed between releases. After a point
+release, Go source will need to be recompiled to link against the
+new release.
+</p>
+
+<p>
+The APIs may grow, acquiring new packages and features, but not in
+a way that breaks existing Go 1 code.
+</p>
+
+<h2 id="expectations">Expectations</h2>
+
+<p>
+Although we expect that the vast majority of programs will maintain
+this compatibility over time, it is impossible to guarantee that
+no future change will break any program. This document is an attempt
+to set expectations for the compatibility of Go 1 software in the
+future. There are a number of ways in which a program that compiles
+and runs today may fail to do so after a future point release. They
+are all unlikely but worth recording.
+</p>
+
+<ul>
+<li>
+Security. A security issue in the specification or implementation
+may come to light whose resolution requires breaking compatibility.
+We reserve the right to address such security issues.
+</li>
+
+<li>
+Unspecified behavior. The Go specification tries to be explicit
+about most properties of the language, but there are some aspects
+that are undefined. Programs that depend on such unspecified behavior
+may break in future releases.
+</li>
+
+<li>
+Specification errors. If it becomes necessary to address an
+inconsistency or incompleteness in the specification, resolving the
+issue could affect the meaning or legality of existing programs.
+We reserve the right to address such issues, including updating the
+implementations. Except for security issues, no incompatible changes
+to the specification would be made.
+</li>
+
+<li>
+Bugs. If a compiler or library has a bug that violates the
+specification, a program that depends on the buggy behavior may
+break if the bug is fixed. We reserve the right to fix such bugs.
+</li>
+
+<li>
+Struct literals. For the addition of features in later point
+releases, it may be necessary to add fields to exported structs in
+the API. Code that uses unkeyed struct literals (such as pkg.T{3,
+"x"}) to create values of these types would fail to compile after
+such a change. However, code that uses keyed literals (pkg.T{A:
+3, B: "x"}) will continue to compile after such a change. We will
+update such data structures in a way that allows keyed struct
+literals to remain compatible, although unkeyed literals may fail
+to compile. (There are also more intricate cases involving nested
+data structures or interfaces, but they have the same resolution.)
+We therefore recommend that composite literals whose type is defined
+in a separate package should use the keyed notation.
+</li>
+
+<li>
+Methods. As with struct fields, it may be necessary to add methods
+to types.
+Under some circumstances, such as when the type is embedded in
+a struct along with another type,
+the addition of the new method may break
+the struct by creating a conflict with an existing method of the other
+embedded type.
+We cannot protect against this rare case and do not guarantee compatibility
+should it arise.
+</li>
+
+<li>
+Dot imports. If a program imports a standard package
+using <code>import . "path"</code>, additional names defined in the
+imported package in future releases may conflict with other names
+defined in the program.  We do not recommend the use of <code>import .</code>
+outside of tests, and using it may cause a program to fail
+to compile in future releases.
+</li>
+
+<li>
+Use of package <code>unsafe</code>. Packages that import
+<a href="/pkg/unsafe/"><code>unsafe</code></a>
+may depend on internal properties of the Go implementation.
+We reserve the right to make changes to the implementation
+that may break such programs.
+</li>
+
+</ul>
+
+<p>
+Of course, for all of these possibilities, should they arise, we
+would endeavor whenever feasible to update the specification,
+compilers, or libraries without affecting existing code.
+</p>
+
+<p>
+These same considerations apply to successive point releases. For
+instance, code that runs under Go 1.2 should be compatible with Go
+1.2.1, Go 1.3, Go 1.4, etc., although not necessarily with Go 1.1
+since it may use features added only in Go 1.2
+</p>
+
+<p>
+Features added between releases, available in the source repository
+but not part of the numbered binary releases, are under active
+development. No promise of compatibility is made for software using
+such features until they have been released.
+</p>
+
+<p>
+Finally, although it is not a correctness issue, it is possible
+that the performance of a program may be affected by
+changes in the implementation of the compilers or libraries upon
+which it depends.
+No guarantee can be made about the performance of a
+given program between releases.
+</p>
+
+<p>
+Although these expectations apply to Go 1 itself, we hope similar
+considerations would be made for the development of externally
+developed software based on Go 1.
+</p>
+
+<h2 id="subrepos">Sub-repositories</h2>
+
+<p>
+Code in sub-repositories of the main go tree, such as
+<a href="//golang.org/x/net">golang.org/x/net</a>,
+may be developed under
+looser compatibility requirements. However, the sub-repositories
+will be tagged as appropriate to identify versions that are compatible
+with the Go 1 point releases.
+</p>
+
+<h2 id="operating_systems">Operating systems</h2>
+
+<p>
+It is impossible to guarantee long-term compatibility with operating
+system interfaces, which are changed by outside parties.
+The <a href="/pkg/syscall/"><code>syscall</code></a> package
+is therefore outside the purview of the guarantees made here.
+As of Go version 1.4, the <code>syscall</code> package is frozen.
+Any evolution of the system call interface must be supported elsewhere,
+such as in the
+<a href="//golang.org/x/sys">go.sys</a> subrepository.
+For details and background, see
+<a href="//golang.org/s/go1.4-syscall">this document</a>.
+</p>
+
+<h2 id="tools">Tools</h2>
+
+<p>
+Finally, the Go toolchain (compilers, linkers, build tools, and so
+on) is under active development and may change behavior. This
+means, for instance, that scripts that depend on the location and
+properties of the tools may be broken by a point release.
+</p>
+
+<p>
+These caveats aside, we believe that Go 1 will be a firm foundation
+for the development of Go and its ecosystem.
+</p>
diff --git a/_content/doc/go_faq.html b/_content/doc/go_faq.html
new file mode 100644
index 0000000..23a3080
--- /dev/null
+++ b/_content/doc/go_faq.html
@@ -0,0 +1,2475 @@
+<!--{
+	"Title": "Frequently Asked Questions (FAQ)",
+	"Path": "/doc/faq"
+}-->
+
+<h2 id="Origins">Origins</h2>
+
+<h3 id="What_is_the_purpose_of_the_project">
+What is the purpose of the project?</h3>
+
+<p>
+At the time of Go's inception, only a decade ago, the programming world was different from today.
+Production software was usually written in C++ or Java,
+GitHub did not exist, most computers were not yet multiprocessors,
+and other than Visual Studio and Eclipse there were few IDEs or other high-level tools available
+at all, let alone for free on the Internet.
+</p>
+
+<p>
+Meanwhile, we had become frustrated by the undue complexity required to use
+the languages we worked with to develop server software.
+Computers had become enormously quicker since languages such as
+C, C++ and Java were first developed but the act of programming had not
+itself advanced nearly as much.
+Also, it was clear that multiprocessors were becoming universal but
+most languages offered little help to program them efficiently
+and safely.
+</p>
+
+<p>
+We decided to take a step back and think about what major issues were
+going to dominate software engineering in the years ahead as technology
+developed, and how a new language might help address them.
+For instance, the rise of multicore CPUs argued that a language should
+provide first-class support for some sort of concurrency or parallelism.
+And to make resource management tractable in a large concurrent program,
+garbage collection, or at least some sort of safe automatic memory management was required.
+</p>
+
+<p>
+These considerations led to
+<a href="https://commandcenter.blogspot.com/2017/09/go-ten-years-and-climbing.html">a
+series of discussions</a> from which Go arose, first as a set of ideas and
+desiderata, then as a language.
+An overarching goal was that Go do more to help the working programmer
+by enabling tooling, automating mundane tasks such as code formatting,
+and removing obstacles to working on large code bases.
+</p>
+
+<p>
+A much more expansive description of the goals of Go and how
+they are met, or at least approached, is available in the article,
+<a href="//talks.golang.org/2012/splash.article">Go at Google:
+Language Design in the Service of Software Engineering</a>.
+</p>
+
+<h3 id="history">
+What is the history of the project?</h3>
+<p>
+Robert Griesemer, Rob Pike and Ken Thompson started sketching the
+goals for a new language on the white board on September 21, 2007.
+Within a few days the goals had settled into a plan to do something
+and a fair idea of what it would be.  Design continued part-time in
+parallel with unrelated work.  By January 2008, Ken had started work
+on a compiler with which to explore ideas; it generated C code as its
+output.  By mid-year the language had become a full-time project and
+had settled enough to attempt a production compiler.  In May 2008,
+Ian Taylor independently started on a GCC front end for Go using the
+draft specification.  Russ Cox joined in late 2008 and helped move the language
+and libraries from prototype to reality.
+</p>
+
+<p>
+Go became a public open source project on November 10, 2009.
+Countless people from the community have contributed ideas, discussions, and code.
+</p>
+
+<p>
+There are now millions of Go programmers—gophers—around the world,
+and there are more every day.
+Go's success has far exceeded our expectations.
+</p>
+
+<h3 id="gopher">
+What's the origin of the gopher mascot?</h3>
+
+<p>
+The mascot and logo were designed by
+<a href="https://reneefrench.blogspot.com">Renée French</a>, who also designed
+<a href="https://9p.io/plan9/glenda.html">Glenda</a>,
+the Plan 9 bunny.
+A <a href="https://blog.golang.org/gopher">blog post</a>
+about the gopher explains how it was
+derived from one she used for a <a href="https://wfmu.org/">WFMU</a>
+T-shirt design some years ago.
+The logo and mascot are covered by the
+<a href="https://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0</a>
+license.
+</p>
+
+<p>
+The gopher has a
+<a href="/doc/gopher/modelsheet.jpg">model sheet</a>
+illustrating his characteristics and how to represent them correctly.
+The model sheet was first shown in a
+<a href="https://www.youtube.com/watch?v=4rw_B4yY69k">talk</a>
+by Renée at Gophercon in 2016.
+He has unique features; he's the <em>Go gopher</em>, not just any old gopher.
+</p>
+
+<h3 id="go_or_golang">
+Is the language called Go or Golang?</h3>
+
+<p>
+The language is called Go.
+The "golang" moniker arose because the web site is
+<a href="https://golang.org">golang.org</a>, not
+go.org, which was not available to us.
+Many use the golang name, though, and it is handy as
+a label.
+For instance, the Twitter tag for the language is "#golang".
+The language's name is just plain Go, regardless.
+</p>
+
+<p>
+A side note: Although the
+<a href="https://blog.golang.org/go-brand">official logo</a>
+has two capital letters, the language name is written Go, not GO.
+</p>
+
+<h3 id="creating_a_new_language">
+Why did you create a new language?</h3>
+
+<p>
+Go was born out of frustration with existing languages and
+environments for the work we were doing at Google.
+Programming had become too
+difficult and the choice of languages was partly to blame.  One had to
+choose either efficient compilation, efficient execution, or ease of
+programming; all three were not available in the same mainstream
+language.  Programmers who could were choosing ease over
+safety and efficiency by moving to dynamically typed languages such as
+Python and JavaScript rather than C++ or, to a lesser extent, Java.
+</p>
+
+<p>
+We were not alone in our concerns.
+After many years with a pretty quiet landscape for programming languages,
+Go was among the first of several new languages—Rust,
+Elixir, Swift, and more—that have made programming language development
+an active, almost mainstream field again.
+</p>
+
+<p>
+Go addressed these issues by attempting to combine the ease of programming of an interpreted,
+dynamically typed
+language with the efficiency and safety of a statically typed, compiled language.
+It also aimed to be modern, with support for networked and multicore
+computing.  Finally, working with Go is intended to be <i>fast</i>: it should take
+at most a few seconds to build a large executable on a single computer.
+To meet these goals required addressing a number of
+linguistic issues: an expressive but lightweight type system;
+concurrency and garbage collection; rigid dependency specification;
+and so on.  These cannot be addressed well by libraries or tools; a new
+language was called for.
+</p>
+
+<p>
+The article <a href="//talks.golang.org/2012/splash.article">Go at Google</a>
+discusses the background and motivation behind the design of the Go language,
+as well as providing more detail about many of the answers presented in this FAQ.
+</p>
+
+
+<h3 id="ancestors">
+What are Go's ancestors?</h3>
+<p>
+Go is mostly in the C family (basic syntax),
+with significant input from the Pascal/Modula/Oberon
+family (declarations, packages),
+plus some ideas from languages
+inspired by Tony Hoare's CSP,
+such as Newsqueak and Limbo (concurrency).
+However, it is a new language across the board.
+In every respect the language was designed by thinking
+about what programmers do and how to make programming, at least the
+kind of programming we do, more effective, which means more fun.
+</p>
+
+<h3 id="principles">
+What are the guiding principles in the design?</h3>
+
+<p>
+When Go was designed, Java and C++ were the most commonly
+used languages for writing servers, at least at Google.
+We felt that these languages required
+too much bookkeeping and repetition.
+Some programmers reacted by moving towards more dynamic,
+fluid languages like Python, at the cost of efficiency and
+type safety.
+We felt it should be possible to have the efficiency,
+the safety, and the fluidity in a single language.
+</p>
+
+<p>
+Go attempts to reduce the amount of typing in both senses of the word.
+Throughout its design, we have tried to reduce clutter and
+complexity.  There are no forward declarations and no header files;
+everything is declared exactly once.  Initialization is expressive,
+automatic, and easy to use.  Syntax is clean and light on keywords.
+Stuttering (<code>foo.Foo* myFoo = new(foo.Foo)</code>) is reduced by
+simple type derivation using the <code>:=</code>
+declare-and-initialize construct.  And perhaps most radically, there
+is no type hierarchy: types just <i>are</i>, they don't have to
+announce their relationships.  These simplifications allow Go to be
+expressive yet comprehensible without sacrificing, well, sophistication.
+</p>
+<p>
+Another important principle is to keep the concepts orthogonal.
+Methods can be implemented for any type; structures represent data while
+interfaces represent abstraction; and so on.  Orthogonality makes it
+easier to understand what happens when things combine.
+</p>
+
+<h2 id="Usage">Usage</h2>
+
+<h3 id="internal_usage">
+Is Google using Go internally?</h3>
+
+<p>
+Yes. Go is used widely in production inside Google.
+One easy example is the server behind
+<a href="//golang.org">golang.org</a>.
+It's just the <a href="/cmd/godoc"><code>godoc</code></a>
+document server running in a production configuration on
+<a href="https://developers.google.com/appengine/">Google App Engine</a>.
+</p>
+
+<p>
+A more significant instance is Google's download server, <code>dl.google.com</code>,
+which delivers Chrome binaries and other large installables such as <code>apt-get</code>
+packages.
+</p>
+
+<p>
+Go is not the only language used at Google, far from it, but it is a key language
+for a number of areas including
+<a href="https://talks.golang.org/2013/go-sreops.slide">site reliability
+engineering (SRE)</a>
+and large-scale data processing.
+</p>
+
+<h3 id="external_usage">
+What other companies use Go?</h3>
+
+<p>
+Go usage is growing worldwide, especially but by no means exclusively
+in the cloud computing space.
+A couple of major cloud infrastructure projects written in Go are
+Docker and Kubernetes,
+but there are many more.
+</p>
+
+<p>
+It's not just cloud, though.
+The Go Wiki includes a
+<a href="https://github.com/golang/go/wiki/GoUsers">page</a>,
+updated regularly, that lists some of the many companies using Go.
+</p>
+
+<p>
+The Wiki also has a page with links to
+<a href="https://github.com/golang/go/wiki/SuccessStories">success stories</a>
+about companies and projects that are using the language.
+</p>
+
+<h3 id="Do_Go_programs_link_with_Cpp_programs">
+Do Go programs link with C/C++ programs?</h3>
+
+<p>
+It is possible to use C and Go together in the same address space,
+but it is not a natural fit and can require special interface software.
+Also, linking C with Go code gives up the memory
+safety and stack management properties that Go provides.
+Sometimes it's absolutely necessary to use C libraries to solve a problem,
+but doing so always introduces an element of risk not present with
+pure Go code, so do so with care.
+</p>
+
+<p>
+If you do need to use C with Go, how to proceed depends on the Go
+compiler implementation.
+There are three Go compiler implementations supported by the
+Go team.
+These are <code>gc</code>, the default compiler,
+<code>gccgo</code>, which uses the GCC back end,
+and a somewhat less mature <code>gollvm</code>, which uses the LLVM infrastructure.
+</p>
+
+<p>
+<code>Gc</code> uses a different calling convention and linker from C and
+therefore cannot be called directly from C programs, or vice versa.
+The <a href="/cmd/cgo/"><code>cgo</code></a> program provides the mechanism for a
+&ldquo;foreign function interface&rdquo; to allow safe calling of
+C libraries from Go code.
+SWIG extends this capability to C++ libraries.
+</p>
+
+<p>
+You can also use <code>cgo</code> and SWIG with <code>Gccgo</code> and <code>gollvm</code>.
+Since they use a traditional API, it's also possible, with great care,
+to link code from these compilers directly with GCC/LLVM-compiled C or C++ programs.
+However, doing so safely requires an understanding of the calling conventions for
+all languages concerned, as well as concern for stack limits when calling C or C++
+from Go.
+</p>
+
+<h3 id="ide">
+What IDEs does Go support?</h3>
+
+<p>
+The Go project does not include a custom IDE, but the language and
+libraries have been designed to make it easy to analyze source code.
+As a consequence, most well-known editors and IDEs support Go well,
+either directly or through a plugin.
+</p>
+
+<p>
+The list of well-known IDEs and editors that have good Go support
+available includes Emacs, Vim, VSCode, Atom, Eclipse, Sublime, IntelliJ
+(through a custom variant called Goland), and many more.
+Chances are your favorite environment is a productive one for
+programming in Go.
+</p>
+
+<h3 id="protocol_buffers">
+Does Go support Google's protocol buffers?</h3>
+
+<p>
+A separate open source project provides the necessary compiler plugin and library.
+It is available at
+<a href="//github.com/golang/protobuf">github.com/golang/protobuf/</a>.
+</p>
+
+
+<h3 id="Can_I_translate_the_Go_home_page">
+Can I translate the Go home page into another language?</h3>
+
+<p>
+Absolutely. We encourage developers to make Go Language sites in their own languages.
+However, if you choose to add the Google logo or branding to your site
+(it does not appear on <a href="//golang.org/">golang.org</a>),
+you will need to abide by the guidelines at
+<a href="//www.google.com/permissions/guidelines.html">www.google.com/permissions/guidelines.html</a>
+</p>
+
+<h2 id="Design">Design</h2>
+
+<h3 id="runtime">
+Does Go have a runtime?</h3>
+
+<p>
+Go does have an extensive library, called the <em>runtime</em>,
+that is part of every Go program.
+The runtime library implements garbage collection, concurrency,
+stack management, and other critical features of the Go language.
+Although it is more central to the language, Go's runtime is analogous
+to <code>libc</code>, the C library.
+</p>
+
+<p>
+It is important to understand, however, that Go's runtime does not
+include a virtual machine, such as is provided by the Java runtime.
+Go programs are compiled ahead of time to native machine code
+(or JavaScript or WebAssembly, for some variant implementations).
+Thus, although the term is often used to describe the virtual
+environment in which a program runs, in Go the word &ldquo;runtime&rdquo;
+is just the name given to the library providing critical language services.
+</p>
+
+<h3 id="unicode_identifiers">
+What's up with Unicode identifiers?</h3>
+
+<p>
+When designing Go, we wanted to make sure that it was not
+overly ASCII-centric,
+which meant extending the space of identifiers from the
+confines of 7-bit ASCII.
+Go's rule&mdash;identifier characters must be
+letters or digits as defined by Unicode&mdash;is simple to understand
+and to implement but has restrictions.
+Combining characters are
+excluded by design, for instance,
+and that excludes some languages such as Devanagari.
+</p>
+
+<p>
+This rule has one other unfortunate consequence.
+Since an exported identifier must begin with an
+upper-case letter, identifiers created from characters
+in some languages can, by definition, not be exported.
+For now the
+only solution is to use something like <code>X日本語</code>, which
+is clearly unsatisfactory.
+</p>
+
+<p>
+Since the earliest version of the language, there has been considerable
+thought into how best to expand the identifier space to accommodate
+programmers using other native languages.
+Exactly what to do remains an active topic of discussion, and a future
+version of the language may be more liberal in its definition
+of an identifier.
+For instance, it might adopt some of the ideas from the Unicode
+organization's <a href="http://unicode.org/reports/tr31/">recommendations</a>
+for identifiers.
+Whatever happens, it must be done compatibly while preserving
+(or perhaps expanding) the way letter case determines visibility of
+identifiers, which remains one of our favorite features of Go.
+</p>
+
+<p>
+For the time being, we have a simple rule that can be expanded later
+without breaking programs, one that avoids bugs that would surely arise
+from a rule that admits ambiguous identifiers.
+</p>
+
+<h3 id="Why_doesnt_Go_have_feature_X">Why does Go not have feature X?</h3>
+
+<p>
+Every language contains novel features and omits someone's favorite
+feature. Go was designed with an eye on felicity of programming, speed of
+compilation, orthogonality of concepts, and the need to support features
+such as concurrency and garbage collection. Your favorite feature may be
+missing because it doesn't fit, because it affects compilation speed or
+clarity of design, or because it would make the fundamental system model
+too difficult.
+</p>
+
+<p>
+If it bothers you that Go is missing feature <var>X</var>,
+please forgive us and investigate the features that Go does have. You might find that
+they compensate in interesting ways for the lack of <var>X</var>.
+</p>
+
+<h3 id="generics">
+Why does Go not have generic types?</h3>
+<p>
+Generics may well be added at some point.  We don't feel an urgency for
+them, although we understand some programmers do.
+</p>
+
+<p>
+Go was intended as a language for writing server programs that would be
+easy to maintain over time.
+(See <a href="https://talks.golang.org/2012/splash.article">this
+article</a> for more background.)
+The design concentrated on things like scalability, readability, and
+concurrency.
+Polymorphic programming did not seem essential to the language's
+goals at the time, and so was left out for simplicity.
+</p>
+
+<p>
+The language is more mature now, and there is scope to consider
+some form of generic programming.
+However, there remain some caveats.
+</p>
+
+<p>
+Generics are convenient but they come at a cost in
+complexity in the type system and run-time.  We haven't yet found a
+design that gives value proportionate to the complexity, although we
+continue to think about it.  Meanwhile, Go's built-in maps and slices,
+plus the ability to use the empty interface to construct containers
+(with explicit unboxing) mean in many cases it is possible to write
+code that does what generics would enable, if less smoothly.
+</p>
+
+<p>
+The topic remains open.
+For a look at several previous unsuccessful attempts to
+design a good generics solution for Go, see
+<a href="https://golang.org/issue/15292">this proposal</a>.
+</p>
+
+<h3 id="exceptions">
+Why does Go not have exceptions?</h3>
+<p>
+We believe that coupling exceptions to a control
+structure, as in the <code>try-catch-finally</code> idiom, results in
+convoluted code.  It also tends to encourage programmers to label
+too many ordinary errors, such as failing to open a file, as
+exceptional.
+</p>
+
+<p>
+Go takes a different approach.  For plain error handling, Go's multi-value
+returns make it easy to report an error without overloading the return value.
+<a href="/doc/articles/error_handling.html">A canonical error type, coupled
+with Go's other features</a>, makes error handling pleasant but quite different
+from that in other languages.
+</p>
+
+<p>
+Go also has a couple
+of built-in functions to signal and recover from truly exceptional
+conditions.  The recovery mechanism is executed only as part of a
+function's state being torn down after an error, which is sufficient
+to handle catastrophe but requires no extra control structures and,
+when used well, can result in clean error-handling code.
+</p>
+
+<p>
+See the <a href="/doc/articles/defer_panic_recover.html">Defer, Panic, and Recover</a> article for details.
+Also, the <a href="https://blog.golang.org/errors-are-values">Errors are values</a> blog post
+describes one approach to handling errors cleanly in Go by demonstrating that,
+since errors are just values, the full power of Go can be deployed in error handling.
+</p>
+
+<h3 id="assertions">
+Why does Go not have assertions?</h3>
+
+<p>
+Go doesn't provide assertions. They are undeniably convenient, but our
+experience has been that programmers use them as a crutch to avoid thinking
+about proper error handling and reporting. Proper error handling means that
+servers continue to operate instead of crashing after a non-fatal error.
+Proper error reporting means that errors are direct and to the point,
+saving the programmer from interpreting a large crash trace. Precise
+errors are particularly important when the programmer seeing the errors is
+not familiar with the code.
+</p>
+
+<p>
+We understand that this is a point of contention. There are many things in
+the Go language and libraries that differ from modern practices, simply
+because we feel it's sometimes worth trying a different approach.
+</p>
+
+<h3 id="csp">
+Why build concurrency on the ideas of CSP?</h3>
+<p>
+Concurrency and multi-threaded programming have over time
+developed a reputation for difficulty.  We believe this is due partly to complex
+designs such as
+<a href="https://en.wikipedia.org/wiki/POSIX_Threads">pthreads</a>
+and partly to overemphasis on low-level details
+such as mutexes, condition variables, and memory barriers.
+Higher-level interfaces enable much simpler code, even if there are still
+mutexes and such under the covers.
+</p>
+
+<p>
+One of the most successful models for providing high-level linguistic support
+for concurrency comes from Hoare's Communicating Sequential Processes, or CSP.
+Occam and Erlang are two well known languages that stem from CSP.
+Go's concurrency primitives derive from a different part of the family tree
+whose main contribution is the powerful notion of channels as first class objects.
+Experience with several earlier languages has shown that the CSP model
+fits well into a procedural language framework.
+</p>
+
+<h3 id="goroutines">
+Why goroutines instead of threads?</h3>
+<p>
+Goroutines are part of making concurrency easy to use.  The idea, which has
+been around for a while, is to multiplex independently executing
+functions&mdash;coroutines&mdash;onto a set of threads.
+When a coroutine blocks, such as by calling a blocking system call,
+the run-time automatically moves other coroutines on the same operating
+system thread to a different, runnable thread so they won't be blocked.
+The programmer sees none of this, which is the point.
+The result, which we call goroutines, can be very cheap: they have little
+overhead beyond the memory for the stack, which is just a few kilobytes.
+</p>
+
+<p>
+To make the stacks small, Go's run-time uses resizable, bounded stacks.  A newly
+minted goroutine is given a few kilobytes, which is almost always enough.
+When it isn't, the run-time grows (and shrinks) the memory for storing
+the stack automatically, allowing many goroutines to live in a modest
+amount of memory.
+The CPU overhead averages about three cheap instructions per function call.
+It is practical to create hundreds of thousands of goroutines in the same
+address space.
+If goroutines were just threads, system resources would
+run out at a much smaller number.
+</p>
+
+<h3 id="atomic_maps">
+Why are map operations not defined to be atomic?</h3>
+
+<p>
+After long discussion it was decided that the typical use of maps did not require
+safe access from multiple goroutines, and in those cases where it did, the map was
+probably part of some larger data structure or computation that was already
+synchronized.  Therefore requiring that all map operations grab a mutex would slow
+down most programs and add safety to few.  This was not an easy decision,
+however, since it means uncontrolled map access can crash the program.
+</p>
+
+<p>
+The language does not preclude atomic map updates.  When required, such
+as when hosting an untrusted program, the implementation could interlock
+map access.
+</p>
+
+<p>
+Map access is unsafe only when updates are occurring.
+As long as all goroutines are only reading—looking up elements in the map,
+including iterating through it using a
+<code>for</code> <code>range</code> loop—and not changing the map
+by assigning to elements or doing deletions,
+it is safe for them to access the map concurrently without synchronization.
+</p>
+
+<p>
+As an aid to correct map use, some implementations of the language
+contain a special check that automatically reports at run time when a map is modified
+unsafely by concurrent execution.
+</p>
+
+<h3 id="language_changes">
+Will you accept my language change?</h3>
+
+<p>
+People often suggest improvements to the language—the
+<a href="//groups.google.com/group/golang-nuts">mailing list</a>
+contains a rich history of such discussions—but very few of these changes have
+been accepted.
+</p>
+
+<p>
+Although Go is an open source project, the language and libraries are protected
+by a <a href="/doc/go1compat.html">compatibility promise</a> that prevents
+changes that break existing programs, at least at the source code level
+(programs may need to be recompiled occasionally to stay current).
+If your proposal violates the Go 1 specification we cannot even entertain the
+idea, regardless of its merit.
+A future major release of Go may be incompatible with Go 1, but discussions
+on that topic have only just begun and one thing is certain:
+there will be very few such incompatibilities introduced in the process.
+Moreover, the compatibility promise encourages us to provide an automatic path
+forward for old programs to adapt should that situation arise.
+</p>
+
+<p>
+Even if your proposal is compatible with the Go 1 spec, it might
+not be in the spirit of Go's design goals.
+The article <i><a href="//talks.golang.org/2012/splash.article">Go
+at Google: Language Design in the Service of Software Engineering</a></i>
+explains Go's origins and the motivation behind its design.
+</p>
+
+<h2 id="types">Types</h2>
+
+<h3 id="Is_Go_an_object-oriented_language">
+Is Go an object-oriented language?</h3>
+
+<p>
+Yes and no. Although Go has types and methods and allows an
+object-oriented style of programming, there is no type hierarchy.
+The concept of &ldquo;interface&rdquo; in Go provides a different approach that
+we believe is easy to use and in some ways more general. There are
+also ways to embed types in other types to provide something
+analogous&mdash;but not identical&mdash;to subclassing.
+Moreover, methods in Go are more general than in C++ or Java:
+they can be defined for any sort of data, even built-in types such
+as plain, &ldquo;unboxed&rdquo; integers.
+They are not restricted to structs (classes).
+</p>
+
+<p>
+Also, the lack of a type hierarchy makes &ldquo;objects&rdquo; in Go feel much more
+lightweight than in languages such as C++ or Java.
+</p>
+
+<h3 id="How_do_I_get_dynamic_dispatch_of_methods">
+How do I get dynamic dispatch of methods?</h3>
+
+<p>
+The only way to have dynamically dispatched methods is through an
+interface. Methods on a struct or any other concrete type are always resolved statically.
+</p>
+
+<h3 id="inheritance">
+Why is there no type inheritance?</h3>
+<p>
+Object-oriented programming, at least in the best-known languages,
+involves too much discussion of the relationships between types,
+relationships that often could be derived automatically.  Go takes a
+different approach.
+</p>
+
+<p>
+Rather than requiring the programmer to declare ahead of time that two
+types are related, in Go a type automatically satisfies any interface
+that specifies a subset of its methods.  Besides reducing the
+bookkeeping, this approach has real advantages.  Types can satisfy
+many interfaces at once, without the complexities of traditional
+multiple inheritance.
+Interfaces can be very lightweight&mdash;an interface with
+one or even zero methods can express a useful concept.
+Interfaces can be added after the fact if a new idea comes along
+or for testing&mdash;without annotating the original types.
+Because there are no explicit relationships between types
+and interfaces, there is no type hierarchy to manage or discuss.
+</p>
+
+<p>
+It's possible to use these ideas to construct something analogous to
+type-safe Unix pipes.  For instance, see how <code>fmt.Fprintf</code>
+enables formatted printing to any output, not just a file, or how the
+<code>bufio</code> package can be completely separate from file I/O,
+or how the <code>image</code> packages generate compressed
+image files.  All these ideas stem from a single interface
+(<code>io.Writer</code>) representing a single method
+(<code>Write</code>).  And that's only scratching the surface.
+Go's interfaces have a profound influence on how programs are structured.
+</p>
+
+<p>
+It takes some getting used to but this implicit style of type
+dependency is one of the most productive things about Go.
+</p>
+
+<h3 id="methods_on_basics">
+Why is <code>len</code> a function and not a method?</h3>
+<p>
+We debated this issue but decided
+implementing <code>len</code> and friends as functions was fine in practice and
+didn't complicate questions about the interface (in the Go type sense)
+of basic types.
+</p>
+
+<h3 id="overloading">
+Why does Go not support overloading of methods and operators?</h3>
+<p>
+Method dispatch is simplified if it doesn't need to do type matching as well.
+Experience with other languages told us that having a variety of
+methods with the same name but different signatures was occasionally useful
+but that it could also be confusing and fragile in practice.  Matching only by name
+and requiring consistency in the types was a major simplifying decision
+in Go's type system.
+</p>
+
+<p>
+Regarding operator overloading, it seems more a convenience than an absolute
+requirement.  Again, things are simpler without it.
+</p>
+
+<h3 id="implements_interface">
+Why doesn't Go have "implements" declarations?</h3>
+
+<p>
+A Go type satisfies an interface by implementing the methods of that interface,
+nothing more.  This property allows interfaces to be defined and used without
+needing to modify existing code.  It enables a kind of
+<a href="https://en.wikipedia.org/wiki/Structural_type_system">structural typing</a> that
+promotes separation of concerns and improves code re-use, and makes it easier
+to build on patterns that emerge as the code develops.
+The semantics of interfaces is one of the main reasons for Go's nimble,
+lightweight feel.
+</p>
+
+<p>
+See the <a href="#inheritance">question on type inheritance</a> for more detail.
+</p>
+
+<h3 id="guarantee_satisfies_interface">
+How can I guarantee my type satisfies an interface?</h3>
+
+<p>
+You can ask the compiler to check that the type <code>T</code> implements the
+interface <code>I</code> by attempting an assignment using the zero value for
+<code>T</code> or pointer to <code>T</code>, as appropriate:
+</p>
+
+<pre>
+type T struct{}
+var _ I = T{}       // Verify that T implements I.
+var _ I = (*T)(nil) // Verify that *T implements I.
+</pre>
+
+<p>
+If <code>T</code> (or <code>*T</code>, accordingly) doesn't implement
+<code>I</code>, the mistake will be caught at compile time.
+</p>
+
+<p>
+If you wish the users of an interface to explicitly declare that they implement
+it, you can add a method with a descriptive name to the interface's method set.
+For example:
+</p>
+
+<pre>
+type Fooer interface {
+    Foo()
+    ImplementsFooer()
+}
+</pre>
+
+<p>
+A type must then implement the <code>ImplementsFooer</code> method to be a
+<code>Fooer</code>, clearly documenting the fact and announcing it in
+<a href="/cmd/go/#hdr-Show_documentation_for_package_or_symbol">go doc</a>'s output.
+</p>
+
+<pre>
+type Bar struct{}
+func (b Bar) ImplementsFooer() {}
+func (b Bar) Foo() {}
+</pre>
+
+<p>
+Most code doesn't make use of such constraints, since they limit the utility of
+the interface idea. Sometimes, though, they're necessary to resolve ambiguities
+among similar interfaces.
+</p>
+
+<h3 id="t_and_equal_interface">
+Why doesn't type T satisfy the Equal interface?</h3>
+
+<p>
+Consider this simple interface to represent an object that can compare
+itself with another value:
+</p>
+
+<pre>
+type Equaler interface {
+    Equal(Equaler) bool
+}
+</pre>
+
+<p>
+and this type, <code>T</code>:
+</p>
+
+<pre>
+type T int
+func (t T) Equal(u T) bool { return t == u } // does not satisfy Equaler
+</pre>
+
+<p>
+Unlike the analogous situation in some polymorphic type systems,
+<code>T</code> does not implement <code>Equaler</code>.
+The argument type of <code>T.Equal</code> is <code>T</code>,
+not literally the required type <code>Equaler</code>.
+</p>
+
+<p>
+In Go, the type system does not promote the argument of
+<code>Equal</code>; that is the programmer's responsibility, as
+illustrated by the type <code>T2</code>, which does implement
+<code>Equaler</code>:
+</p>
+
+<pre>
+type T2 int
+func (t T2) Equal(u Equaler) bool { return t == u.(T2) }  // satisfies Equaler
+</pre>
+
+<p>
+Even this isn't like other type systems, though, because in Go <em>any</em>
+type that satisfies <code>Equaler</code> could be passed as the
+argument to <code>T2.Equal</code>, and at run time we must
+check that the argument is of type <code>T2</code>.
+Some languages arrange to make that guarantee at compile time.
+</p>
+
+<p>
+A related example goes the other way:
+</p>
+
+<pre>
+type Opener interface {
+   Open() Reader
+}
+
+func (t T3) Open() *os.File
+</pre>
+
+<p>
+In Go, <code>T3</code> does not satisfy <code>Opener</code>,
+although it might in another language.
+</p>
+
+<p>
+While it is true that Go's type system does less for the programmer
+in such cases, the lack of subtyping makes the rules about
+interface satisfaction very easy to state: are the function's names
+and signatures exactly those of the interface?
+Go's rule is also easy to implement efficiently.
+We feel these benefits offset the lack of
+automatic type promotion. Should Go one day adopt some form of polymorphic
+typing, we expect there would be a way to express the idea of these
+examples and also have them be statically checked.
+</p>
+
+<h3 id="convert_slice_of_interface">
+Can I convert a []T to an []interface{}?</h3>
+
+<p>
+Not directly.
+It is disallowed by the language specification because the two types
+do not have the same representation in memory.
+It is necessary to copy the elements individually to the destination
+slice. This example converts a slice of <code>int</code> to a slice of
+<code>interface{}</code>:
+</p>
+
+<pre>
+t := []int{1, 2, 3, 4}
+s := make([]interface{}, len(t))
+for i, v := range t {
+    s[i] = v
+}
+</pre>
+
+<h3 id="convert_slice_with_same_underlying_type">
+Can I convert []T1 to []T2 if T1 and T2 have the same underlying type?</h3>
+
+This last line of this code sample does not compile.
+
+<pre>
+type T1 int
+type T2 int
+var t1 T1
+var x = T2(t1) // OK
+var st1 []T1
+var sx = ([]T2)(st1) // NOT OK
+</pre>
+
+<p>
+In Go, types are closely tied to methods, in that every named type has
+a (possibly empty) method set.
+The general rule is that you can change the name of the type being
+converted (and thus possibly change its method set) but you can't
+change the name (and method set) of elements of a composite type.
+Go requires you to be explicit about type conversions.
+</p>
+
+<h3 id="nil_error">
+Why is my nil error value not equal to nil?
+</h3>
+
+<p>
+Under the covers, interfaces are implemented as two elements, a type <code>T</code>
+and a value <code>V</code>.
+<code>V</code> is a concrete value such as an <code>int</code>,
+<code>struct</code> or pointer, never an interface itself, and has
+type <code>T</code>.
+For instance, if we store the <code>int</code> value 3 in an interface,
+the resulting interface value has, schematically,
+(<code>T=int</code>, <code>V=3</code>).
+The value <code>V</code> is also known as the interface's
+<em>dynamic</em> value,
+since a given interface variable might hold different values <code>V</code>
+(and corresponding types <code>T</code>)
+during the execution of the program.
+</p>
+
+<p>
+An interface value is <code>nil</code> only if the <code>V</code> and <code>T</code>
+are both unset, (<code>T=nil</code>, <code>V</code> is not set),
+In particular, a <code>nil</code> interface will always hold a <code>nil</code> type.
+If we store a <code>nil</code> pointer of type <code>*int</code> inside
+an interface value, the inner type will be <code>*int</code> regardless of the value of the pointer:
+(<code>T=*int</code>, <code>V=nil</code>).
+Such an interface value will therefore be non-<code>nil</code>
+<em>even when the pointer value <code>V</code> inside is</em> <code>nil</code>.
+</p>
+
+<p>
+This situation can be confusing, and arises when a <code>nil</code> value is
+stored inside an interface value such as an <code>error</code> return:
+</p>
+
+<pre>
+func returnsError() error {
+	var p *MyError = nil
+	if bad() {
+		p = ErrBad
+	}
+	return p // Will always return a non-nil error.
+}
+</pre>
+
+<p>
+If all goes well, the function returns a <code>nil</code> <code>p</code>,
+so the return value is an <code>error</code> interface
+value holding (<code>T=*MyError</code>, <code>V=nil</code>).
+This means that if the caller compares the returned error to <code>nil</code>,
+it will always look as if there was an error even if nothing bad happened.
+To return a proper <code>nil</code> <code>error</code> to the caller,
+the function must return an explicit <code>nil</code>:
+</p>
+
+
+<pre>
+func returnsError() error {
+	if bad() {
+		return ErrBad
+	}
+	return nil
+}
+</pre>
+
+<p>
+It's a good idea for functions
+that return errors always to use the <code>error</code> type in
+their signature (as we did above) rather than a concrete type such
+as <code>*MyError</code>, to help guarantee the error is
+created correctly. As an example,
+<a href="/pkg/os/#Open"><code>os.Open</code></a>
+returns an <code>error</code> even though, if not <code>nil</code>,
+it's always of concrete type
+<a href="/pkg/os/#PathError"><code>*os.PathError</code></a>.
+</p>
+
+<p>
+Similar situations to those described here can arise whenever interfaces are used.
+Just keep in mind that if any concrete value
+has been stored in the interface, the interface will not be <code>nil</code>.
+For more information, see
+<a href="/doc/articles/laws_of_reflection.html">The Laws of Reflection</a>.
+</p>
+
+
+<h3 id="unions">
+Why are there no untagged unions, as in C?</h3>
+
+<p>
+Untagged unions would violate Go's memory safety
+guarantees.
+</p>
+
+<h3 id="variant_types">
+Why does Go not have variant types?</h3>
+
+<p>
+Variant types, also known as algebraic types, provide a way to specify
+that a value might take one of a set of other types, but only those
+types. A common example in systems programming would specify that an
+error is, say, a network error, a security error or an application
+error and allow the caller to discriminate the source of the problem
+by examining the type of the error. Another example is a syntax tree
+in which each node can be a different type: declaration, statement,
+assignment and so on.
+</p>
+
+<p>
+We considered adding variant types to Go, but after discussion
+decided to leave them out because they overlap in confusing ways
+with interfaces. What would happen if the elements of a variant type
+were themselves interfaces?
+</p>
+
+<p>
+Also, some of what variant types address is already covered by the
+language. The error example is easy to express using an interface
+value to hold the error and a type switch to discriminate cases.  The
+syntax tree example is also doable, although not as elegantly.
+</p>
+
+<h3 id="covariant_types">
+Why does Go not have covariant result types?</h3>
+
+<p>
+Covariant result types would mean that an interface like
+</p>
+
+<pre>
+type Copyable interface {
+	Copy() interface{}
+}
+</pre>
+
+<p>
+would be satisfied by the method
+</p>
+
+<pre>
+func (v Value) Copy() Value
+</pre>
+
+<p>because <code>Value</code> implements the empty interface.
+In Go method types must match exactly, so <code>Value</code> does not
+implement <code>Copyable</code>.
+Go separates the notion of what a
+type does&mdash;its methods&mdash;from the type's implementation.
+If two methods return different types, they are not doing the same thing.
+Programmers who want covariant result types are often trying to
+express a type hierarchy through interfaces.
+In Go it's more natural to have a clean separation between interface
+and implementation.
+</p>
+
+<h2 id="values">Values</h2>
+
+<h3 id="conversions">
+Why does Go not provide implicit numeric conversions?</h3>
+
+<p>
+The convenience of automatic conversion between numeric types in C is
+outweighed by the confusion it causes.  When is an expression unsigned?
+How big is the value?  Does it overflow?  Is the result portable, independent
+of the machine on which it executes?
+It also complicates the compiler; &ldquo;the usual arithmetic conversions&rdquo;
+are not easy to implement and inconsistent across architectures.
+For reasons of portability, we decided to make things clear and straightforward
+at the cost of some explicit conversions in the code.
+The definition of constants in Go&mdash;arbitrary precision values free
+of signedness and size annotations&mdash;ameliorates matters considerably,
+though.
+</p>
+
+<p>
+A related detail is that, unlike in C, <code>int</code> and <code>int64</code>
+are distinct types even if <code>int</code> is a 64-bit type.  The <code>int</code>
+type is generic; if you care about how many bits an integer holds, Go
+encourages you to be explicit.
+</p>
+
+<h3 id="constants">
+How do constants work in Go?</h3>
+
+<p>
+Although Go is strict about conversion between variables of different
+numeric types, constants in the language are much more flexible.
+Literal constants such as <code>23</code>, <code>3.14159</code>
+and <a href="/pkg/math/#pkg-constants"><code>math.Pi</code></a>
+occupy a sort of ideal number space, with arbitrary precision and
+no overflow or underflow.
+For instance, the value of <code>math.Pi</code> is specified to 63 places
+in the source code, and constant expressions involving the value keep
+precision beyond what a <code>float64</code> could hold.
+Only when the constant or constant expression is assigned to a
+variable&mdash;a memory location in the program&mdash;does
+it become a "computer" number with
+the usual floating-point properties and precision.
+</p>
+
+<p>
+Also,
+because they are just numbers, not typed values, constants in Go can be
+used more freely than variables, thereby softening some of the awkwardness
+around the strict conversion rules.
+One can write expressions such as
+</p>
+
+<pre>
+sqrt2 := math.Sqrt(2)
+</pre>
+
+<p>
+without complaint from the compiler because the ideal number <code>2</code>
+can be converted safely and accurately
+to a <code>float64</code> for the call to <code>math.Sqrt</code>.
+</p>
+
+<p>
+A blog post titled <a href="https://blog.golang.org/constants">Constants</a>
+explores this topic in more detail.
+</p>
+
+<h3 id="builtin_maps">
+Why are maps built in?</h3>
+<p>
+The same reason strings are: they are such a powerful and important data
+structure that providing one excellent implementation with syntactic support
+makes programming more pleasant.  We believe that Go's implementation of maps
+is strong enough that it will serve for the vast majority of uses.
+If a specific application can benefit from a custom implementation, it's possible
+to write one but it will not be as convenient syntactically; this seems a reasonable tradeoff.
+</p>
+
+<h3 id="map_keys">
+Why don't maps allow slices as keys?</h3>
+<p>
+Map lookup requires an equality operator, which slices do not implement.
+They don't implement equality because equality is not well defined on such types;
+there are multiple considerations involving shallow vs. deep comparison, pointer vs.
+value comparison, how to deal with recursive types, and so on.
+We may revisit this issue&mdash;and implementing equality for slices
+will not invalidate any existing programs&mdash;but without a clear idea of what
+equality of slices should mean, it was simpler to leave it out for now.
+</p>
+
+<p>
+In Go 1, unlike prior releases, equality is defined for structs and arrays, so such
+types can be used as map keys. Slices still do not have a definition of equality, though.
+</p>
+
+<h3 id="references">
+Why are maps, slices, and channels references while arrays are values?</h3>
+<p>
+There's a lot of history on that topic.  Early on, maps and channels
+were syntactically pointers and it was impossible to declare or use a
+non-pointer instance.  Also, we struggled with how arrays should work.
+Eventually we decided that the strict separation of pointers and
+values made the language harder to use.  Changing these
+types to act as references to the associated, shared data structures resolved
+these issues. This change added some regrettable complexity to the
+language but had a large effect on usability: Go became a more
+productive, comfortable language when it was introduced.
+</p>
+
+<h2 id="Writing_Code">Writing Code</h2>
+
+<h3 id="How_are_libraries_documented">
+How are libraries documented?</h3>
+
+<p>
+There is a program, <code>godoc</code>, written in Go, that extracts
+package documentation from the source code and serves it as a web
+page with links to declarations, files, and so on.
+An instance is running at
+<a href="/pkg/">golang.org/pkg/</a>.
+In fact, <code>godoc</code> implements the full site at
+<a href="/">golang.org/</a>.
+</p>
+
+<p>
+A <code>godoc</code> instance may be configured to provide rich,
+interactive static analyses of symbols in the programs it displays; details are
+listed <a href="https://golang.org/lib/godoc/analysis/help.html">here</a>.
+</p>
+
+<p>
+For access to documentation from the command line, the
+<a href="https://golang.org/pkg/cmd/go/">go</a> tool has a
+<a href="https://golang.org/pkg/cmd/go/#hdr-Show_documentation_for_package_or_symbol">doc</a>
+subcommand that provides a textual interface to the same information.
+</p>
+
+<h3 id="Is_there_a_Go_programming_style_guide">
+Is there a Go programming style guide?</h3>
+
+<p>
+There is no explicit style guide, although there is certainly
+a recognizable "Go style".
+</p>
+
+<p>
+Go has established conventions to guide decisions around
+naming, layout, and file organization.
+The document <a href="effective_go.html">Effective Go</a>
+contains some advice on these topics.
+More directly, the program <code>gofmt</code> is a pretty-printer
+whose purpose is to enforce layout rules; it replaces the usual
+compendium of do's and don'ts that allows interpretation.
+All the Go code in the repository, and the vast majority in the
+open source world, has been run through <code>gofmt</code>.
+</p>
+
+<p>
+The document titled
+<a href="//golang.org/s/comments">Go Code Review Comments</a>
+is a collection of very short essays about details of Go idiom that are often
+missed by programmers.
+It is a handy reference for people doing code reviews for Go projects.
+</p>
+
+<h3 id="How_do_I_submit_patches_to_the_Go_libraries">
+How do I submit patches to the Go libraries?</h3>
+
+<p>
+The library sources are in the <code>src</code> directory of the repository.
+If you want to make a significant change, please discuss on the mailing list before embarking.
+</p>
+
+<p>
+See the document
+<a href="contribute.html">Contributing to the Go project</a>
+for more information about how to proceed.
+</p>
+
+<h3 id="git_https">
+Why does "go get" use HTTPS when cloning a repository?</h3>
+
+<p>
+Companies often permit outgoing traffic only on the standard TCP ports 80 (HTTP)
+and 443 (HTTPS), blocking outgoing traffic on other ports, including TCP port 9418
+(git) and TCP port 22 (SSH).
+When using HTTPS instead of HTTP, <code>git</code> enforces certificate validation by
+default, providing protection against man-in-the-middle, eavesdropping and tampering attacks.
+The <code>go get</code> command therefore uses HTTPS for safety.
+</p>
+
+<p>
+<code>Git</code> can be configured to authenticate over HTTPS or to use SSH in place of HTTPS.
+To authenticate over HTTPS, you can add a line
+to the <code>$HOME/.netrc</code> file that git consults:
+</p>
+<pre>
+machine github.com login <i>USERNAME</i> password <i>APIKEY</i>
+</pre>
+<p>
+For GitHub accounts, the password can be a
+<a href="https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/">personal access token</a>.
+</p>
+
+<p>
+<code>Git</code> can also be configured to use SSH in place of HTTPS for URLs matching a given prefix.
+For example, to use SSH for all GitHub access,
+add these lines to your <code>~/.gitconfig</code>:
+</p>
+<pre>
+[url "ssh://git@github.com/"]
+	insteadOf = https://github.com/
+</pre>
+
+<h3 id="get_version">
+How should I manage package versions using "go get"?</h3>
+
+<p>
+Since the inception of the project, Go has had no explicit concept of package versions,
+but that is changing.
+Versioning is a source of significant complexity, especially in large code bases,
+and it has taken some time to develop an
+approach that works well at scale in a large enough
+variety of situations to be appropriate to supply to all Go users.
+</p>
+
+<p>
+The Go 1.11 release adds new, experimental support
+for package versioning to the <code>go</code> command,
+in the form of Go modules.
+For more information, see the <a href="/doc/go1.11#modules">Go 1.11 release notes</a>
+and the <a href="/cmd/go#hdr-Modules__module_versions__and_more"><code>go</code> command documentation</a>.
+</p>
+
+<p>
+Regardless of the actual package management technology,
+"go get" and the larger Go toolchain does provide isolation of
+packages with different import paths.
+For example, the standard library's <code>html/template</code> and <code>text/template</code>
+coexist even though both are "package template".
+This observation leads to some advice for package authors and package users.
+</p>
+
+<p>
+Packages intended for public use should try to maintain backwards compatibility as they evolve.
+The <a href="/doc/go1compat.html">Go 1 compatibility guidelines</a> are a good reference here:
+don't remove exported names, encourage tagged composite literals, and so on.
+If different functionality is required, add a new name instead of changing an old one.
+If a complete break is required, create a new package with a new import path.
+</p>
+
+<p>
+If you're using an externally supplied package and worry that it might change in
+unexpected ways, but are not yet using Go modules,
+the simplest solution is to copy it to your local repository.
+This is the approach Google takes internally and is supported by the
+<code>go</code> command through a technique called "vendoring".
+This involves
+storing a copy of the dependency under a new import path that identifies it as a local copy.
+See the <a href="https://golang.org/s/go15vendor">design
+document</a> for details.
+</p>
+
+<h2 id="Pointers">Pointers and Allocation</h2>
+
+<h3 id="pass_by_value">
+When are function parameters passed by value?</h3>
+
+<p>
+As in all languages in the C family, everything in Go is passed by value.
+That is, a function always gets a copy of the
+thing being passed, as if there were an assignment statement assigning the
+value to the parameter.  For instance, passing an <code>int</code> value
+to a function makes a copy of the <code>int</code>, and passing a pointer
+value makes a copy of the pointer, but not the data it points to.
+(See a <a href="/doc/faq#methods_on_values_or_pointers">later
+section</a> for a discussion of how this affects method receivers.)
+</p>
+
+<p>
+Map and slice values behave like pointers: they are descriptors that
+contain pointers to the underlying map or slice data.  Copying a map or
+slice value doesn't copy the data it points to.  Copying an interface value
+makes a copy of the thing stored in the interface value.  If the interface
+value holds a struct, copying the interface value makes a copy of the
+struct.  If the interface value holds a pointer, copying the interface value
+makes a copy of the pointer, but again not the data it points to.
+</p>
+
+<p>
+Note that this discussion is about the semantics of the operations.
+Actual implementations may apply optimizations to avoid copying
+as long as the optimizations do not change the semantics.
+</p>
+
+<h3 id="pointer_to_interface">
+When should I use a pointer to an interface?</h3>
+
+<p>
+Almost never. Pointers to interface values arise only in rare, tricky situations involving
+disguising an interface value's type for delayed evaluation.
+</p>
+
+<p>
+It is a common mistake to pass a pointer to an interface value
+to a function expecting an interface. The compiler will complain about this
+error but the situation can still be confusing, because sometimes a
+<a href="#different_method_sets">pointer
+is necessary to satisfy an interface</a>.
+The insight is that although a pointer to a concrete type can satisfy
+an interface, with one exception <em>a pointer to an interface can never satisfy an interface</em>.
+</p>
+
+<p>
+Consider the variable declaration,
+</p>
+
+<pre>
+var w io.Writer
+</pre>
+
+<p>
+The printing function <code>fmt.Fprintf</code> takes as its first argument
+a value that satisfies <code>io.Writer</code>—something that implements
+the canonical <code>Write</code> method. Thus we can write
+</p>
+
+<pre>
+fmt.Fprintf(w, "hello, world\n")
+</pre>
+
+<p>
+If however we pass the address of <code>w</code>, the program will not compile.
+</p>
+
+<pre>
+fmt.Fprintf(&amp;w, "hello, world\n") // Compile-time error.
+</pre>
+
+<p>
+The one exception is that any value, even a pointer to an interface, can be assigned to
+a variable of empty interface type (<code>interface{}</code>).
+Even so, it's almost certainly a mistake if the value is a pointer to an interface;
+the result can be confusing.
+</p>
+
+<h3 id="methods_on_values_or_pointers">
+Should I define methods on values or pointers?</h3>
+
+<pre>
+func (s *MyStruct) pointerMethod() { } // method on pointer
+func (s MyStruct)  valueMethod()   { } // method on value
+</pre>
+
+<p>
+For programmers unaccustomed to pointers, the distinction between these
+two examples can be confusing, but the situation is actually very simple.
+When defining a method on a type, the receiver (<code>s</code> in the above
+examples) behaves exactly as if it were an argument to the method.
+Whether to define the receiver as a value or as a pointer is the same
+question, then, as whether a function argument should be a value or
+a pointer.
+There are several considerations.
+</p>
+
+<p>
+First, and most important, does the method need to modify the
+receiver?
+If it does, the receiver <em>must</em> be a pointer.
+(Slices and maps act as references, so their story is a little
+more subtle, but for instance to change the length of a slice
+in a method the receiver must still be a pointer.)
+In the examples above, if <code>pointerMethod</code> modifies
+the fields of <code>s</code>,
+the caller will see those changes, but <code>valueMethod</code>
+is called with a copy of the caller's argument (that's the definition
+of passing a value), so changes it makes will be invisible to the caller.
+</p>
+
+<p>
+By the way, in Java method receivers are always pointers,
+although their pointer nature is somewhat disguised
+(and there is a proposal to add value receivers to the language).
+It is the value receivers in Go that are unusual.
+</p>
+
+<p>
+Second is the consideration of efficiency. If the receiver is large,
+a big <code>struct</code> for instance, it will be much cheaper to
+use a pointer receiver.
+</p>
+
+<p>
+Next is consistency. If some of the methods of the type must have
+pointer receivers, the rest should too, so the method set is
+consistent regardless of how the type is used.
+See the section on <a href="#different_method_sets">method sets</a>
+for details.
+</p>
+
+<p>
+For types such as basic types, slices, and small <code>structs</code>,
+a value receiver is very cheap so unless the semantics of the method
+requires a pointer, a value receiver is efficient and clear.
+</p>
+
+
+<h3 id="new_and_make">
+What's the difference between new and make?</h3>
+
+<p>
+In short: <code>new</code> allocates memory, while <code>make</code> initializes
+the slice, map, and channel types.
+</p>
+
+<p>
+See the <a href="/doc/effective_go.html#allocation_new">relevant section
+of Effective Go</a> for more details.
+</p>
+
+<h3 id="q_int_sizes">
+What is the size of an <code>int</code> on a 64 bit machine?</h3>
+
+<p>
+The sizes of <code>int</code> and <code>uint</code> are implementation-specific
+but the same as each other on a given platform.
+For portability, code that relies on a particular
+size of value should use an explicitly sized type, like <code>int64</code>.
+On 32-bit machines the compilers use 32-bit integers by default,
+while on 64-bit machines integers have 64 bits.
+(Historically, this was not always true.)
+</p>
+
+<p>
+On the other hand, floating-point scalars and complex
+types are always sized (there are no <code>float</code> or <code>complex</code> basic types),
+because programmers should be aware of precision when using floating-point numbers.
+The default type used for an (untyped) floating-point constant is <code>float64</code>.
+Thus <code>foo</code> <code>:=</code> <code>3.0</code> declares a variable <code>foo</code>
+of type <code>float64</code>.
+For a <code>float32</code> variable initialized by an (untyped) constant, the variable type
+must be specified explicitly in the variable declaration:
+</p>
+
+<pre>
+var foo float32 = 3.0
+</pre>
+
+<p>
+Alternatively, the constant must be given a type with a conversion as in
+<code>foo := float32(3.0)</code>.
+</p>
+
+<h3 id="stack_or_heap">
+How do I know whether a variable is allocated on the heap or the stack?</h3>
+
+<p>
+From a correctness standpoint, you don't need to know.
+Each variable in Go exists as long as there are references to it.
+The storage location chosen by the implementation is irrelevant to the
+semantics of the language.
+</p>
+
+<p>
+The storage location does have an effect on writing efficient programs.
+When possible, the Go compilers will allocate variables that are
+local to a function in that function's stack frame.  However, if the
+compiler cannot prove that the variable is not referenced after the
+function returns, then the compiler must allocate the variable on the
+garbage-collected heap to avoid dangling pointer errors.
+Also, if a local variable is very large, it might make more sense
+to store it on the heap rather than the stack.
+</p>
+
+<p>
+In the current compilers, if a variable has its address taken, that variable
+is a candidate for allocation on the heap. However, a basic <em>escape
+analysis</em> recognizes some cases when such variables will not
+live past the return from the function and can reside on the stack.
+</p>
+
+<h3 id="Why_does_my_Go_process_use_so_much_virtual_memory">
+Why does my Go process use so much virtual memory?</h3>
+
+<p>
+The Go memory allocator reserves a large region of virtual memory as an arena
+for allocations. This virtual memory is local to the specific Go process; the
+reservation does not deprive other processes of memory.
+</p>
+
+<p>
+To find the amount of actual memory allocated to a Go process, use the Unix
+<code>top</code> command and consult the <code>RES</code> (Linux) or
+<code>RSIZE</code> (macOS) columns.
+<!-- TODO(adg): find out how this works on Windows -->
+</p>
+
+<h2 id="Concurrency">Concurrency</h2>
+
+<h3 id="What_operations_are_atomic_What_about_mutexes">
+What operations are atomic? What about mutexes?</h3>
+
+<p>
+A description of the atomicity of operations in Go can be found in
+the <a href="/ref/mem">Go Memory Model</a> document.
+</p>
+
+<p>
+Low-level synchronization and atomic primitives are available in the
+<a href="/pkg/sync">sync</a> and
+<a href="/pkg/sync/atomic">sync/atomic</a>
+packages.
+These packages are good for simple tasks such as incrementing
+reference counts or guaranteeing small-scale mutual exclusion.
+</p>
+
+<p>
+For higher-level operations, such as coordination among
+concurrent servers, higher-level techniques can lead
+to nicer programs, and Go supports this approach through
+its goroutines and channels.
+For instance, you can structure your program so that only one
+goroutine at a time is ever responsible for a particular piece of data.
+That approach is summarized by the original
+<a href="https://www.youtube.com/watch?v=PAAkCSZUG1c">Go proverb</a>,
+</p>
+
+<p>
+Do not communicate by sharing memory. Instead, share memory by communicating.
+</p>
+
+<p>
+See the <a href="/doc/codewalk/sharemem/">Share Memory By Communicating</a> code walk
+and its <a href="https://blog.golang.org/2010/07/share-memory-by-communicating.html">
+associated article</a> for a detailed discussion of this concept.
+</p>
+
+<p>
+Large concurrent programs are likely to borrow from both these toolkits.
+</p>
+
+<h3 id="parallel_slow">
+Why doesn't my program run faster with more CPUs?</h3>
+
+<p>
+Whether a program runs faster with more CPUs depends on the problem
+it is solving.
+The Go language provides concurrency primitives, such as goroutines
+and channels, but concurrency only enables parallelism
+when the underlying problem is intrinsically parallel.
+Problems that are intrinsically sequential cannot be sped up by adding
+more CPUs, while those that can be broken into pieces that can
+execute in parallel can be sped up, sometimes dramatically.
+</p>
+
+<p>
+Sometimes adding more CPUs can slow a program down.
+In practical terms, programs that spend more time
+synchronizing or communicating than doing useful computation
+may experience performance degradation when using
+multiple OS threads.
+This is because passing data between threads involves switching
+contexts, which has significant cost, and that cost can increase
+with more CPUs.
+For instance, the <a href="/ref/spec#An_example_package">prime sieve example</a>
+from the Go specification has no significant parallelism although it launches many
+goroutines; increasing the number of threads (CPUs) is more likely to slow it down than
+to speed it up.
+</p>
+
+<p>
+For more detail on this topic see the talk entitled
+<a href="//blog.golang.org/2013/01/concurrency-is-not-parallelism.html">Concurrency
+is not Parallelism</a>.
+
+<h3 id="number_cpus">
+How can I control the number of CPUs?</h3>
+
+<p>
+The number of CPUs available simultaneously to executing goroutines is
+controlled by the <code>GOMAXPROCS</code> shell environment variable,
+whose default value is the number of CPU cores available.
+Programs with the potential for parallel execution should therefore
+achieve it by default on a multiple-CPU machine.
+To change the number of parallel CPUs to use,
+set the environment variable or use the similarly-named
+<a href="/pkg/runtime/#GOMAXPROCS">function</a>
+of the runtime package to configure the
+run-time support to utilize a different number of threads.
+Setting it to 1 eliminates the possibility of true parallelism,
+forcing independent goroutines to take turns executing.
+</p>
+
+<p>
+The runtime can allocate more threads than the value
+of <code>GOMAXPROCS</code> to service multiple outstanding
+I/O requests.
+<code>GOMAXPROCS</code> only affects how many goroutines
+can actually execute at once; arbitrarily more may be blocked
+in system calls.
+</p>
+
+<p>
+Go's goroutine scheduler is not as good as it needs to be, although it
+has improved over time.
+In the future, it may better optimize its use of OS threads.
+For now, if there are performance issues,
+setting <code>GOMAXPROCS</code> on a per-application basis may help.
+</p>
+
+
+<h3 id="no_goroutine_id">
+Why is there no goroutine ID?</h3>
+
+<p>
+Goroutines do not have names; they are just anonymous workers.
+They expose no unique identifier, name, or data structure to the programmer.
+Some people are surprised by this, expecting the <code>go</code>
+statement to return some item that can be used to access and control
+the goroutine later.
+</p>
+
+<p>
+The fundamental reason goroutines are anonymous is so that
+the full Go language is available when programming concurrent code.
+By contrast, the usage patterns that develop when threads and goroutines are
+named can restrict what a library using them can do.
+</p>
+
+<p>
+Here is an illustration of the difficulties.
+Once one names a goroutine and constructs a model around
+it, it becomes special, and one is tempted to associate all computation
+with that goroutine, ignoring the possibility
+of using multiple, possibly shared goroutines for the processing.
+If the <code>net/http</code> package associated per-request
+state with a goroutine,
+clients would be unable to use more goroutines
+when serving a request.
+</p>
+
+<p>
+Moreover, experience with libraries such as those for graphics systems
+that require all processing to occur on the "main thread"
+has shown how awkward and limiting the approach can be when
+deployed in a concurrent language.
+The very existence of a special thread or goroutine forces
+the programmer to distort the program to avoid crashes
+and other problems caused by inadvertently operating
+on the wrong thread.
+</p>
+
+<p>
+For those cases where a particular goroutine is truly special,
+the language provides features such as channels that can be
+used in flexible ways to interact with it.
+</p>
+
+<h2 id="Functions_methods">Functions and Methods</h2>
+
+<h3 id="different_method_sets">
+Why do T and *T have different method sets?</h3>
+
+<p>
+As the <a href="/ref/spec#Types">Go specification</a> says,
+the method set of a type <code>T</code> consists of all methods
+with receiver type <code>T</code>,
+while that of the corresponding pointer
+type <code>*T</code> consists of all methods with receiver <code>*T</code> or
+<code>T</code>.
+That means the method set of <code>*T</code>
+includes that of <code>T</code>,
+but not the reverse.
+</p>
+
+<p>
+This distinction arises because
+if an interface value contains a pointer <code>*T</code>,
+a method call can obtain a value by dereferencing the pointer,
+but if an interface value contains a value <code>T</code>,
+there is no safe way for a method call to obtain a pointer.
+(Doing so would allow a method to modify the contents of
+the value inside the interface, which is not permitted by
+the language specification.)
+</p>
+
+<p>
+Even in cases where the compiler could take the address of a value
+to pass to the method, if the method modifies the value the changes
+will be lost in the caller.
+As an example, if the <code>Write</code> method of
+<a href="/pkg/bytes/#Buffer"><code>bytes.Buffer</code></a>
+used a value receiver rather than a pointer,
+this code:
+</p>
+
+<pre>
+var buf bytes.Buffer
+io.Copy(buf, os.Stdin)
+</pre>
+
+<p>
+would copy standard input into a <i>copy</i> of <code>buf</code>,
+not into <code>buf</code> itself.
+This is almost never the desired behavior.
+</p>
+
+<h3 id="closures_and_goroutines">
+What happens with closures running as goroutines?</h3>
+
+<p>
+Some confusion may arise when using closures with concurrency.
+Consider the following program:
+</p>
+
+<pre>
+func main() {
+    done := make(chan bool)
+
+    values := []string{"a", "b", "c"}
+    for _, v := range values {
+        go func() {
+            fmt.Println(v)
+            done &lt;- true
+        }()
+    }
+
+    // wait for all goroutines to complete before exiting
+    for _ = range values {
+        &lt;-done
+    }
+}
+</pre>
+
+<p>
+One might mistakenly expect to see <code>a, b, c</code> as the output.
+What you'll probably see instead is <code>c, c, c</code>.  This is because
+each iteration of the loop uses the same instance of the variable <code>v</code>, so
+each closure shares that single variable. When the closure runs, it prints the
+value of <code>v</code> at the time <code>fmt.Println</code> is executed,
+but <code>v</code> may have been modified since the goroutine was launched.
+To help detect this and other problems before they happen, run
+<a href="/cmd/go/#hdr-Run_go_tool_vet_on_packages"><code>go vet</code></a>.
+</p>
+
+<p>
+To bind the current value of <code>v</code> to each closure as it is launched, one
+must modify the inner loop to create a new variable each iteration.
+One way is to pass the variable as an argument to the closure:
+</p>
+
+<pre>
+    for _, v := range values {
+        go func(<b>u</b> string) {
+            fmt.Println(<b>u</b>)
+            done &lt;- true
+        }(<b>v</b>)
+    }
+</pre>
+
+<p>
+In this example, the value of <code>v</code> is passed as an argument to the
+anonymous function. That value is then accessible inside the function as
+the variable <code>u</code>.
+</p>
+
+<p>
+Even easier is just to create a new variable, using a declaration style that may
+seem odd but works fine in Go:
+</p>
+
+<pre>
+    for _, v := range values {
+        <b>v := v</b> // create a new 'v'.
+        go func() {
+            fmt.Println(<b>v</b>)
+            done &lt;- true
+        }()
+    }
+</pre>
+
+<p>
+This behavior of the language, not defining a new variable for
+each iteration, may have been a mistake in retrospect.
+It may be addressed in a later version but, for compatibility,
+cannot change in Go version 1.
+</p>
+
+<h2 id="Control_flow">Control flow</h2>
+
+<h3 id="Does_Go_have_a_ternary_form">
+Why does Go not have the <code>?:</code> operator?</h3>
+
+<p>
+There is no ternary testing operation in Go.
+You may use the following to achieve the same
+result:
+</p>
+
+<pre>
+if expr {
+    n = trueVal
+} else {
+    n = falseVal
+}
+</pre>
+
+<p>
+The reason <code>?:</code> is absent from Go is that the language's designers
+had seen the operation used too often to create impenetrably complex expressions.
+The <code>if-else</code> form, although longer,
+is unquestionably clearer.
+A language needs only one conditional control flow construct.
+</p>
+
+<h2 id="Packages_Testing">Packages and Testing</h2>
+
+<h3 id="How_do_I_create_a_multifile_package">
+How do I create a multifile package?</h3>
+
+<p>
+Put all the source files for the package in a directory by themselves.
+Source files can refer to items from different files at will; there is
+no need for forward declarations or a header file.
+</p>
+
+<p>
+Other than being split into multiple files, the package will compile and test
+just like a single-file package.
+</p>
+
+<h3 id="How_do_I_write_a_unit_test">
+How do I write a unit test?</h3>
+
+<p>
+Create a new file ending in <code>_test.go</code> in the same directory
+as your package sources. Inside that file, <code>import "testing"</code>
+and write functions of the form
+</p>
+
+<pre>
+func TestFoo(t *testing.T) {
+    ...
+}
+</pre>
+
+<p>
+Run <code>go test</code> in that directory.
+That script finds the <code>Test</code> functions,
+builds a test binary, and runs it.
+</p>
+
+<p>See the <a href="/doc/code.html">How to Write Go Code</a> document,
+the <a href="/pkg/testing/"><code>testing</code></a> package
+and the <a href="/cmd/go/#hdr-Test_packages"><code>go test</code></a> subcommand for more details.
+</p>
+
+<h3 id="testing_framework">
+Where is my favorite helper function for testing?</h3>
+
+<p>
+Go's standard <a href="/pkg/testing/"><code>testing</code></a> package makes it easy to write unit tests, but it lacks
+features provided in other language's testing frameworks such as assertion functions.
+An <a href="#assertions">earlier section</a> of this document explained why Go
+doesn't have assertions, and
+the same arguments apply to the use of <code>assert</code> in tests.
+Proper error handling means letting other tests run after one has failed, so
+that the person debugging the failure gets a complete picture of what is
+wrong. It is more useful for a test to report that
+<code>isPrime</code> gives the wrong answer for 2, 3, 5, and 7 (or for
+2, 4, 8, and 16) than to report that <code>isPrime</code> gives the wrong
+answer for 2 and therefore no more tests were run. The programmer who
+triggers the test failure may not be familiar with the code that fails.
+Time invested writing a good error message now pays off later when the
+test breaks.
+</p>
+
+<p>
+A related point is that testing frameworks tend to develop into mini-languages
+of their own, with conditionals and controls and printing mechanisms,
+but Go already has all those capabilities; why recreate them?
+We'd rather write tests in Go; it's one fewer language to learn and the
+approach keeps the tests straightforward and easy to understand.
+</p>
+
+<p>
+If the amount of extra code required to write
+good errors seems repetitive and overwhelming, the test might work better if
+table-driven, iterating over a list of inputs and outputs defined
+in a data structure (Go has excellent support for data structure literals).
+The work to write a good test and good error messages will then be amortized over many
+test cases. The standard Go library is full of illustrative examples, such as in
+<a href="/src/fmt/fmt_test.go">the formatting tests for the <code>fmt</code> package</a>.
+</p>
+
+<h3 id="x_in_std">
+Why isn't <i>X</i> in the standard library?</h3>
+
+<p>
+The standard library's purpose is to support the runtime, connect to
+the operating system, and provide key functionality that many Go
+programs require, such as formatted I/O and networking.
+It also contains elements important for web programming, including
+cryptography and support for standards like HTTP, JSON, and XML.
+</p>
+
+<p>
+There is no clear criterion that defines what is included because for
+a long time, this was the <i>only</i> Go library.
+There are criteria that define what gets added today, however.
+</p>
+
+<p>
+New additions to the standard library are rare and the bar for
+inclusion is high.
+Code included in the standard library bears a large ongoing maintenance cost
+(often borne by those other than the original author),
+is subject to the <a href="/doc/go1compat.html">Go 1 compatibility promise</a>
+(blocking fixes to any flaws in the API),
+and is subject to the Go
+<a href="https://golang.org/s/releasesched">release schedule</a>,
+preventing bug fixes from being available to users quickly.
+</p>
+
+<p>
+Most new code should live outside of the standard library and be accessible
+via the <a href="/cmd/go/"><code>go</code> tool</a>'s
+<code>go get</code> command.
+Such code can have its own maintainers, release cycle,
+and compatibility guarantees.
+Users can find packages and read their documentation at
+<a href="https://godoc.org/">godoc.org</a>.
+</p>
+
+<p>
+Although there are pieces in the standard library that don't really belong,
+such as <code>log/syslog</code>, we continue to maintain everything in the
+library because of the Go 1 compatibility promise.
+But we encourage most new code to live elsewhere.
+</p>
+
+<h2 id="Implementation">Implementation</h2>
+
+<h3 id="What_compiler_technology_is_used_to_build_the_compilers">
+What compiler technology is used to build the compilers?</h3>
+
+<p>
+There are several production compilers for Go, and a number of others
+in development for various platforms.
+</p>
+
+<p>
+The default compiler, <code>gc</code>, is included with the
+Go distribution as part of the support for the <code>go</code>
+command.
+<code>Gc</code> was originally written in C
+because of the difficulties of bootstrapping&mdash;you'd need a Go compiler to
+set up a Go environment.
+But things have advanced and since the Go 1.5 release the compiler has been
+a Go program.
+The compiler was converted from C to Go using automatic translation tools, as
+described in this <a href="/s/go13compiler">design document</a>
+and <a href="https://talks.golang.org/2015/gogo.slide#1">talk</a>.
+Thus the compiler is now "self-hosting", which means we needed to face
+the bootstrapping problem.
+The solution is to have a working Go installation already in place,
+just as one normally has with a working C installation.
+The story of how to bring up a new Go environment from source
+is described <a href="/s/go15bootstrap">here</a> and
+<a href="/doc/install/source">here</a>.
+</p>
+
+<p>
+<code>Gc</code> is written in Go with a recursive descent parser
+and uses a custom loader, also written in Go but
+based on the Plan 9 loader, to generate ELF/Mach-O/PE binaries.
+</p>
+
+<p>
+At the beginning of the project we considered using LLVM for
+<code>gc</code> but decided it was too large and slow to meet
+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 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>
+
+<p>
+The <code>Gccgo</code> compiler is a front end written in C++
+with a recursive descent parser coupled to the
+standard GCC back end.
+</p>
+
+<p>
+Go turned out to be a fine language in which to implement a Go compiler,
+although that was not its original goal.
+Not being self-hosting from the beginning allowed Go's design to
+concentrate on its original use case, which was networked servers.
+Had we decided Go should compile itself early on, we might have
+ended up with a language targeted more for compiler construction,
+which is a worthy goal but not the one we had initially.
+</p>
+
+<p>
+Although <code>gc</code> does not use them (yet?), a native lexer and
+parser are available in the <a href="/pkg/go/"><code>go</code></a> package
+and there is also a native <a href="/pkg/go/types">type checker</a>.
+</p>
+
+<h3 id="How_is_the_run_time_support_implemented">
+How is the run-time support implemented?</h3>
+
+<p>
+Again due to bootstrapping issues, the run-time code was originally written mostly in C (with a
+tiny bit of assembler) but it has since been translated to Go
+(except for some assembler bits).
+<code>Gccgo</code>'s run-time support uses <code>glibc</code>.
+The <code>gccgo</code> compiler implements goroutines using
+a technique called segmented stacks,
+supported by recent modifications to the gold linker.
+<code>Gollvm</code> similarly is built on the corresponding
+LLVM infrastructure.
+</p>
+
+<h3 id="Why_is_my_trivial_program_such_a_large_binary">
+Why is my trivial program such a large binary?</h3>
+
+<p>
+The linker in the <code>gc</code> toolchain
+creates statically-linked binaries by default.
+All Go binaries therefore include the Go
+runtime, along with the run-time type information necessary to support dynamic
+type checks, reflection, and even panic-time stack traces.
+</p>
+
+<p>
+A simple C "hello, world" program compiled and linked statically using
+gcc on Linux is around 750 kB, including an implementation of
+<code>printf</code>.
+An equivalent Go program using
+<code>fmt.Printf</code> weighs a couple of megabytes, but that includes
+more powerful run-time support and type and debugging information.
+</p>
+
+<p>
+A Go program compiled with <code>gc</code> can be linked with
+the <code>-ldflags=-w</code> flag to disable DWARF generation,
+removing debugging information from the binary but with no
+other loss of functionality.
+This can reduce the binary size substantially.
+</p>
+
+<h3 id="unused_variables_and_imports">
+Can I stop these complaints about my unused variable/import?</h3>
+
+<p>
+The presence of an unused variable may indicate a bug, while
+unused imports just slow down compilation,
+an effect that can become substantial as a program accumulates
+code and programmers over time.
+For these reasons, Go refuses to compile programs with unused
+variables or imports,
+trading short-term convenience for long-term build speed and
+program clarity.
+</p>
+
+<p>
+Still, when developing code, it's common to create these situations
+temporarily and it can be annoying to have to edit them out before the
+program will compile.
+</p>
+
+<p>
+Some have asked for a compiler option to turn those checks off
+or at least reduce them to warnings.
+Such an option has not been added, though,
+because compiler options should not affect the semantics of the
+language and because the Go compiler does not report warnings, only
+errors that prevent compilation.
+</p>
+
+<p>
+There are two reasons for having no warnings.  First, if it's worth
+complaining about, it's worth fixing in the code.  (And if it's not
+worth fixing, it's not worth mentioning.) Second, having the compiler
+generate warnings encourages the implementation to warn about weak
+cases that can make compilation noisy, masking real errors that
+<em>should</em> be fixed.
+</p>
+
+<p>
+It's easy to address the situation, though.  Use the blank identifier
+to let unused things persist while you're developing.
+</p>
+
+<pre>
+import "unused"
+
+// This declaration marks the import as used by referencing an
+// item from the package.
+var _ = unused.Item  // TODO: Delete before committing!
+
+func main() {
+    debugData := debug.Profile()
+    _ = debugData // Used only during debugging.
+    ....
+}
+</pre>
+
+<p>
+Nowadays, most Go programmers use a tool,
+<a href="https://godoc.org/golang.org/x/tools/cmd/goimports">goimports</a>,
+which automatically rewrites a Go source file to have the correct imports,
+eliminating the unused imports issue in practice.
+This program is easily connected to most editors to run automatically when a Go source file is written.
+</p>
+
+<h3 id="virus">
+Why does my virus-scanning software think my Go distribution or compiled binary is infected?</h3>
+
+<p>
+This is a common occurrence, especially on Windows machines, and is almost always a false positive.
+Commercial virus scanning programs are often confused by the structure of Go binaries, which
+they don't see as often as those compiled from other languages.
+</p>
+
+<p>
+If you've just installed the Go distribution and the system reports it is infected, that's certainly a mistake.
+To be really thorough, you can verify the download by comparing the checksum with those on the
+<a href="https://golang.org/dl/">downloads page</a>.
+</p>
+
+<p>
+In any case, if you believe the report is in error, please report a bug to the supplier of your virus scanner.
+Maybe in time virus scanners can learn to understand Go programs.
+</p>
+
+<h2 id="Performance">Performance</h2>
+
+<h3 id="Why_does_Go_perform_badly_on_benchmark_x">
+Why does Go perform badly on benchmark X?</h3>
+
+<p>
+One of Go's design goals is to approach the performance of C for comparable
+programs, yet on some benchmarks it does quite poorly, including several
+in <a href="https://go.googlesource.com/exp/+/master/shootout/">golang.org/x/exp/shootout</a>.
+The slowest depend on libraries for which versions of comparable performance
+are not available in Go.
+For instance, <a href="https://go.googlesource.com/exp/+/master/shootout/pidigits.go">pidigits.go</a>
+depends on a multi-precision math package, and the C
+versions, unlike Go's, use <a href="https://gmplib.org/">GMP</a> (which is
+written in optimized assembler).
+Benchmarks that depend on regular expressions
+(<a href="https://go.googlesource.com/exp/+/master/shootout/regex-dna.go">regex-dna.go</a>,
+for instance) are essentially comparing Go's native <a href="/pkg/regexp">regexp package</a> to
+mature, highly optimized regular expression libraries like PCRE.
+</p>
+
+<p>
+Benchmark games are won by extensive tuning and the Go versions of most
+of the benchmarks need attention.  If you measure comparable C
+and Go programs
+(<a href="https://go.googlesource.com/exp/+/master/shootout/reverse-complement.go">reverse-complement.go</a>
+is one example), you'll see the two languages are much closer in raw performance
+than this suite would indicate.
+</p>
+
+<p>
+Still, there is room for improvement. The compilers are good but could be
+better, many libraries need major performance work, and the garbage collector
+isn't fast enough yet. (Even if it were, taking care not to generate unnecessary
+garbage can have a huge effect.)
+</p>
+
+<p>
+In any case, Go can often be very competitive.
+There has been significant improvement in the performance of many programs
+as the language and tools have developed.
+See the blog post about
+<a href="//blog.golang.org/2011/06/profiling-go-programs.html">profiling
+Go programs</a> for an informative example.
+
+<h2 id="change_from_c">Changes from C</h2>
+
+<h3 id="different_syntax">
+Why is the syntax so different from C?</h3>
+<p>
+Other than declaration syntax, the differences are not major and stem
+from two desires.  First, the syntax should feel light, without too
+many mandatory keywords, repetition, or arcana.  Second, the language
+has been designed to be easy to analyze
+and can be parsed without a symbol table.  This makes it much easier
+to build tools such as debuggers, dependency analyzers, automated
+documentation extractors, IDE plug-ins, and so on.  C and its
+descendants are notoriously difficult in this regard.
+</p>
+
+<h3 id="declarations_backwards">
+Why are declarations backwards?</h3>
+<p>
+They're only backwards if you're used to C. In C, the notion is that a
+variable is declared like an expression denoting its type, which is a
+nice idea, but the type and expression grammars don't mix very well and
+the results can be confusing; consider function pointers.  Go mostly
+separates expression and type syntax and that simplifies things (using
+prefix <code>*</code> for pointers is an exception that proves the rule).  In C,
+the declaration
+</p>
+<pre>
+    int* a, b;
+</pre>
+<p>
+declares <code>a</code> to be a pointer but not <code>b</code>; in Go
+</p>
+<pre>
+    var a, b *int
+</pre>
+<p>
+declares both to be pointers.  This is clearer and more regular.
+Also, the <code>:=</code> short declaration form argues that a full variable
+declaration should present the same order as <code>:=</code> so
+</p>
+<pre>
+    var a uint64 = 1
+</pre>
+<p>
+has the same effect as
+</p>
+<pre>
+    a := uint64(1)
+</pre>
+<p>
+Parsing is also simplified by having a distinct grammar for types that
+is not just the expression grammar; keywords such as <code>func</code>
+and <code>chan</code> keep things clear.
+</p>
+
+<p>
+See the article about
+<a href="/doc/articles/gos_declaration_syntax.html">Go's Declaration Syntax</a>
+for more details.
+</p>
+
+<h3 id="no_pointer_arithmetic">
+Why is there no pointer arithmetic?</h3>
+<p>
+Safety.  Without pointer arithmetic it's possible to create a
+language that can never derive an illegal address that succeeds
+incorrectly.  Compiler and hardware technology have advanced to the
+point where a loop using array indices can be as efficient as a loop
+using pointer arithmetic.  Also, the lack of pointer arithmetic can
+simplify the implementation of the garbage collector.
+</p>
+
+<h3 id="inc_dec">
+Why are <code>++</code> and <code>--</code> statements and not expressions?  And why postfix, not prefix?</h3>
+<p>
+Without pointer arithmetic, the convenience value of pre- and postfix
+increment operators drops.  By removing them from the expression
+hierarchy altogether, expression syntax is simplified and the messy
+issues around order of evaluation of <code>++</code> and <code>--</code>
+(consider <code>f(i++)</code> and <code>p[i] = q[++i]</code>)
+are eliminated as well.  The simplification is
+significant.  As for postfix vs. prefix, either would work fine but
+the postfix version is more traditional; insistence on prefix arose
+with the STL, a library for a language whose name contains, ironically, a
+postfix increment.
+</p>
+
+<h3 id="semicolons">
+Why are there braces but no semicolons? And why can't I put the opening
+brace on the next line?</h3>
+<p>
+Go uses brace brackets for statement grouping, a syntax familiar to
+programmers who have worked with any language in the C family.
+Semicolons, however, are for parsers, not for people, and we wanted to
+eliminate them as much as possible.  To achieve this goal, Go borrows
+a trick from BCPL: the semicolons that separate statements are in the
+formal grammar but are injected automatically, without lookahead, by
+the lexer at the end of any line that could be the end of a statement.
+This works very well in practice but has the effect that it forces a
+brace style.  For instance, the opening brace of a function cannot
+appear on a line by itself.
+</p>
+
+<p>
+Some have argued that the lexer should do lookahead to permit the
+brace to live on the next line.  We disagree.  Since Go code is meant
+to be formatted automatically by
+<a href="/cmd/gofmt/"><code>gofmt</code></a>,
+<i>some</i> style must be chosen.  That style may differ from what
+you've used in C or Java, but Go is a different language and
+<code>gofmt</code>'s style is as good as any other.  More
+important&mdash;much more important&mdash;the advantages of a single,
+programmatically mandated format for all Go programs greatly outweigh
+any perceived disadvantages of the particular style.
+Note too that Go's style means that an interactive implementation of
+Go can use the standard syntax one line at a time without special rules.
+</p>
+
+<h3 id="garbage_collection">
+Why do garbage collection?  Won't it be too expensive?</h3>
+<p>
+One of the biggest sources of bookkeeping in systems programs is
+managing the lifetimes of allocated objects.
+In languages such as C in which it is done manually,
+it can consume a significant amount of programmer time and is
+often the cause of pernicious bugs.
+Even in languages like C++ or Rust that provide mechanisms
+to assist, those mechanisms can have a significant effect on the
+design of the software, often adding programming overhead
+of its own.
+We felt it was critical to eliminate such
+programmer overheads, and advances in garbage collection
+technology in the last few years gave us confidence that it
+could be implemented cheaply enough, and with low enough
+latency, that it could be a viable approach for networked
+systems.
+</p>
+
+<p>
+Much of the difficulty of concurrent programming
+has its roots in the object lifetime problem:
+as objects get passed among threads it becomes cumbersome
+to guarantee they become freed safely.
+Automatic garbage collection makes concurrent code far easier to write.
+Of course, implementing garbage collection in a concurrent environment is
+itself a challenge, but meeting it once rather than in every
+program helps everyone.
+</p>
+
+<p>
+Finally, concurrency aside, garbage collection makes interfaces
+simpler because they don't need to specify how memory is managed across them.
+</p>
+
+<p>
+This is not to say that the recent work in languages
+like Rust that bring new ideas to the problem of managing
+resources is misguided; we encourage this work and are excited to see
+how it evolves.
+But Go takes a more traditional approach by addressing
+object lifetimes through
+garbage collection, and garbage collection alone.
+</p>
+
+<p>
+The current implementation is a mark-and-sweep collector.
+If the machine is a multiprocessor, the collector runs on a separate CPU
+core in parallel with the main program.
+Major work on the collector in recent years has reduced pause times
+often to the sub-millisecond range, even for large heaps,
+all but eliminating one of the major objections to garbage collection
+in networked servers.
+Work continues to refine the algorithm, reduce overhead and
+latency further, and to explore new approaches.
+The 2018
+<a href="https://blog.golang.org/ismmkeynote">ISMM keynote</a>
+by Rick Hudson of the Go team
+describes the progress so far and suggests some future approaches.
+</p>
+
+<p>
+On the topic of performance, keep in mind that Go gives the programmer
+considerable control over memory layout and allocation, much more than
+is typical in garbage-collected languages. A careful programmer can reduce
+the garbage collection overhead dramatically by using the language well;
+see the article about
+<a href="//blog.golang.org/2011/06/profiling-go-programs.html">profiling
+Go programs</a> for a worked example, including a demonstration of Go's
+profiling tools.
+</p>
diff --git a/_content/doc/gopher/README b/_content/doc/gopher/README
new file mode 100644
index 0000000..d4ca8a1
--- /dev/null
+++ b/_content/doc/gopher/README
@@ -0,0 +1,3 @@
+The Go gopher was designed by Renee French. (http://reneefrench.blogspot.com/)
+The design is licensed under the Creative Commons 3.0 Attributions license.
+Read this article for more details: https://blog.golang.org/gopher
diff --git a/_content/doc/gopher/appenginegopher.jpg b/_content/doc/gopher/appenginegopher.jpg
new file mode 100644
index 0000000..0a64306
--- /dev/null
+++ b/_content/doc/gopher/appenginegopher.jpg
Binary files differ
diff --git a/_content/doc/gopher/appenginegophercolor.jpg b/_content/doc/gopher/appenginegophercolor.jpg
new file mode 100644
index 0000000..68795a9
--- /dev/null
+++ b/_content/doc/gopher/appenginegophercolor.jpg
Binary files differ
diff --git a/_content/doc/gopher/appenginelogo.gif b/_content/doc/gopher/appenginelogo.gif
new file mode 100644
index 0000000..46b3c1e
--- /dev/null
+++ b/_content/doc/gopher/appenginelogo.gif
Binary files differ
diff --git a/_content/doc/gopher/biplane.jpg b/_content/doc/gopher/biplane.jpg
new file mode 100644
index 0000000..d5e666f
--- /dev/null
+++ b/_content/doc/gopher/biplane.jpg
Binary files differ
diff --git a/_content/doc/gopher/bumper.png b/_content/doc/gopher/bumper.png
new file mode 100644
index 0000000..b357cdf
--- /dev/null
+++ b/_content/doc/gopher/bumper.png
Binary files differ
diff --git a/_content/doc/gopher/bumper192x108.png b/_content/doc/gopher/bumper192x108.png
new file mode 100644
index 0000000..925474e
--- /dev/null
+++ b/_content/doc/gopher/bumper192x108.png
Binary files differ
diff --git a/_content/doc/gopher/bumper320x180.png b/_content/doc/gopher/bumper320x180.png
new file mode 100644
index 0000000..611c417
--- /dev/null
+++ b/_content/doc/gopher/bumper320x180.png
Binary files differ
diff --git a/_content/doc/gopher/bumper480x270.png b/_content/doc/gopher/bumper480x270.png
new file mode 100644
index 0000000..cf18715
--- /dev/null
+++ b/_content/doc/gopher/bumper480x270.png
Binary files differ
diff --git a/_content/doc/gopher/bumper640x360.png b/_content/doc/gopher/bumper640x360.png
new file mode 100644
index 0000000..a5073e0
--- /dev/null
+++ b/_content/doc/gopher/bumper640x360.png
Binary files differ
diff --git a/_content/doc/gopher/doc.png b/_content/doc/gopher/doc.png
new file mode 100644
index 0000000..e15a323
--- /dev/null
+++ b/_content/doc/gopher/doc.png
Binary files differ
diff --git a/_content/doc/gopher/favicon.svg b/_content/doc/gopher/favicon.svg
new file mode 100644
index 0000000..e5a68fe
--- /dev/null
+++ b/_content/doc/gopher/favicon.svg
@@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   viewBox="0 0 32 32.000001"
+   id="svg4416"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   sodipodi:docname="favicon.svg"
+   inkscape:export-filename="../../favicon.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4418" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="15.839192"
+     inkscape:cx="17.966652"
+     inkscape:cy="9.2991824"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     units="px"
+     inkscape:snap-bbox="true"
+     inkscape:snap-bbox-edge-midpoints="false"
+     inkscape:bbox-nodes="true"
+     showguides="false"
+     inkscape:window-width="1920"
+     inkscape:window-height="1018"
+     inkscape:window-x="1912"
+     inkscape:window-y="-8"
+     inkscape:window-maximized="1"
+     inkscape:object-nodes="true"
+     inkscape:snap-smooth-nodes="true"
+     inkscape:snap-global="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5148" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata4421">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="icon"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-1020.3622)">
+    <ellipse
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#384e54;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       id="ellipse4216"
+       cx="-907.35657"
+       cy="479.90009"
+       rx="3.5793996"
+       ry="3.8207953"
+       transform="matrix(-0.49169095,-0.87076978,-0.87076978,0.49169095,0,0)"
+       inkscape:transform-center-x="0.67794294"
+       inkscape:transform-center-y="-2.3634048" />
+    <ellipse
+       inkscape:transform-center-y="-2.3633882"
+       inkscape:transform-center-x="-0.67793718"
+       transform="matrix(0.49169095,-0.87076978,0.87076978,0.49169095,0,0)"
+       ry="3.8207953"
+       rx="3.5793996"
+       cy="507.8461"
+       cx="-891.57654"
+       id="ellipse4463"
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#384e54;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
+    <path
+       inkscape:connector-curvature="0"
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#384e54;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       d="m 16.091693,1021.3642 c -1.105749,0.01 -2.210341,0.049 -3.31609,0.09 C 6.8422558,1021.6738 2,1026.3942 2,1032.3622 c 0,2.9786 0,13 0,20 l 28,0 c 0,-8 0,-16 0,-20 0,-5.9683 -4.667345,-10.4912 -10.59023,-10.908 -1.10575,-0.078 -2.212328,-0.099 -3.318077,-0.09 z"
+       id="path4465"
+       sodipodi:nodetypes="ccsccscc" />
+    <path
+       inkscape:transform-center-y="-1.3604657"
+       inkscape:transform-center-x="-0.98424303"
+       sodipodi:nodetypes="sssssss"
+       inkscape:connector-curvature="0"
+       id="path4469"
+       d="m 4.6078867,1025.0462 c 0.459564,0.2595 1.818262,1.2013 1.980983,1.648 0.183401,0.5035 0.159385,1.0657 -0.114614,1.551 -0.346627,0.6138 -1.005341,0.9487 -1.696421,0.9365 -0.339886,-0.01 -1.720283,-0.6372 -2.042561,-0.8192 -0.97754,-0.5519 -1.350795,-1.7418 -0.833686,-2.6576 0.517109,-0.9158 1.728749,-1.2107 2.706299,-0.6587 z"
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#76e1fe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
+    <rect
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:0.32850246;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       id="rect4473"
+       width="3.0866659"
+       height="3.5313663"
+       x="14.406213"
+       y="1035.6842"
+       ry="0.62426329" />
+    <path
+       inkscape:connector-curvature="0"
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#76e1fe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       d="m 16,1023.3622 c -9,0 -12,3.7153 -12,9 l 0,20 24,0 c -0.04889,-7.3562 0,-18 0,-20 0,-5.2848 -3,-9 -12,-9 z"
+       id="path4471"
+       sodipodi:nodetypes="zsccsz" />
+    <path
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#76e1fe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       d="m 27.074073,1025.0462 c -0.45957,0.2595 -1.818257,1.2013 -1.980979,1.648 -0.183401,0.5035 -0.159384,1.0657 0.114614,1.551 0.346627,0.6138 1.005335,0.9487 1.696415,0.9365 0.33988,-0.01 1.72029,-0.6372 2.04256,-0.8192 0.97754,-0.5519 1.35079,-1.7418 0.83369,-2.6576 -0.51711,-0.9158 -1.72876,-1.2107 -2.7063,-0.6587 z"
+       id="path4481"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="sssssss"
+       inkscape:transform-center-x="0.98424094"
+       inkscape:transform-center-y="-1.3604657" />
+    <circle
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       id="circle4477"
+       cx="21.175734"
+       cy="1030.3542"
+       r="4.6537542"
+       inkscape:export-filename=".\rect4485.png"
+       inkscape:export-xdpi="90"
+       inkscape:export-ydpi="90" />
+    <circle
+       r="4.8316345"
+       cy="1030.3542"
+       cx="10.339486"
+       id="circle4483"
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       inkscape:export-filename=".\rect4485.png"
+       inkscape:export-xdpi="90"
+       inkscape:export-ydpi="90" />
+    <rect
+       inkscape:export-ydpi="90"
+       inkscape:export-xdpi="90"
+       inkscape:export-filename=".\rect4485.png"
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:0.32941176;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       id="rect4246"
+       width="3.6673687"
+       height="4.1063409"
+       x="14.115863"
+       y="1035.9174"
+       ry="0.72590536" />
+    <rect
+       ry="0.72590536"
+       y="1035.2253"
+       x="14.115863"
+       height="4.1063409"
+       width="3.6673687"
+       id="rect4485"
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#fffcfb;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       inkscape:export-filename=".\rect4485.png"
+       inkscape:export-xdpi="90"
+       inkscape:export-ydpi="90" />
+    <path
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:0.32941176;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       d="m 19.999735,1036.5289 c 0,0.838 -0.871228,1.2682 -2.144766,1.1659 -0.02366,0 -0.04795,-0.6004 -0.254147,-0.5832 -0.503669,0.042 -1.095902,-0.02 -1.685964,-0.02 -0.612939,0 -1.206342,0.1826 -1.68549,0.017 -0.110233,-0.038 -0.178298,0.5838 -0.261532,0.5816 -1.243685,-0.033 -2.078803,-0.3383 -2.078803,-1.1618 0,-1.2118 1.815635,-2.1941 4.055351,-2.1941 2.239704,0 4.055351,0.9823 4.055351,2.1941 z"
+       id="path4487"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="sssssssss"
+       inkscape:export-filename=".\rect4485.png"
+       inkscape:export-xdpi="90"
+       inkscape:export-ydpi="90" />
+    <path
+       sodipodi:nodetypes="sssssssss"
+       inkscape:connector-curvature="0"
+       id="path4489"
+       d="m 19.977414,1035.7004 c 0,0.5685 -0.433659,0.8554 -1.138091,1.0001 -0.291933,0.06 -0.630371,0.096 -1.003719,0.1166 -0.56405,0.032 -1.207782,0.031 -1.89122,0.031 -0.672834,0 -1.307182,0 -1.864904,-0.029 -0.306268,-0.017 -0.589429,-0.043 -0.843164,-0.084 -0.813833,-0.1318 -1.324962,-0.417 -1.324962,-1.0344 0,-1.1601 1.805642,-2.1006 4.03303,-2.1006 2.227377,0 4.03303,0.9405 4.03303,2.1006 z"
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#c38c74;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       inkscape:export-filename=".\rect4485.png"
+       inkscape:export-xdpi="90"
+       inkscape:export-ydpi="90" />
+    <ellipse
+       cy="1033.8501"
+       cx="15.944382"
+       id="ellipse4491"
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#23201f;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       rx="2.0801733"
+       ry="1.343747"
+       inkscape:export-filename=".\rect4485.png"
+       inkscape:export-xdpi="90"
+       inkscape:export-ydpi="90" />
+    <circle
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#171311;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       id="circle4493"
+       cx="12.414201"
+       cy="1030.3542"
+       r="1.9630634"
+       inkscape:export-filename=".\rect4485.png"
+       inkscape:export-xdpi="90"
+       inkscape:export-ydpi="90" />
+    <circle
+       r="1.9630634"
+       cy="1030.3542"
+       cx="23.110121"
+       id="circle4495"
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#171311;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       inkscape:export-filename=".\rect4485.png"
+       inkscape:export-xdpi="90"
+       inkscape:export-ydpi="90" />
+    <path
+       sodipodi:nodetypes="cc"
+       inkscape:connector-curvature="0"
+       id="path4497"
+       d="m 5.0055377,1027.2727 c -1.170435,-1.0835 -2.026973,-0.7721 -2.044172,-0.7463"
+       style="display:inline;fill:none;fill-rule:evenodd;stroke:#384e54;stroke-width:0.39730874;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+    <path
+       style="display:inline;fill:none;fill-rule:evenodd;stroke:#384e54;stroke-width:0.39730874;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="m 4.3852457,1026.9152 c -1.158557,0.036 -1.346704,0.6303 -1.33881,0.6523"
+       id="path4499"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="display:inline;fill:none;fill-rule:evenodd;stroke:#384e54;stroke-width:0.39730874;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="m 26.630533,1027.1724 c 1.17043,-1.0835 2.02697,-0.7721 2.04417,-0.7463"
+       id="path4501"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="cc"
+       inkscape:connector-curvature="0"
+       id="path4503"
+       d="m 27.321773,1026.673 c 1.15856,0.036 1.3467,0.6302 1.3388,0.6522"
+       style="display:inline;fill:none;fill-rule:evenodd;stroke:#384e54;stroke-width:0.39730874;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+  </g>
+</svg>
diff --git a/_content/doc/gopher/fiveyears.jpg b/_content/doc/gopher/fiveyears.jpg
new file mode 100644
index 0000000..df10648
--- /dev/null
+++ b/_content/doc/gopher/fiveyears.jpg
Binary files differ
diff --git a/_content/doc/gopher/frontpage.png b/_content/doc/gopher/frontpage.png
new file mode 100644
index 0000000..1eb81f0
--- /dev/null
+++ b/_content/doc/gopher/frontpage.png
Binary files differ
diff --git a/_content/doc/gopher/gopherbw.png b/_content/doc/gopher/gopherbw.png
new file mode 100644
index 0000000..3bfe85d
--- /dev/null
+++ b/_content/doc/gopher/gopherbw.png
Binary files differ
diff --git a/_content/doc/gopher/gophercolor.png b/_content/doc/gopher/gophercolor.png
new file mode 100644
index 0000000..b5f8d01
--- /dev/null
+++ b/_content/doc/gopher/gophercolor.png
Binary files differ
diff --git a/_content/doc/gopher/gophercolor16x16.png b/_content/doc/gopher/gophercolor16x16.png
new file mode 100644
index 0000000..ec7028c
--- /dev/null
+++ b/_content/doc/gopher/gophercolor16x16.png
Binary files differ
diff --git a/_content/doc/gopher/help.png b/_content/doc/gopher/help.png
new file mode 100644
index 0000000..6ee5238
--- /dev/null
+++ b/_content/doc/gopher/help.png
Binary files differ
diff --git a/_content/doc/gopher/modelsheet.jpg b/_content/doc/gopher/modelsheet.jpg
new file mode 100644
index 0000000..c31e35a
--- /dev/null
+++ b/_content/doc/gopher/modelsheet.jpg
Binary files differ
diff --git a/_content/doc/gopher/pencil/gopherhat.jpg b/_content/doc/gopher/pencil/gopherhat.jpg
new file mode 100644
index 0000000..f34d7b3
--- /dev/null
+++ b/_content/doc/gopher/pencil/gopherhat.jpg
Binary files differ
diff --git a/_content/doc/gopher/pencil/gopherhelmet.jpg b/_content/doc/gopher/pencil/gopherhelmet.jpg
new file mode 100644
index 0000000..c7b6c61
--- /dev/null
+++ b/_content/doc/gopher/pencil/gopherhelmet.jpg
Binary files differ
diff --git a/_content/doc/gopher/pencil/gophermega.jpg b/_content/doc/gopher/pencil/gophermega.jpg
new file mode 100644
index 0000000..779fb07
--- /dev/null
+++ b/_content/doc/gopher/pencil/gophermega.jpg
Binary files differ
diff --git a/_content/doc/gopher/pencil/gopherrunning.jpg b/_content/doc/gopher/pencil/gopherrunning.jpg
new file mode 100644
index 0000000..eeeddf1
--- /dev/null
+++ b/_content/doc/gopher/pencil/gopherrunning.jpg
Binary files differ
diff --git a/_content/doc/gopher/pencil/gopherswim.jpg b/_content/doc/gopher/pencil/gopherswim.jpg
new file mode 100644
index 0000000..2f32877
--- /dev/null
+++ b/_content/doc/gopher/pencil/gopherswim.jpg
Binary files differ
diff --git a/_content/doc/gopher/pencil/gopherswrench.jpg b/_content/doc/gopher/pencil/gopherswrench.jpg
new file mode 100644
index 0000000..93005f4
--- /dev/null
+++ b/_content/doc/gopher/pencil/gopherswrench.jpg
Binary files differ
diff --git a/_content/doc/gopher/pkg.png b/_content/doc/gopher/pkg.png
new file mode 100644
index 0000000..ac96551
--- /dev/null
+++ b/_content/doc/gopher/pkg.png
Binary files differ
diff --git a/_content/doc/gopher/project.png b/_content/doc/gopher/project.png
new file mode 100644
index 0000000..24603f3
--- /dev/null
+++ b/_content/doc/gopher/project.png
Binary files differ
diff --git a/_content/doc/gopher/ref.png b/_content/doc/gopher/ref.png
new file mode 100644
index 0000000..0508f6e
--- /dev/null
+++ b/_content/doc/gopher/ref.png
Binary files differ
diff --git a/_content/doc/gopher/run.png b/_content/doc/gopher/run.png
new file mode 100644
index 0000000..eb690e3
--- /dev/null
+++ b/_content/doc/gopher/run.png
Binary files differ
diff --git a/_content/doc/gopher/talks.png b/_content/doc/gopher/talks.png
new file mode 100644
index 0000000..589db47
--- /dev/null
+++ b/_content/doc/gopher/talks.png
Binary files differ
diff --git a/_content/doc/help.html b/_content/doc/help.html
new file mode 100644
index 0000000..3d32ae5
--- /dev/null
+++ b/_content/doc/help.html
@@ -0,0 +1,96 @@
+<!--{
+	"Title": "Help",
+	"Path": "/help/",
+	"Template": true
+}-->
+
+<div id="manual-nav"></div>
+
+<h2 id="help">Get help</h2>
+
+<img class="gopher" src="/doc/gopher/help.png" alt=""/>
+
+{{if not $.GoogleCN}}
+<h3 id="mailinglist"><a href="https://groups.google.com/group/golang-nuts">Go Nuts Mailing List</a></h3>
+<p>
+Get help from Go users, and share your work on the official mailing list.
+</p>
+<p>
+Search the <a href="https://groups.google.com/group/golang-nuts">golang-nuts</a>
+archives and consult the <a href="/doc/go_faq.html">FAQ</a> and
+<a href="//golang.org/wiki">wiki</a> before posting.
+</p>
+
+<h3 id="forum"><a href="https://forum.golangbridge.org/">Go Forum</a></h3>
+<p>
+The <a href="https://forum.golangbridge.org/">Go Forum</a> is a discussion
+forum for Go programmers.
+</p>
+
+<h3 id="discord"><a href="https://discord.gg/64C346U">Gophers Discord</a></h3>
+<p>
+Get live support and talk with other gophers on the Go Discord.
+</p>
+
+<h3 id="slack"><a href="https://blog.gopheracademy.com/gophers-slack-community/">Gopher Slack</a></h3>
+<p>Get live support from other users in the Go slack channel.</p>
+
+<h3 id="irc"><a href="irc:irc.freenode.net/go-nuts">Go IRC Channel</a></h3>
+<p>Get live support at <b>#go-nuts</b> on <b>irc.freenode.net</b>, the official
+Go IRC channel.</p>
+{{end}}
+
+<h3 id="faq"><a href="/doc/faq">Frequently Asked Questions (FAQ)</a></h3>
+<p>Answers to common questions about Go.</p>
+
+{{if not $.GoogleCN}}
+<h2 id="inform">Stay informed</h2>
+
+<h3 id="announce"><a href="https://groups.google.com/group/golang-announce">Go Announcements Mailing List</a></h3>
+<p>
+Subscribe to
+<a href="https://groups.google.com/group/golang-announce">golang-announce</a>
+for important announcements, such as the availability of new Go releases.
+</p>
+
+<h3 id="blog"><a href="//blog.golang.org">Go Blog</a></h3>
+<p>The Go project's official blog.</p>
+
+<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="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
+for Go news and discussion.
+</p>
+
+<h3 id="gotime"><a href="https://changelog.com/gotime">Go Time Podcast</a></h3>
+<p>
+The <a href="https://changelog.com/gotime">Go Time podcast</a> is a panel of Go experts and special guests
+discussing the Go programming language, the community, and everything in between.
+</p>
+{{end}}
+
+<h2 id="community">Community resources</h2>
+
+<h3 id="go_user_groups"><a href="/wiki/GoUserGroups">Go User Groups</a></h3>
+<p>
+Each month in places around the world, groups of Go programmers ("gophers")
+meet to talk about Go. Find a chapter near you.
+</p>
+
+{{if not $.GoogleCN}}
+<h3 id="playground"><a href="/play">Go Playground</a></h3>
+<p>A place to write, run, and share Go code.</p>
+
+<h3 id="wiki"><a href="/wiki">Go Wiki</a></h3>
+<p>A wiki maintained by the Go community.</p>
+{{end}}
+
+<h3 id="conduct"><a href="/conduct">Code of Conduct</a></h3>
+<p>
+Guidelines for participating in Go community spaces
+and a reporting process for handling issues.
+</p>
+
diff --git a/_content/doc/ie.css b/_content/doc/ie.css
new file mode 100644
index 0000000..bb89d54
--- /dev/null
+++ b/_content/doc/ie.css
@@ -0,0 +1 @@
+#nav-main li { display: inline; }
diff --git a/_content/doc/play/fib.go b/_content/doc/play/fib.go
new file mode 100644
index 0000000..19e4721
--- /dev/null
+++ b/_content/doc/play/fib.go
@@ -0,0 +1,19 @@
+package main
+
+import "fmt"
+
+// fib returns a function that returns
+// successive Fibonacci numbers.
+func fib() func() int {
+	a, b := 0, 1
+	return func() int {
+		a, b = b, a+b
+		return a
+	}
+}
+
+func main() {
+	f := fib()
+	// Function calls are evaluated left-to-right.
+	fmt.Println(f(), f(), f(), f(), f())
+}
diff --git a/_content/doc/play/hello.go b/_content/doc/play/hello.go
new file mode 100644
index 0000000..3badf12
--- /dev/null
+++ b/_content/doc/play/hello.go
@@ -0,0 +1,9 @@
+// You can edit this code!
+// Click here and start typing.
+package main
+
+import "fmt"
+
+func main() {
+	fmt.Println("Hello, 世界")
+}
diff --git a/_content/doc/play/life.go b/_content/doc/play/life.go
new file mode 100644
index 0000000..51afb61
--- /dev/null
+++ b/_content/doc/play/life.go
@@ -0,0 +1,113 @@
+// An implementation of Conway's Game of Life.
+package main
+
+import (
+	"bytes"
+	"fmt"
+	"math/rand"
+	"time"
+)
+
+// Field represents a two-dimensional field of cells.
+type Field struct {
+	s    [][]bool
+	w, h int
+}
+
+// NewField returns an empty field of the specified width and height.
+func NewField(w, h int) *Field {
+	s := make([][]bool, h)
+	for i := range s {
+		s[i] = make([]bool, w)
+	}
+	return &Field{s: s, w: w, h: h}
+}
+
+// Set sets the state of the specified cell to the given value.
+func (f *Field) Set(x, y int, b bool) {
+	f.s[y][x] = b
+}
+
+// Alive reports whether the specified cell is alive.
+// If the x or y coordinates are outside the field boundaries they are wrapped
+// toroidally. For instance, an x value of -1 is treated as width-1.
+func (f *Field) Alive(x, y int) bool {
+	x += f.w
+	x %= f.w
+	y += f.h
+	y %= f.h
+	return f.s[y][x]
+}
+
+// Next returns the state of the specified cell at the next time step.
+func (f *Field) Next(x, y int) bool {
+	// Count the adjacent cells that are alive.
+	alive := 0
+	for i := -1; i <= 1; i++ {
+		for j := -1; j <= 1; j++ {
+			if (j != 0 || i != 0) && f.Alive(x+i, y+j) {
+				alive++
+			}
+		}
+	}
+	// Return next state according to the game rules:
+	//   exactly 3 neighbors: on,
+	//   exactly 2 neighbors: maintain current state,
+	//   otherwise: off.
+	return alive == 3 || alive == 2 && f.Alive(x, y)
+}
+
+// Life stores the state of a round of Conway's Game of Life.
+type Life struct {
+	a, b *Field
+	w, h int
+}
+
+// NewLife returns a new Life game state with a random initial state.
+func NewLife(w, h int) *Life {
+	a := NewField(w, h)
+	for i := 0; i < (w * h / 4); i++ {
+		a.Set(rand.Intn(w), rand.Intn(h), true)
+	}
+	return &Life{
+		a: a, b: NewField(w, h),
+		w: w, h: h,
+	}
+}
+
+// Step advances the game by one instant, recomputing and updating all cells.
+func (l *Life) Step() {
+	// Update the state of the next field (b) from the current field (a).
+	for y := 0; y < l.h; y++ {
+		for x := 0; x < l.w; x++ {
+			l.b.Set(x, y, l.a.Next(x, y))
+		}
+	}
+	// Swap fields a and b.
+	l.a, l.b = l.b, l.a
+}
+
+// String returns the game board as a string.
+func (l *Life) String() string {
+	var buf bytes.Buffer
+	for y := 0; y < l.h; y++ {
+		for x := 0; x < l.w; x++ {
+			b := byte(' ')
+			if l.a.Alive(x, y) {
+				b = '*'
+			}
+			buf.WriteByte(b)
+		}
+		buf.WriteByte('\n')
+	}
+	return buf.String()
+}
+
+func main() {
+	l := NewLife(40, 15)
+	for i := 0; i < 300; i++ {
+		l.Step()
+		fmt.Print("\x0c", l) // Clear screen and print field.
+		time.Sleep(time.Second / 30)
+	}
+}
diff --git a/_content/doc/play/peano.go b/_content/doc/play/peano.go
new file mode 100644
index 0000000..214fe1b
--- /dev/null
+++ b/_content/doc/play/peano.go
@@ -0,0 +1,88 @@
+// Peano integers are represented by a linked
+// list whose nodes contain no data
+// (the nodes are the data).
+// http://en.wikipedia.org/wiki/Peano_axioms
+
+// This program demonstrates that Go's automatic
+// stack management can handle heavily recursive
+// computations.
+
+package main
+
+import "fmt"
+
+// Number is a pointer to a Number
+type Number *Number
+
+// The arithmetic value of a Number is the
+// count of the nodes comprising the list.
+// (See the count function below.)
+
+// -------------------------------------
+// Peano primitives
+
+func zero() *Number {
+	return nil
+}
+
+func isZero(x *Number) bool {
+	return x == nil
+}
+
+func add1(x *Number) *Number {
+	e := new(Number)
+	*e = x
+	return e
+}
+
+func sub1(x *Number) *Number {
+	return *x
+}
+
+func add(x, y *Number) *Number {
+	if isZero(y) {
+		return x
+	}
+	return add(add1(x), sub1(y))
+}
+
+func mul(x, y *Number) *Number {
+	if isZero(x) || isZero(y) {
+		return zero()
+	}
+	return add(mul(x, sub1(y)), x)
+}
+
+func fact(n *Number) *Number {
+	if isZero(n) {
+		return add1(zero())
+	}
+	return mul(fact(sub1(n)), n)
+}
+
+// -------------------------------------
+// Helpers to generate/count Peano integers
+
+func gen(n int) *Number {
+	if n > 0 {
+		return add1(gen(n - 1))
+	}
+	return zero()
+}
+
+func count(x *Number) int {
+	if isZero(x) {
+		return 0
+	}
+	return count(sub1(x)) + 1
+}
+
+// -------------------------------------
+// Print i! for i in [0,9]
+
+func main() {
+	for i := 0; i <= 9; i++ {
+		f := count(fact(gen(i)))
+		fmt.Println(i, "! =", f)
+	}
+}
diff --git a/_content/doc/play/pi.go b/_content/doc/play/pi.go
new file mode 100644
index 0000000..f61884e
--- /dev/null
+++ b/_content/doc/play/pi.go
@@ -0,0 +1,34 @@
+// Concurrent computation of pi.
+// See https://goo.gl/la6Kli.
+//
+// This demonstrates Go's ability to handle
+// large numbers of concurrent processes.
+// It is an unreasonable way to calculate pi.
+package main
+
+import (
+	"fmt"
+	"math"
+)
+
+func main() {
+	fmt.Println(pi(5000))
+}
+
+// pi launches n goroutines to compute an
+// approximation of pi.
+func pi(n int) float64 {
+	ch := make(chan float64)
+	for k := 0; k <= n; k++ {
+		go term(ch, float64(k))
+	}
+	f := 0.0
+	for k := 0; k <= n; k++ {
+		f += <-ch
+	}
+	return f
+}
+
+func term(ch chan float64, k float64) {
+	ch <- 4 * math.Pow(-1, k) / (2*k + 1)
+}
diff --git a/_content/doc/play/sieve.go b/_content/doc/play/sieve.go
new file mode 100644
index 0000000..5190934
--- /dev/null
+++ b/_content/doc/play/sieve.go
@@ -0,0 +1,36 @@
+// A concurrent prime sieve
+
+package main
+
+import "fmt"
+
+// Send the sequence 2, 3, 4, ... to channel 'ch'.
+func Generate(ch chan<- int) {
+	for i := 2; ; i++ {
+		ch <- i // Send 'i' to channel 'ch'.
+	}
+}
+
+// Copy the values from channel 'in' to channel 'out',
+// removing those divisible by 'prime'.
+func Filter(in <-chan int, out chan<- int, prime int) {
+	for {
+		i := <-in // Receive value from 'in'.
+		if i%prime != 0 {
+			out <- i // Send 'i' to 'out'.
+		}
+	}
+}
+
+// The prime sieve: Daisy-chain Filter processes.
+func main() {
+	ch := make(chan int) // Create a new channel.
+	go Generate(ch)      // Launch Generate goroutine.
+	for i := 0; i < 10; i++ {
+		prime := <-ch
+		fmt.Println(prime)
+		ch1 := make(chan int)
+		go Filter(ch, ch1, prime)
+		ch = ch1
+	}
+}
diff --git a/_content/doc/play/solitaire.go b/_content/doc/play/solitaire.go
new file mode 100644
index 0000000..15022aa
--- /dev/null
+++ b/_content/doc/play/solitaire.go
@@ -0,0 +1,117 @@
+// This program solves the (English) peg
+// solitaire board game.
+// http://en.wikipedia.org/wiki/Peg_solitaire
+
+package main
+
+import "fmt"
+
+const N = 11 + 1 // length of a row (+1 for \n)
+
+// The board must be surrounded by 2 illegal
+// fields in each direction so that move()
+// doesn't need to check the board boundaries.
+// Periods represent illegal fields,
+// ● are pegs, and ○ are holes.
+
+var board = []rune(
+	`...........
+...........
+....●●●....
+....●●●....
+..●●●●●●●..
+..●●●○●●●..
+..●●●●●●●..
+....●●●....
+....●●●....
+...........
+...........
+`)
+
+// center is the position of the center hole if
+// there is a single one; otherwise it is -1.
+var center int
+
+func init() {
+	n := 0
+	for pos, field := range board {
+		if field == '○' {
+			center = pos
+			n++
+		}
+	}
+	if n != 1 {
+		center = -1 // no single hole
+	}
+}
+
+var moves int // number of times move is called
+
+// move tests if there is a peg at position pos that
+// can jump over another peg in direction dir. If the
+// move is valid, it is executed and move returns true.
+// Otherwise, move returns false.
+func move(pos, dir int) bool {
+	moves++
+	if board[pos] == '●' && board[pos+dir] == '●' && board[pos+2*dir] == '○' {
+		board[pos] = '○'
+		board[pos+dir] = '○'
+		board[pos+2*dir] = '●'
+		return true
+	}
+	return false
+}
+
+// unmove reverts a previously executed valid move.
+func unmove(pos, dir int) {
+	board[pos] = '●'
+	board[pos+dir] = '●'
+	board[pos+2*dir] = '○'
+}
+
+// solve tries to find a sequence of moves such that
+// there is only one peg left at the end; if center is
+// >= 0, that last peg must be in the center position.
+// If a solution is found, solve prints the board after
+// each move in a backward fashion (i.e., the last
+// board position is printed first, all the way back to
+// the starting board position).
+func solve() bool {
+	var last, n int
+	for pos, field := range board {
+		// try each board position
+		if field == '●' {
+			// found a peg
+			for _, dir := range [...]int{-1, -N, +1, +N} {
+				// try each direction
+				if move(pos, dir) {
+					// a valid move was found and executed,
+					// see if this new board has a solution
+					if solve() {
+						unmove(pos, dir)
+						fmt.Println(string(board))
+						return true
+					}
+					unmove(pos, dir)
+				}
+			}
+			last = pos
+			n++
+		}
+	}
+	// tried each possible move
+	if n == 1 && (center < 0 || last == center) {
+		// there's only one peg left
+		fmt.Println(string(board))
+		return true
+	}
+	// no solution found for this board
+	return false
+}
+
+func main() {
+	if !solve() {
+		fmt.Println("no solution found")
+	}
+	fmt.Println(moves, "moves tried")
+}
diff --git a/_content/doc/play/tree.go b/_content/doc/play/tree.go
new file mode 100644
index 0000000..3790e6c
--- /dev/null
+++ b/_content/doc/play/tree.go
@@ -0,0 +1,100 @@
+// Go's concurrency primitives make it easy to
+// express concurrent concepts, such as
+// this binary tree comparison.
+//
+// Trees may be of different shapes,
+// but have the same contents. For example:
+//
+//        4               6
+//      2   6          4     7
+//     1 3 5 7       2   5
+//                  1 3
+//
+// This program compares a pair of trees by
+// walking each in its own goroutine,
+// sending their contents through a channel
+// to a third goroutine that compares them.
+
+package main
+
+import (
+	"fmt"
+	"math/rand"
+)
+
+// A Tree is a binary tree with integer values.
+type Tree struct {
+	Left  *Tree
+	Value int
+	Right *Tree
+}
+
+// Walk traverses a tree depth-first,
+// sending each Value on a channel.
+func Walk(t *Tree, ch chan int) {
+	if t == nil {
+		return
+	}
+	Walk(t.Left, ch)
+	ch <- t.Value
+	Walk(t.Right, ch)
+}
+
+// Walker launches Walk in a new goroutine,
+// and returns a read-only channel of values.
+func Walker(t *Tree) <-chan int {
+	ch := make(chan int)
+	go func() {
+		Walk(t, ch)
+		close(ch)
+	}()
+	return ch
+}
+
+// Compare reads values from two Walkers
+// that run simultaneously, and returns true
+// if t1 and t2 have the same contents.
+func Compare(t1, t2 *Tree) bool {
+	c1, c2 := Walker(t1), Walker(t2)
+	for {
+		v1, ok1 := <-c1
+		v2, ok2 := <-c2
+		if !ok1 || !ok2 {
+			return ok1 == ok2
+		}
+		if v1 != v2 {
+			break
+		}
+	}
+	return false
+}
+
+// New returns a new, random binary tree
+// holding the values 1k, 2k, ..., nk.
+func New(n, k int) *Tree {
+	var t *Tree
+	for _, v := range rand.Perm(n) {
+		t = insert(t, (1+v)*k)
+	}
+	return t
+}
+
+func insert(t *Tree, v int) *Tree {
+	if t == nil {
+		return &Tree{nil, v, nil}
+	}
+	if v < t.Value {
+		t.Left = insert(t.Left, v)
+		return t
+	}
+	t.Right = insert(t.Right, v)
+	return t
+}
+
+func main() {
+	t1 := New(100, 1)
+	fmt.Println(Compare(t1, New(100, 1)), "Same Contents")
+	fmt.Println(Compare(t1, New(99, 1)), "Differing Sizes")
+	fmt.Println(Compare(t1, New(100, 2)), "Differing Values")
+	fmt.Println(Compare(t1, New(101, 2)), "Dissimilar")
+}
diff --git a/_content/doc/progs/cgo1.go b/_content/doc/progs/cgo1.go
new file mode 100644
index 0000000..d559e13
--- /dev/null
+++ b/_content/doc/progs/cgo1.go
@@ -0,0 +1,22 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package rand
+
+/*
+#include <stdlib.h>
+*/
+import "C"
+
+// STOP OMIT
+func Random() int {
+	return int(C.rand())
+}
+
+// STOP OMIT
+func Seed(i int) {
+	C.srand(C.uint(i))
+}
+
+// END OMIT
diff --git a/_content/doc/progs/cgo2.go b/_content/doc/progs/cgo2.go
new file mode 100644
index 0000000..da07aa4
--- /dev/null
+++ b/_content/doc/progs/cgo2.go
@@ -0,0 +1,22 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package rand2
+
+/*
+#include <stdlib.h>
+*/
+import "C"
+
+func Random() int {
+	var r C.int = C.rand()
+	return int(r)
+}
+
+// STOP OMIT
+func Seed(i int) {
+	C.srand(C.uint(i))
+}
+
+// END OMIT
diff --git a/_content/doc/progs/cgo3.go b/_content/doc/progs/cgo3.go
new file mode 100644
index 0000000..d5cedf4
--- /dev/null
+++ b/_content/doc/progs/cgo3.go
@@ -0,0 +1,18 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package print
+
+// #include <stdio.h>
+// #include <stdlib.h>
+import "C"
+import "unsafe"
+
+func Print(s string) {
+	cs := C.CString(s)
+	C.fputs(cs, (*C.FILE)(C.stdout))
+	C.free(unsafe.Pointer(cs))
+}
+
+// END OMIT
diff --git a/_content/doc/progs/cgo4.go b/_content/doc/progs/cgo4.go
new file mode 100644
index 0000000..dbb07e8
--- /dev/null
+++ b/_content/doc/progs/cgo4.go
@@ -0,0 +1,18 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package print
+
+// #include <stdio.h>
+// #include <stdlib.h>
+import "C"
+import "unsafe"
+
+func Print(s string) {
+	cs := C.CString(s)
+	defer C.free(unsafe.Pointer(cs))
+	C.fputs(cs, (*C.FILE)(C.stdout))
+}
+
+// END OMIT
diff --git a/_content/doc/progs/defer.go b/_content/doc/progs/defer.go
new file mode 100644
index 0000000..2e11020
--- /dev/null
+++ b/_content/doc/progs/defer.go
@@ -0,0 +1,64 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This file contains the code snippets included in "Defer, Panic, and Recover."
+
+package main
+
+import (
+	"fmt"
+	"io"
+	"os"
+)
+
+func a() {
+	i := 0
+	defer fmt.Println(i)
+	i++
+	return
+}
+
+// STOP OMIT
+
+func b() {
+	for i := 0; i < 4; i++ {
+		defer fmt.Print(i)
+	}
+}
+
+// STOP OMIT
+
+func c() (i int) {
+	defer func() { i++ }()
+	return 1
+}
+
+// STOP OMIT
+
+// Initial version.
+func CopyFile(dstName, srcName string) (written int64, err error) {
+	src, err := os.Open(srcName)
+	if err != nil {
+		return
+	}
+
+	dst, err := os.Create(dstName)
+	if err != nil {
+		return
+	}
+
+	written, err = io.Copy(dst, src)
+	dst.Close()
+	src.Close()
+	return
+}
+
+// STOP OMIT
+
+func main() {
+	a()
+	b()
+	fmt.Println()
+	fmt.Println(c())
+}
diff --git a/_content/doc/progs/defer2.go b/_content/doc/progs/defer2.go
new file mode 100644
index 0000000..cad66b0
--- /dev/null
+++ b/_content/doc/progs/defer2.go
@@ -0,0 +1,58 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This file contains the code snippets included in "Defer, Panic, and Recover."
+
+package main
+
+import "fmt"
+import "io" // OMIT
+import "os" // OMIT
+
+func main() {
+	f()
+	fmt.Println("Returned normally from f.")
+}
+
+func f() {
+	defer func() {
+		if r := recover(); r != nil {
+			fmt.Println("Recovered in f", r)
+		}
+	}()
+	fmt.Println("Calling g.")
+	g(0)
+	fmt.Println("Returned normally from g.")
+}
+
+func g(i int) {
+	if i > 3 {
+		fmt.Println("Panicking!")
+		panic(fmt.Sprintf("%v", i))
+	}
+	defer fmt.Println("Defer in g", i)
+	fmt.Println("Printing in g", i)
+	g(i + 1)
+}
+
+// STOP OMIT
+
+// Revised version.
+func CopyFile(dstName, srcName string) (written int64, err error) {
+	src, err := os.Open(srcName)
+	if err != nil {
+		return
+	}
+	defer src.Close()
+
+	dst, err := os.Create(dstName)
+	if err != nil {
+		return
+	}
+	defer dst.Close()
+
+	return io.Copy(dst, src)
+}
+
+// STOP OMIT
diff --git a/_content/doc/progs/eff_bytesize.go b/_content/doc/progs/eff_bytesize.go
new file mode 100644
index 0000000..b459611
--- /dev/null
+++ b/_content/doc/progs/eff_bytesize.go
@@ -0,0 +1,47 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "fmt"
+
+type ByteSize float64
+
+const (
+	_           = iota // ignore first value by assigning to blank identifier
+	KB ByteSize = 1 << (10 * iota)
+	MB
+	GB
+	TB
+	PB
+	EB
+	ZB
+	YB
+)
+
+func (b ByteSize) String() string {
+	switch {
+	case b >= YB:
+		return fmt.Sprintf("%.2fYB", b/YB)
+	case b >= ZB:
+		return fmt.Sprintf("%.2fZB", b/ZB)
+	case b >= EB:
+		return fmt.Sprintf("%.2fEB", b/EB)
+	case b >= PB:
+		return fmt.Sprintf("%.2fPB", b/PB)
+	case b >= TB:
+		return fmt.Sprintf("%.2fTB", b/TB)
+	case b >= GB:
+		return fmt.Sprintf("%.2fGB", b/GB)
+	case b >= MB:
+		return fmt.Sprintf("%.2fMB", b/MB)
+	case b >= KB:
+		return fmt.Sprintf("%.2fKB", b/KB)
+	}
+	return fmt.Sprintf("%.2fB", b)
+}
+
+func main() {
+	fmt.Println(YB, ByteSize(1e13))
+}
diff --git a/_content/doc/progs/eff_qr.go b/_content/doc/progs/eff_qr.go
new file mode 100644
index 0000000..f2055f0
--- /dev/null
+++ b/_content/doc/progs/eff_qr.go
@@ -0,0 +1,50 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"flag"
+	"html/template"
+	"log"
+	"net/http"
+)
+
+var addr = flag.String("addr", ":1718", "http service address") // Q=17, R=18
+
+var templ = template.Must(template.New("qr").Parse(templateStr))
+
+func main() {
+	flag.Parse()
+	http.Handle("/", http.HandlerFunc(QR))
+	err := http.ListenAndServe(*addr, nil)
+	if err != nil {
+		log.Fatal("ListenAndServe:", err)
+	}
+}
+
+func QR(w http.ResponseWriter, req *http.Request) {
+	templ.Execute(w, req.FormValue("s"))
+}
+
+const templateStr = `
+<html>
+<head>
+<title>QR Link Generator</title>
+</head>
+<body>
+{{if .}}
+<img src="http://chart.apis.google.com/chart?chs=300x300&cht=qr&choe=UTF-8&chl={{.}}" />
+<br>
+{{.}}
+<br>
+<br>
+{{end}}
+<form action="/" name=f method="GET">
+	<input maxLength=1024 size=70 name=s value="" title="Text to QR Encode">
+	<input type=submit value="Show QR" name=qr>
+</form>
+</body>
+</html>
+`
diff --git a/_content/doc/progs/eff_sequence.go b/_content/doc/progs/eff_sequence.go
new file mode 100644
index 0000000..ab1826b
--- /dev/null
+++ b/_content/doc/progs/eff_sequence.go
@@ -0,0 +1,49 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"fmt"
+	"sort"
+)
+
+func main() {
+	seq := Sequence{6, 2, -1, 44, 16}
+	sort.Sort(seq)
+	fmt.Println(seq)
+}
+
+type Sequence []int
+
+// Methods required by sort.Interface.
+func (s Sequence) Len() int {
+	return len(s)
+}
+func (s Sequence) Less(i, j int) bool {
+	return s[i] < s[j]
+}
+func (s Sequence) Swap(i, j int) {
+	s[i], s[j] = s[j], s[i]
+}
+
+// Copy returns a copy of the Sequence.
+func (s Sequence) Copy() Sequence {
+	copy := make(Sequence, 0, len(s))
+	return append(copy, s...)
+}
+
+// Method for printing - sorts the elements before printing.
+func (s Sequence) String() string {
+	s = s.Copy() // Make a copy; don't overwrite argument.
+	sort.Sort(s)
+	str := "["
+	for i, elem := range s { // Loop is O(N²); will fix that in next example.
+		if i > 0 {
+			str += " "
+		}
+		str += fmt.Sprint(elem)
+	}
+	return str + "]"
+}
diff --git a/_content/doc/progs/eff_unused1.go b/_content/doc/progs/eff_unused1.go
new file mode 100644
index 0000000..285d55e
--- /dev/null
+++ b/_content/doc/progs/eff_unused1.go
@@ -0,0 +1,16 @@
+package main
+
+import (
+	"fmt"
+	"io"
+	"log"
+	"os"
+)
+
+func main() {
+	fd, err := os.Open("test.go")
+	if err != nil {
+		log.Fatal(err)
+	}
+	// TODO: use fd.
+}
diff --git a/_content/doc/progs/eff_unused2.go b/_content/doc/progs/eff_unused2.go
new file mode 100644
index 0000000..92eb74e
--- /dev/null
+++ b/_content/doc/progs/eff_unused2.go
@@ -0,0 +1,20 @@
+package main
+
+import (
+	"fmt"
+	"io"
+	"log"
+	"os"
+)
+
+var _ = fmt.Printf // For debugging; delete when done.
+var _ io.Reader    // For debugging; delete when done.
+
+func main() {
+	fd, err := os.Open("test.go")
+	if err != nil {
+		log.Fatal(err)
+	}
+	// TODO: use fd.
+	_ = fd
+}
diff --git a/_content/doc/progs/error.go b/_content/doc/progs/error.go
new file mode 100644
index 0000000..e776cdb
--- /dev/null
+++ b/_content/doc/progs/error.go
@@ -0,0 +1,127 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This file contains the code snippets included in "Error Handling and Go."
+
+package main
+
+import (
+	"encoding/json"
+	"errors"
+	"fmt"
+	"log"
+	"net"
+	"os"
+	"time"
+)
+
+type File struct{}
+
+func Open(name string) (file *File, err error) {
+	// OMIT
+	panic(1)
+	// STOP OMIT
+}
+
+func openFile() { // OMIT
+	f, err := os.Open("filename.ext")
+	if err != nil {
+		log.Fatal(err)
+	}
+	// do something with the open *File f
+	// STOP OMIT
+	_ = f
+}
+
+// errorString is a trivial implementation of error.
+type errorString struct {
+	s string
+}
+
+func (e *errorString) Error() string {
+	return e.s
+}
+
+// STOP OMIT
+
+// New returns an error that formats as the given text.
+func New(text string) error {
+	return &errorString{text}
+}
+
+// STOP OMIT
+
+func Sqrt(f float64) (float64, error) {
+	if f < 0 {
+		return 0, errors.New("math: square root of negative number")
+	}
+	// implementation
+	return 0, nil // OMIT
+}
+
+// STOP OMIT
+
+func printErr() (int, error) { // OMIT
+	f, err := Sqrt(-1)
+	if err != nil {
+		fmt.Println(err)
+	}
+	// STOP OMIT
+	// fmtError OMIT
+	if f < 0 {
+		return 0, fmt.Errorf("math: square root of negative number %g", f)
+	}
+	// STOP OMIT
+	return 0, nil
+}
+
+type NegativeSqrtError float64
+
+func (f NegativeSqrtError) Error() string {
+	return fmt.Sprintf("math: square root of negative number %g", float64(f))
+}
+
+// STOP OMIT
+
+type SyntaxError struct {
+	msg    string // description of error
+	Offset int64  // error occurred after reading Offset bytes
+}
+
+func (e *SyntaxError) Error() string { return e.msg }
+
+// STOP OMIT
+
+func decodeError(dec *json.Decoder, val struct{}) error { // OMIT
+	var f os.FileInfo // OMIT
+	if err := dec.Decode(&val); err != nil {
+		if serr, ok := err.(*json.SyntaxError); ok {
+			line, col := findLine(f, serr.Offset)
+			return fmt.Errorf("%s:%d:%d: %v", f.Name(), line, col, err)
+		}
+		return err
+	}
+	// STOP OMIT
+	return nil
+}
+
+func findLine(os.FileInfo, int64) (int, int) {
+	// place holder; no need to run
+	return 0, 0
+}
+
+func netError(err error) { // OMIT
+	for { // OMIT
+		if nerr, ok := err.(net.Error); ok && nerr.Temporary() {
+			time.Sleep(1e9)
+			continue
+		}
+		if err != nil {
+			log.Fatal(err)
+		}
+		// STOP OMIT
+	}
+}
+
+func main() {}
diff --git a/_content/doc/progs/error2.go b/_content/doc/progs/error2.go
new file mode 100644
index 0000000..086b671
--- /dev/null
+++ b/_content/doc/progs/error2.go
@@ -0,0 +1,54 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This file contains the code snippets included in "Error Handling and Go."
+
+package main
+
+import (
+	"net/http"
+	"text/template"
+)
+
+func init() {
+	http.HandleFunc("/view", viewRecord)
+}
+
+func viewRecord(w http.ResponseWriter, r *http.Request) {
+	c := appengine.NewContext(r)
+	key := datastore.NewKey(c, "Record", r.FormValue("id"), 0, nil)
+	record := new(Record)
+	if err := datastore.Get(c, key, record); err != nil {
+		http.Error(w, err.Error(), http.StatusInternalServerError)
+		return
+	}
+	if err := viewTemplate.Execute(w, record); err != nil {
+		http.Error(w, err.Error(), http.StatusInternalServerError)
+	}
+}
+
+// STOP OMIT
+
+type ap struct{}
+
+func (ap) NewContext(*http.Request) *ctx { return nil }
+
+type ctx struct{}
+
+func (*ctx) Errorf(string, ...interface{}) {}
+
+var appengine ap
+
+type ds struct{}
+
+func (ds) NewKey(*ctx, string, string, int, *int) string { return "" }
+func (ds) Get(*ctx, string, *Record) error               { return nil }
+
+var datastore ds
+
+type Record struct{}
+
+var viewTemplate *template.Template
+
+func main() {}
diff --git a/_content/doc/progs/error3.go b/_content/doc/progs/error3.go
new file mode 100644
index 0000000..d9e56b5
--- /dev/null
+++ b/_content/doc/progs/error3.go
@@ -0,0 +1,63 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This file contains the code snippets included in "Error Handling and Go."
+
+package main
+
+import (
+	"net/http"
+	"text/template"
+)
+
+func init() {
+	http.Handle("/view", appHandler(viewRecord))
+}
+
+// STOP OMIT
+
+func viewRecord(w http.ResponseWriter, r *http.Request) error {
+	c := appengine.NewContext(r)
+	key := datastore.NewKey(c, "Record", r.FormValue("id"), 0, nil)
+	record := new(Record)
+	if err := datastore.Get(c, key, record); err != nil {
+		return err
+	}
+	return viewTemplate.Execute(w, record)
+}
+
+// STOP OMIT
+
+type appHandler func(http.ResponseWriter, *http.Request) error
+
+func (fn appHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
+	if err := fn(w, r); err != nil {
+		http.Error(w, err.Error(), http.StatusInternalServerError)
+	}
+}
+
+// STOP OMIT
+
+type ap struct{}
+
+func (ap) NewContext(*http.Request) *ctx { return nil }
+
+type ctx struct{}
+
+func (*ctx) Errorf(string, ...interface{}) {}
+
+var appengine ap
+
+type ds struct{}
+
+func (ds) NewKey(*ctx, string, string, int, *int) string { return "" }
+func (ds) Get(*ctx, string, *Record) error               { return nil }
+
+var datastore ds
+
+type Record struct{}
+
+var viewTemplate *template.Template
+
+func main() {}
diff --git a/_content/doc/progs/error4.go b/_content/doc/progs/error4.go
new file mode 100644
index 0000000..8b2f304
--- /dev/null
+++ b/_content/doc/progs/error4.go
@@ -0,0 +1,74 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This file contains the code snippets included in "Error Handling and Go."
+
+package main
+
+import (
+	"net/http"
+	"text/template"
+)
+
+type appError struct {
+	Error   error
+	Message string
+	Code    int
+}
+
+// STOP OMIT
+
+type appHandler func(http.ResponseWriter, *http.Request) *appError
+
+func (fn appHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
+	if e := fn(w, r); e != nil { // e is *appError, not error.
+		c := appengine.NewContext(r)
+		c.Errorf("%v", e.Error)
+		http.Error(w, e.Message, e.Code)
+	}
+}
+
+// STOP OMIT
+
+func viewRecord(w http.ResponseWriter, r *http.Request) *appError {
+	c := appengine.NewContext(r)
+	key := datastore.NewKey(c, "Record", r.FormValue("id"), 0, nil)
+	record := new(Record)
+	if err := datastore.Get(c, key, record); err != nil {
+		return &appError{err, "Record not found", 404}
+	}
+	if err := viewTemplate.Execute(w, record); err != nil {
+		return &appError{err, "Can't display record", 500}
+	}
+	return nil
+}
+
+// STOP OMIT
+
+func init() {
+	http.Handle("/view", appHandler(viewRecord))
+}
+
+type ap struct{}
+
+func (ap) NewContext(*http.Request) *ctx { return nil }
+
+type ctx struct{}
+
+func (*ctx) Errorf(string, ...interface{}) {}
+
+var appengine ap
+
+type ds struct{}
+
+func (ds) NewKey(*ctx, string, string, int, *int) string { return "" }
+func (ds) Get(*ctx, string, *Record) error               { return nil }
+
+var datastore ds
+
+type Record struct{}
+
+var viewTemplate *template.Template
+
+func main() {}
diff --git a/_content/doc/progs/go1.go b/_content/doc/progs/go1.go
new file mode 100644
index 0000000..50fd934
--- /dev/null
+++ b/_content/doc/progs/go1.go
@@ -0,0 +1,245 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This file contains examples to embed in the Go 1 release notes document.
+
+package main
+
+import (
+	"errors"
+	"flag"
+	"fmt"
+	"log"
+	"os"
+	"path/filepath"
+	"testing"
+	"time"
+	"unicode"
+)
+
+func main() {
+	flag.Parse()
+	stringAppend()
+	mapDelete()
+	mapIteration()
+	multipleAssignment()
+	structEquality()
+	compositeLiterals()
+	runeType()
+	errorExample()
+	timePackage()
+	walkExample()
+	osIsExist()
+}
+
+var timeout = flag.Duration("timeout", 30*time.Second, "how long to wait for completion")
+
+func init() {
+	// canonicalize the logging
+	log.SetFlags(0)
+}
+
+func mapDelete() {
+	m := map[string]int{"7": 7, "23": 23}
+	k := "7"
+	delete(m, k)
+	if m["7"] != 0 || m["23"] != 23 {
+		log.Fatal("mapDelete:", m)
+	}
+}
+
+func stringAppend() {
+	greeting := []byte{}
+	greeting = append(greeting, []byte("hello ")...)
+	greeting = append(greeting, "world"...)
+	if string(greeting) != "hello world" {
+		log.Fatal("stringAppend: ", string(greeting))
+	}
+}
+
+func mapIteration() {
+	m := map[string]int{"Sunday": 0, "Monday": 1}
+	for name, value := range m {
+		// This loop should not assume Sunday will be visited first.
+		f(name, value)
+	}
+}
+
+func f(string, int) {
+}
+
+func assert(t bool) {
+	if !t {
+		log.Panic("assertion fail")
+	}
+}
+
+func multipleAssignment() {
+	sa := []int{1, 2, 3}
+	i := 0
+	i, sa[i] = 1, 2 // sets i = 1, sa[0] = 2
+
+	sb := []int{1, 2, 3}
+	j := 0
+	sb[j], j = 2, 1 // sets sb[0] = 2, j = 1
+
+	sc := []int{1, 2, 3}
+	sc[0], sc[0] = 1, 2 // sets sc[0] = 1, then sc[0] = 2 (so sc[0] = 2 at end)
+
+	assert(i == 1 && sa[0] == 2)
+	assert(j == 1 && sb[0] == 2)
+	assert(sc[0] == 2)
+}
+
+func structEquality() {
+	type Day struct {
+		long  string
+		short string
+	}
+	Christmas := Day{"Christmas", "XMas"}
+	Thanksgiving := Day{"Thanksgiving", "Turkey"}
+	holiday := map[Day]bool{
+		Christmas:    true,
+		Thanksgiving: true,
+	}
+	fmt.Printf("Christmas is a holiday: %t\n", holiday[Christmas])
+}
+
+func compositeLiterals() {
+	type Date struct {
+		month string
+		day   int
+	}
+	// Struct values, fully qualified; always legal.
+	holiday1 := []Date{
+		Date{"Feb", 14},
+		Date{"Nov", 11},
+		Date{"Dec", 25},
+	}
+	// Struct values, type name elided; always legal.
+	holiday2 := []Date{
+		{"Feb", 14},
+		{"Nov", 11},
+		{"Dec", 25},
+	}
+	// Pointers, fully qualified, always legal.
+	holiday3 := []*Date{
+		&Date{"Feb", 14},
+		&Date{"Nov", 11},
+		&Date{"Dec", 25},
+	}
+	// Pointers, type name elided; legal in Go 1.
+	holiday4 := []*Date{
+		{"Feb", 14},
+		{"Nov", 11},
+		{"Dec", 25},
+	}
+	// STOP OMIT
+	_, _, _, _ = holiday1, holiday2, holiday3, holiday4
+}
+
+func runeType() {
+	// STARTRUNE OMIT
+	delta := 'δ' // delta has type rune.
+	var DELTA rune
+	DELTA = unicode.ToUpper(delta)
+	epsilon := unicode.ToLower(DELTA + 1)
+	if epsilon != 'δ'+1 {
+		log.Fatal("inconsistent casing for Greek")
+	}
+	// ENDRUNE OMIT
+}
+
+// START ERROR EXAMPLE OMIT
+type SyntaxError struct {
+	File    string
+	Line    int
+	Message string
+}
+
+func (se *SyntaxError) Error() string {
+	return fmt.Sprintf("%s:%d: %s", se.File, se.Line, se.Message)
+}
+
+// END ERROR EXAMPLE OMIT
+
+func errorExample() {
+	var ErrSyntax = errors.New("syntax error")
+	_ = ErrSyntax
+	se := &SyntaxError{"file", 7, "error"}
+	got := fmt.Sprint(se)
+	const expect = "file:7: error"
+	if got != expect {
+		log.Fatalf("errorsPackage: expected %q got %q", expect, got)
+	}
+}
+
+// sleepUntil sleeps until the specified time. It returns immediately if it's too late.
+func sleepUntil(wakeup time.Time) {
+	now := time.Now() // A Time.
+	if !wakeup.After(now) {
+		return
+	}
+	delta := wakeup.Sub(now) // A Duration.
+	fmt.Printf("Sleeping for %.3fs\n", delta.Seconds())
+	time.Sleep(delta)
+}
+
+func timePackage() {
+	sleepUntil(time.Now().Add(123 * time.Millisecond))
+}
+
+func walkExample() {
+	// STARTWALK OMIT
+	markFn := func(path string, info os.FileInfo, err error) error {
+		if path == "pictures" { // Will skip walking of directory pictures and its contents.
+			return filepath.SkipDir
+		}
+		if err != nil {
+			return err
+		}
+		log.Println(path)
+		return nil
+	}
+	err := filepath.Walk(".", markFn)
+	if err != nil {
+		log.Fatal(err)
+	}
+	// ENDWALK OMIT
+}
+
+func initializationFunction(c chan int) {
+	c <- 1
+}
+
+var PackageGlobal int
+
+func init() {
+	c := make(chan int)
+	go initializationFunction(c)
+	PackageGlobal = <-c
+}
+
+func BenchmarkSprintf(b *testing.B) {
+	// Verify correctness before running benchmark.
+	b.StopTimer()
+	got := fmt.Sprintf("%x", 23)
+	const expect = "17"
+	if expect != got {
+		b.Fatalf("expected %q; got %q", expect, got)
+	}
+	b.StartTimer()
+	for i := 0; i < b.N; i++ {
+		fmt.Sprintf("%x", 23)
+	}
+}
+
+func osIsExist() {
+	name := "go1.go"
+	f, err := os.OpenFile(name, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0600)
+	if os.IsExist(err) {
+		log.Printf("%s already exists", name)
+	}
+	_ = f
+}
diff --git a/_content/doc/progs/gobs1.go b/_content/doc/progs/gobs1.go
new file mode 100644
index 0000000..7077ca1
--- /dev/null
+++ b/_content/doc/progs/gobs1.go
@@ -0,0 +1,22 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package gobs1
+
+type T struct{ X, Y, Z int } // Only exported fields are encoded and decoded.
+var t = T{X: 7, Y: 0, Z: 8}
+
+// STOP OMIT
+
+type U struct{ X, Y *int8 } // Note: pointers to int8s
+var u U
+
+// STOP OMIT
+
+type Node struct {
+	Value       int
+	Left, Right *Node
+}
+
+// STOP OMIT
diff --git a/_content/doc/progs/gobs2.go b/_content/doc/progs/gobs2.go
new file mode 100644
index 0000000..85bb41c
--- /dev/null
+++ b/_content/doc/progs/gobs2.go
@@ -0,0 +1,43 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"bytes"
+	"encoding/gob"
+	"fmt"
+	"log"
+)
+
+type P struct {
+	X, Y, Z int
+	Name    string
+}
+
+type Q struct {
+	X, Y *int32
+	Name string
+}
+
+func main() {
+	// Initialize the encoder and decoder.  Normally enc and dec would be
+	// bound to network connections and the encoder and decoder would
+	// run in different processes.
+	var network bytes.Buffer        // Stand-in for a network connection
+	enc := gob.NewEncoder(&network) // Will write to network.
+	dec := gob.NewDecoder(&network) // Will read from network.
+	// Encode (send) the value.
+	err := enc.Encode(P{3, 4, 5, "Pythagoras"})
+	if err != nil {
+		log.Fatal("encode error:", err)
+	}
+	// Decode (receive) the value.
+	var q Q
+	err = dec.Decode(&q)
+	if err != nil {
+		log.Fatal("decode error:", err)
+	}
+	fmt.Printf("%q: {%d,%d}\n", q.Name, *q.X, *q.Y)
+}
diff --git a/_content/doc/progs/image_draw.go b/_content/doc/progs/image_draw.go
new file mode 100644
index 0000000..bb73c8a
--- /dev/null
+++ b/_content/doc/progs/image_draw.go
@@ -0,0 +1,142 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This file contains the code snippets included in "The Go image/draw package."
+
+package main
+
+import (
+	"image"
+	"image/color"
+	"image/draw"
+)
+
+func main() {
+	Color()
+	Rect()
+	RectAndScroll()
+	ConvAndCircle()
+	Glyph()
+}
+
+func Color() {
+	c := color.RGBA{255, 0, 255, 255}
+	r := image.Rect(0, 0, 640, 480)
+	dst := image.NewRGBA(r)
+
+	// ZERO OMIT
+	// image.ZP is the zero point -- the origin.
+	draw.Draw(dst, r, &image.Uniform{c}, image.ZP, draw.Src)
+	// STOP OMIT
+
+	// BLUE OMIT
+	m := image.NewRGBA(image.Rect(0, 0, 640, 480))
+	blue := color.RGBA{0, 0, 255, 255}
+	draw.Draw(m, m.Bounds(), &image.Uniform{blue}, image.ZP, draw.Src)
+	// STOP OMIT
+
+	// RESET OMIT
+	draw.Draw(m, m.Bounds(), image.Transparent, image.ZP, draw.Src)
+	// STOP OMIT
+}
+
+func Rect() {
+	dst := image.NewRGBA(image.Rect(0, 0, 640, 480))
+	sr := image.Rect(0, 0, 200, 200)
+	src := image.Black
+	dp := image.Point{100, 100}
+
+	// RECT OMIT
+	r := image.Rectangle{dp, dp.Add(sr.Size())}
+	draw.Draw(dst, r, src, sr.Min, draw.Src)
+	// STOP OMIT
+}
+
+func RectAndScroll() {
+	dst := image.NewRGBA(image.Rect(0, 0, 640, 480))
+	sr := image.Rect(0, 0, 200, 200)
+	src := image.Black
+	dp := image.Point{100, 100}
+
+	// RECT2 OMIT
+	r := sr.Sub(sr.Min).Add(dp)
+	draw.Draw(dst, r, src, sr.Min, draw.Src)
+	// STOP OMIT
+
+	m := dst
+
+	// SCROLL OMIT
+	b := m.Bounds()
+	p := image.Pt(0, 20)
+	// Note that even though the second argument is b,
+	// the effective rectangle is smaller due to clipping.
+	draw.Draw(m, b, m, b.Min.Add(p), draw.Src)
+	dirtyRect := b.Intersect(image.Rect(b.Min.X, b.Max.Y-20, b.Max.X, b.Max.Y))
+	// STOP OMIT
+
+	_ = dirtyRect // noop
+}
+
+func ConvAndCircle() {
+	src := image.NewRGBA(image.Rect(0, 0, 640, 480))
+	dst := image.NewRGBA(image.Rect(0, 0, 640, 480))
+
+	// CONV OMIT
+	b := src.Bounds()
+	m := image.NewRGBA(b)
+	draw.Draw(m, b, src, b.Min, draw.Src)
+	// STOP OMIT
+
+	p := image.Point{100, 100}
+	r := 50
+
+	// CIRCLE2 OMIT
+	draw.DrawMask(dst, dst.Bounds(), src, image.ZP, &circle{p, r}, image.ZP, draw.Over)
+	// STOP OMIT
+}
+
+func theGlyphImageForAFont() image.Image {
+	return image.NewRGBA(image.Rect(0, 0, 640, 480))
+}
+
+func theBoundsFor(index int) image.Rectangle {
+	return image.Rect(0, 0, 32, 32)
+}
+
+func Glyph() {
+	p := image.Point{100, 100}
+	dst := image.NewRGBA(image.Rect(0, 0, 640, 480))
+	glyphIndex := 42
+
+	// GLYPH OMIT
+	src := &image.Uniform{color.RGBA{0, 0, 255, 255}}
+	mask := theGlyphImageForAFont()
+	mr := theBoundsFor(glyphIndex)
+	draw.DrawMask(dst, mr.Sub(mr.Min).Add(p), src, image.ZP, mask, mr.Min, draw.Over)
+	// STOP OMIT
+}
+
+//CIRCLESTRUCT OMIT
+type circle struct {
+	p image.Point
+	r int
+}
+
+func (c *circle) ColorModel() color.Model {
+	return color.AlphaModel
+}
+
+func (c *circle) Bounds() image.Rectangle {
+	return image.Rect(c.p.X-c.r, c.p.Y-c.r, c.p.X+c.r, c.p.Y+c.r)
+}
+
+func (c *circle) At(x, y int) color.Color {
+	xx, yy, rr := float64(x-c.p.X)+0.5, float64(y-c.p.Y)+0.5, float64(c.r)
+	if xx*xx+yy*yy < rr*rr {
+		return color.Alpha{255}
+	}
+	return color.Alpha{0}
+}
+
+//STOP OMIT
diff --git a/_content/doc/progs/image_package1.go b/_content/doc/progs/image_package1.go
new file mode 100644
index 0000000..c4c401e
--- /dev/null
+++ b/_content/doc/progs/image_package1.go
@@ -0,0 +1,15 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"fmt"
+	"image"
+)
+
+func main() {
+	p := image.Point{2, 1}
+	fmt.Println("X is", p.X, "Y is", p.Y)
+}
diff --git a/_content/doc/progs/image_package2.go b/_content/doc/progs/image_package2.go
new file mode 100644
index 0000000..fcb5d9f
--- /dev/null
+++ b/_content/doc/progs/image_package2.go
@@ -0,0 +1,16 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"fmt"
+	"image"
+)
+
+func main() {
+	r := image.Rect(2, 1, 5, 5)
+	// Dx and Dy return a rectangle's width and height.
+	fmt.Println(r.Dx(), r.Dy(), image.Pt(0, 0).In(r)) // prints 3 4 false
+}
diff --git a/_content/doc/progs/image_package3.go b/_content/doc/progs/image_package3.go
new file mode 100644
index 0000000..13d0f08
--- /dev/null
+++ b/_content/doc/progs/image_package3.go
@@ -0,0 +1,15 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"fmt"
+	"image"
+)
+
+func main() {
+	r := image.Rect(2, 1, 5, 5).Add(image.Pt(-4, -2))
+	fmt.Println(r.Dx(), r.Dy(), image.Pt(0, 0).In(r)) // prints 3 4 true
+}
diff --git a/_content/doc/progs/image_package4.go b/_content/doc/progs/image_package4.go
new file mode 100644
index 0000000..c46fddf
--- /dev/null
+++ b/_content/doc/progs/image_package4.go
@@ -0,0 +1,16 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"fmt"
+	"image"
+)
+
+func main() {
+	r := image.Rect(0, 0, 4, 3).Intersect(image.Rect(2, 2, 5, 5))
+	// Size returns a rectangle's width and height, as a Point.
+	fmt.Printf("%#v\n", r.Size()) // prints image.Point{X:2, Y:1}
+}
diff --git a/_content/doc/progs/image_package5.go b/_content/doc/progs/image_package5.go
new file mode 100644
index 0000000..0bb5c76
--- /dev/null
+++ b/_content/doc/progs/image_package5.go
@@ -0,0 +1,17 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"fmt"
+	"image"
+	"image/color"
+)
+
+func main() {
+	m := image.NewRGBA(image.Rect(0, 0, 640, 480))
+	m.Set(5, 5, color.RGBA{255, 0, 0, 255})
+	fmt.Println(m.At(5, 5))
+}
diff --git a/_content/doc/progs/image_package6.go b/_content/doc/progs/image_package6.go
new file mode 100644
index 0000000..62eeecd
--- /dev/null
+++ b/_content/doc/progs/image_package6.go
@@ -0,0 +1,17 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"fmt"
+	"image"
+)
+
+func main() {
+	m0 := image.NewRGBA(image.Rect(0, 0, 8, 5))
+	m1 := m0.SubImage(image.Rect(1, 2, 5, 5)).(*image.RGBA)
+	fmt.Println(m0.Bounds().Dx(), m1.Bounds().Dx()) // prints 8, 4
+	fmt.Println(m0.Stride == m1.Stride)             // prints true
+}
diff --git a/_content/doc/progs/interface.go b/_content/doc/progs/interface.go
new file mode 100644
index 0000000..c2925d5
--- /dev/null
+++ b/_content/doc/progs/interface.go
@@ -0,0 +1,62 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This file contains the code snippets included in "The Laws of Reflection."
+
+package main
+
+import (
+	"bufio"
+	"bytes"
+	"io"
+	"os"
+)
+
+type MyInt int
+
+var i int
+var j MyInt
+
+// STOP OMIT
+
+// Reader is the interface that wraps the basic Read method.
+type Reader interface {
+	Read(p []byte) (n int, err error)
+}
+
+// Writer is the interface that wraps the basic Write method.
+type Writer interface {
+	Write(p []byte) (n int, err error)
+}
+
+// STOP OMIT
+
+func readers() { // OMIT
+	var r io.Reader
+	r = os.Stdin
+	r = bufio.NewReader(r)
+	r = new(bytes.Buffer)
+	// and so on
+	// STOP OMIT
+}
+
+func typeAssertions() (interface{}, error) { // OMIT
+	var r io.Reader
+	tty, err := os.OpenFile("/dev/tty", os.O_RDWR, 0)
+	if err != nil {
+		return nil, err
+	}
+	r = tty
+	// STOP OMIT
+	var w io.Writer
+	w = r.(io.Writer)
+	// STOP OMIT
+	var empty interface{}
+	empty = w
+	// STOP OMIT
+	return empty, err
+}
+
+func main() {
+}
diff --git a/_content/doc/progs/interface2.go b/_content/doc/progs/interface2.go
new file mode 100644
index 0000000..a541d94
--- /dev/null
+++ b/_content/doc/progs/interface2.go
@@ -0,0 +1,132 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This file contains the code snippets included in "The Laws of Reflection."
+
+package main
+
+import (
+	"fmt"
+	"reflect"
+)
+
+func main() {
+	var x float64 = 3.4
+	fmt.Println("type:", reflect.TypeOf(x))
+	// STOP OMIT
+	// TODO(proppy): test output OMIT
+}
+
+// STOP main OMIT
+
+func f1() {
+	// START f1 OMIT
+	var x float64 = 3.4
+	v := reflect.ValueOf(x)
+	fmt.Println("type:", v.Type())
+	fmt.Println("kind is float64:", v.Kind() == reflect.Float64)
+	fmt.Println("value:", v.Float())
+	// STOP OMIT
+}
+
+func f2() {
+	// START f2 OMIT
+	var x uint8 = 'x'
+	v := reflect.ValueOf(x)
+	fmt.Println("type:", v.Type())                            // uint8.
+	fmt.Println("kind is uint8: ", v.Kind() == reflect.Uint8) // true.
+	x = uint8(v.Uint())                                       // v.Uint returns a uint64.
+	// STOP OMIT
+}
+
+func f3() {
+	// START f3 OMIT
+	type MyInt int
+	var x MyInt = 7
+	v := reflect.ValueOf(x)
+	// STOP OMIT
+	// START f3b OMIT
+	y := v.Interface().(float64) // y will have type float64.
+	fmt.Println(y)
+	// STOP OMIT
+	// START f3c OMIT
+	fmt.Println(v.Interface())
+	// STOP OMIT
+	// START f3d OMIT
+	fmt.Printf("value is %7.1e\n", v.Interface())
+	// STOP OMIT
+}
+
+func f4() {
+	// START f4 OMIT
+	var x float64 = 3.4
+	v := reflect.ValueOf(x)
+	v.SetFloat(7.1) // Error: will panic.
+	// STOP OMIT
+}
+
+func f5() {
+	// START f5 OMIT
+	var x float64 = 3.4
+	v := reflect.ValueOf(x)
+	fmt.Println("settability of v:", v.CanSet())
+	// STOP OMIT
+}
+
+func f6() {
+	// START f6 OMIT
+	var x float64 = 3.4
+	v := reflect.ValueOf(x)
+	// STOP OMIT
+	// START f6b OMIT
+	v.SetFloat(7.1)
+	// STOP OMIT
+}
+
+func f7() {
+	// START f7 OMIT
+	var x float64 = 3.4
+	p := reflect.ValueOf(&x) // Note: take the address of x.
+	fmt.Println("type of p:", p.Type())
+	fmt.Println("settability of p:", p.CanSet())
+	// STOP OMIT
+	// START f7b OMIT
+	v := p.Elem()
+	fmt.Println("settability of v:", v.CanSet())
+	// STOP OMIT
+	// START f7c OMIT
+	v.SetFloat(7.1)
+	fmt.Println(v.Interface())
+	fmt.Println(x)
+	// STOP OMIT
+}
+
+func f8() {
+	// START f8 OMIT
+	type T struct {
+		A int
+		B string
+	}
+	t := T{23, "skidoo"}
+	s := reflect.ValueOf(&t).Elem()
+	typeOfT := s.Type()
+	for i := 0; i < s.NumField(); i++ {
+		f := s.Field(i)
+		fmt.Printf("%d: %s %s = %v\n", i,
+			typeOfT.Field(i).Name, f.Type(), f.Interface())
+	}
+	// STOP OMIT
+	// START f8b OMIT
+	s.Field(0).SetInt(77)
+	s.Field(1).SetString("Sunset Strip")
+	fmt.Println("t is now", t)
+	// STOP OMIT
+}
+
+func f9() {
+	// START f9 OMIT
+	var x float64 = 3.4
+	fmt.Println("value:", reflect.ValueOf(x))
+	// STOP OMIT
+}
diff --git a/_content/doc/progs/json1.go b/_content/doc/progs/json1.go
new file mode 100644
index 0000000..9804efb
--- /dev/null
+++ b/_content/doc/progs/json1.go
@@ -0,0 +1,88 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"encoding/json"
+	"log"
+	"reflect"
+)
+
+type Message struct {
+	Name string
+	Body string
+	Time int64
+}
+
+// STOP OMIT
+
+func Encode() {
+	m := Message{"Alice", "Hello", 1294706395881547000}
+	b, err := json.Marshal(m)
+
+	if err != nil {
+		panic(err)
+	}
+
+	expected := []byte(`{"Name":"Alice","Body":"Hello","Time":1294706395881547000}`)
+	if !reflect.DeepEqual(b, expected) {
+		log.Panicf("Error marshaling %q, expected %q, got %q.", m, expected, b)
+	}
+
+}
+
+func Decode() {
+	b := []byte(`{"Name":"Alice","Body":"Hello","Time":1294706395881547000}`)
+	var m Message
+	err := json.Unmarshal(b, &m)
+
+	if err != nil {
+		panic(err)
+	}
+
+	expected := Message{
+		Name: "Alice",
+		Body: "Hello",
+		Time: 1294706395881547000,
+	}
+
+	if !reflect.DeepEqual(m, expected) {
+		log.Panicf("Error unmarshaling %q, expected %q, got %q.", b, expected, m)
+	}
+
+	m = Message{
+		Name: "Alice",
+		Body: "Hello",
+		Time: 1294706395881547000,
+	}
+
+	// STOP OMIT
+}
+
+func PartialDecode() {
+	b := []byte(`{"Name":"Bob","Food":"Pickle"}`)
+	var m Message
+	err := json.Unmarshal(b, &m)
+
+	// STOP OMIT
+
+	if err != nil {
+		panic(err)
+	}
+
+	expected := Message{
+		Name: "Bob",
+	}
+
+	if !reflect.DeepEqual(expected, m) {
+		log.Panicf("Error unmarshaling %q, expected %q, got %q.", b, expected, m)
+	}
+}
+
+func main() {
+	Encode()
+	Decode()
+	PartialDecode()
+}
diff --git a/_content/doc/progs/json2.go b/_content/doc/progs/json2.go
new file mode 100644
index 0000000..6089ae6
--- /dev/null
+++ b/_content/doc/progs/json2.go
@@ -0,0 +1,42 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"fmt"
+	"math"
+)
+
+func InterfaceExample() {
+	var i interface{}
+	i = "a string"
+	i = 2011
+	i = 2.777
+
+	// STOP OMIT
+
+	r := i.(float64)
+	fmt.Println("the circle's area", math.Pi*r*r)
+
+	// STOP OMIT
+
+	switch v := i.(type) {
+	case int:
+		fmt.Println("twice i is", v*2)
+	case float64:
+		fmt.Println("the reciprocal of i is", 1/v)
+	case string:
+		h := len(v) / 2
+		fmt.Println("i swapped by halves is", v[h:]+v[:h])
+	default:
+		// i isn't one of the types above
+	}
+
+	// STOP OMIT
+}
+
+func main() {
+	InterfaceExample()
+}
diff --git a/_content/doc/progs/json3.go b/_content/doc/progs/json3.go
new file mode 100644
index 0000000..442c155
--- /dev/null
+++ b/_content/doc/progs/json3.go
@@ -0,0 +1,73 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"log"
+	"reflect"
+)
+
+func Decode() {
+	b := []byte(`{"Name":"Wednesday","Age":6,"Parents":["Gomez","Morticia"]}`)
+
+	var f interface{}
+	err := json.Unmarshal(b, &f)
+
+	// STOP OMIT
+
+	if err != nil {
+		panic(err)
+	}
+
+	expected := map[string]interface{}{
+		"Name": "Wednesday",
+		"Age":  float64(6),
+		"Parents": []interface{}{
+			"Gomez",
+			"Morticia",
+		},
+	}
+
+	if !reflect.DeepEqual(f, expected) {
+		log.Panicf("Error unmarshaling %q, expected %q, got %q", b, expected, f)
+	}
+
+	f = map[string]interface{}{
+		"Name": "Wednesday",
+		"Age":  6,
+		"Parents": []interface{}{
+			"Gomez",
+			"Morticia",
+		},
+	}
+
+	// STOP OMIT
+
+	m := f.(map[string]interface{})
+
+	for k, v := range m {
+		switch vv := v.(type) {
+		case string:
+			fmt.Println(k, "is string", vv)
+		case int:
+			fmt.Println(k, "is int", vv)
+		case []interface{}:
+			fmt.Println(k, "is an array:")
+			for i, u := range vv {
+				fmt.Println(i, u)
+			}
+		default:
+			fmt.Println(k, "is of a type I don't know how to handle")
+		}
+	}
+
+	// STOP OMIT
+}
+
+func main() {
+	Decode()
+}
diff --git a/_content/doc/progs/json4.go b/_content/doc/progs/json4.go
new file mode 100644
index 0000000..1c7e5b4
--- /dev/null
+++ b/_content/doc/progs/json4.go
@@ -0,0 +1,45 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"encoding/json"
+	"log"
+	"reflect"
+)
+
+type FamilyMember struct {
+	Name    string
+	Age     int
+	Parents []string
+}
+
+// STOP OMIT
+
+func Decode() {
+	b := []byte(`{"Name":"Bob","Age":20,"Parents":["Morticia", "Gomez"]}`)
+	var m FamilyMember
+	err := json.Unmarshal(b, &m)
+
+	// STOP OMIT
+
+	if err != nil {
+		panic(err)
+	}
+
+	expected := FamilyMember{
+		Name:    "Bob",
+		Age:     20,
+		Parents: []string{"Morticia", "Gomez"},
+	}
+
+	if !reflect.DeepEqual(expected, m) {
+		log.Panicf("Error unmarshaling %q, expected %q, got %q", b, expected, m)
+	}
+}
+
+func main() {
+	Decode()
+}
diff --git a/_content/doc/progs/json5.go b/_content/doc/progs/json5.go
new file mode 100644
index 0000000..6d7a4ca
--- /dev/null
+++ b/_content/doc/progs/json5.go
@@ -0,0 +1,31 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"encoding/json"
+	"log"
+	"os"
+)
+
+func main() {
+	dec := json.NewDecoder(os.Stdin)
+	enc := json.NewEncoder(os.Stdout)
+	for {
+		var v map[string]interface{}
+		if err := dec.Decode(&v); err != nil {
+			log.Println(err)
+			return
+		}
+		for k := range v {
+			if k != "Name" {
+				delete(v, k)
+			}
+		}
+		if err := enc.Encode(&v); err != nil {
+			log.Println(err)
+		}
+	}
+}
diff --git a/_content/doc/progs/run.go b/_content/doc/progs/run.go
new file mode 100644
index 0000000..8ac75cd
--- /dev/null
+++ b/_content/doc/progs/run.go
@@ -0,0 +1,229 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// run runs the docs tests found in this directory.
+package main
+
+import (
+	"bytes"
+	"flag"
+	"fmt"
+	"io/ioutil"
+	"os"
+	"os/exec"
+	"path/filepath"
+	"regexp"
+	"runtime"
+	"strings"
+	"time"
+)
+
+const usage = `go run run.go [tests]
+
+run.go runs the docs tests in this directory.
+If no tests are provided, it runs all tests.
+Tests may be specified without their .go suffix.
+`
+
+func main() {
+	start := time.Now()
+
+	flag.Usage = func() {
+		fmt.Fprintf(os.Stderr, usage)
+		flag.PrintDefaults()
+		os.Exit(2)
+	}
+
+	flag.Parse()
+	if flag.NArg() == 0 {
+		// run all tests
+		fixcgo()
+	} else {
+		// run specified tests
+		onlyTest(flag.Args()...)
+	}
+
+	tmpdir, err := ioutil.TempDir("", "go-progs")
+	if err != nil {
+		fmt.Fprintln(os.Stderr, err)
+		os.Exit(1)
+	}
+
+	// ratec limits the number of tests running concurrently.
+	// None of the tests are intensive, so don't bother
+	// trying to manually adjust for slow builders.
+	ratec := make(chan bool, runtime.NumCPU())
+	errc := make(chan error, len(tests))
+
+	for _, tt := range tests {
+		tt := tt
+		ratec <- true
+		go func() {
+			errc <- test(tmpdir, tt.file, tt.want)
+			<-ratec
+		}()
+	}
+
+	var rc int
+	for range tests {
+		if err := <-errc; err != nil {
+			fmt.Fprintln(os.Stderr, err)
+			rc = 1
+		}
+	}
+	os.Remove(tmpdir)
+	if rc == 0 {
+		fmt.Printf("ok\t%s\t%s\n", filepath.Base(os.Args[0]), time.Since(start).Round(time.Millisecond))
+	}
+	os.Exit(rc)
+}
+
+// test builds the test in the given file.
+// If want is non-empty, test also runs the test
+// and checks that the output matches the regexp want.
+func test(tmpdir, file, want string) error {
+	// Build the program.
+	prog := filepath.Join(tmpdir, file+".exe")
+	cmd := exec.Command("go", "build", "-o", prog, file+".go")
+	out, err := cmd.CombinedOutput()
+	if err != nil {
+		return fmt.Errorf("go build %s.go failed: %v\nOutput:\n%s", file, err, out)
+	}
+	defer os.Remove(prog)
+
+	// Only run the test if we have output to check.
+	if want == "" {
+		return nil
+	}
+
+	cmd = exec.Command(prog)
+	out, err = cmd.CombinedOutput()
+	if err != nil {
+		return fmt.Errorf("%s failed: %v\nOutput:\n%s", file, err, out)
+	}
+
+	// Canonicalize output.
+	out = bytes.TrimRight(out, "\n")
+	out = bytes.ReplaceAll(out, []byte{'\n'}, []byte{' '})
+
+	// Check the result.
+	match, err := regexp.Match(want, out)
+	if err != nil {
+		return fmt.Errorf("failed to parse regexp %q: %v", want, err)
+	}
+	if !match {
+		return fmt.Errorf("%s.go:\n%q\ndoes not match %s", file, out, want)
+	}
+
+	return nil
+}
+
+type testcase struct {
+	file string
+	want string
+}
+
+var tests = []testcase{
+	// defer_panic_recover
+	{"defer", `^0 3210 2$`},
+	{"defer2", `^Calling g. Printing in g 0 Printing in g 1 Printing in g 2 Printing in g 3 Panicking! Defer in g 3 Defer in g 2 Defer in g 1 Defer in g 0 Recovered in f 4 Returned normally from f.$`},
+
+	// effective_go
+	{"eff_bytesize", `^1.00YB 9.09TB$`},
+	{"eff_qr", ""},
+	{"eff_sequence", `^\[-1 2 6 16 44\]$`},
+	{"eff_unused2", ""},
+
+	// error_handling
+	{"error", ""},
+	{"error2", ""},
+	{"error3", ""},
+	{"error4", ""},
+
+	// law_of_reflection
+	{"interface", ""},
+	{"interface2", `^type: float64$`},
+
+	// c_go_cgo
+	{"cgo1", ""},
+	{"cgo2", ""},
+	{"cgo3", ""},
+	{"cgo4", ""},
+
+	// timeout
+	{"timeout1", ""},
+	{"timeout2", ""},
+
+	// gobs
+	{"gobs1", ""},
+	{"gobs2", ""},
+
+	// json
+	{"json1", `^$`},
+	{"json2", `the reciprocal of i is`},
+	{"json3", `Age is int 6`},
+	{"json4", `^$`},
+	{"json5", ""},
+
+	// image_package
+	{"image_package1", `^X is 2 Y is 1$`},
+	{"image_package2", `^3 4 false$`},
+	{"image_package3", `^3 4 true$`},
+	{"image_package4", `^image.Point{X:2, Y:1}$`},
+	{"image_package5", `^{255 0 0 255}$`},
+	{"image_package6", `^8 4 true$`},
+
+	// other
+	{"go1", `^Christmas is a holiday: true .*go1.go already exists$`},
+	{"slices", ""},
+}
+
+func onlyTest(files ...string) {
+	var new []testcase
+NextFile:
+	for _, file := range files {
+		file = strings.TrimSuffix(file, ".go")
+		for _, tt := range tests {
+			if tt.file == file {
+				new = append(new, tt)
+				continue NextFile
+			}
+		}
+		fmt.Fprintf(os.Stderr, "test %s.go not found\n", file)
+		os.Exit(1)
+	}
+	tests = new
+}
+
+func skipTest(file string) {
+	for i, tt := range tests {
+		if tt.file == file {
+			copy(tests[i:], tests[i+1:])
+			tests = tests[:len(tests)-1]
+			return
+		}
+	}
+	panic("delete(" + file + "): not found")
+}
+
+func fixcgo() {
+	if os.Getenv("CGO_ENABLED") != "1" {
+		skipTest("cgo1")
+		skipTest("cgo2")
+		skipTest("cgo3")
+		skipTest("cgo4")
+		return
+	}
+
+	switch runtime.GOOS {
+	case "freebsd":
+		// cgo1 and cgo2 don't run on freebsd, srandom has a different signature
+		skipTest("cgo1")
+		skipTest("cgo2")
+	case "netbsd":
+		// cgo1 and cgo2 don't run on netbsd, srandom has a different signature
+		skipTest("cgo1")
+		skipTest("cgo2")
+	}
+}
diff --git a/_content/doc/progs/slices.go b/_content/doc/progs/slices.go
new file mode 100644
index 0000000..967a3e7
--- /dev/null
+++ b/_content/doc/progs/slices.go
@@ -0,0 +1,63 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"io/ioutil"
+	"regexp"
+)
+
+func AppendByte(slice []byte, data ...byte) []byte {
+	m := len(slice)
+	n := m + len(data)
+	if n > cap(slice) { // if necessary, reallocate
+		// allocate double what's needed, for future growth.
+		newSlice := make([]byte, (n+1)*2)
+		copy(newSlice, slice)
+		slice = newSlice
+	}
+	slice = slice[0:n]
+	copy(slice[m:n], data)
+	return slice
+}
+
+// STOP OMIT
+
+// Filter returns a new slice holding only
+// the elements of s that satisfy fn.
+func Filter(s []int, fn func(int) bool) []int {
+	var p []int // == nil
+	for _, i := range s {
+		if fn(i) {
+			p = append(p, i)
+		}
+	}
+	return p
+}
+
+// STOP OMIT
+
+var digitRegexp = regexp.MustCompile("[0-9]+")
+
+func FindDigits(filename string) []byte {
+	b, _ := ioutil.ReadFile(filename)
+	return digitRegexp.Find(b)
+}
+
+// STOP OMIT
+
+func CopyDigits(filename string) []byte {
+	b, _ := ioutil.ReadFile(filename)
+	b = digitRegexp.Find(b)
+	c := make([]byte, len(b))
+	copy(c, b)
+	return c
+}
+
+// STOP OMIT
+
+func main() {
+	// place holder; no need to run
+}
diff --git a/_content/doc/progs/timeout1.go b/_content/doc/progs/timeout1.go
new file mode 100644
index 0000000..353ba69
--- /dev/null
+++ b/_content/doc/progs/timeout1.go
@@ -0,0 +1,29 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package timeout
+
+import (
+	"time"
+)
+
+func Timeout() {
+	ch := make(chan bool, 1)
+	timeout := make(chan bool, 1)
+	go func() {
+		time.Sleep(1 * time.Second)
+		timeout <- true
+	}()
+
+	// STOP OMIT
+
+	select {
+	case <-ch:
+		// a read from ch has occurred
+	case <-timeout:
+		// the read from ch has timed out
+	}
+
+	// STOP OMIT
+}
diff --git a/_content/doc/progs/timeout2.go b/_content/doc/progs/timeout2.go
new file mode 100644
index 0000000..b0d34ea
--- /dev/null
+++ b/_content/doc/progs/timeout2.go
@@ -0,0 +1,28 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package query
+
+type Conn string
+
+func (c Conn) DoQuery(query string) Result {
+	return Result("result")
+}
+
+type Result string
+
+func Query(conns []Conn, query string) Result {
+	ch := make(chan Result, 1)
+	for _, conn := range conns {
+		go func(c Conn) {
+			select {
+			case ch <- c.DoQuery(query):
+			default:
+			}
+		}(conn)
+	}
+	return <-ch
+}
+
+// STOP OMIT
diff --git a/_content/doc/share.png b/_content/doc/share.png
new file mode 100644
index 0000000..c04f0c7
--- /dev/null
+++ b/_content/doc/share.png
Binary files differ
diff --git a/_content/doc/tos.html b/_content/doc/tos.html
new file mode 100644
index 0000000..fff4642
--- /dev/null
+++ b/_content/doc/tos.html
@@ -0,0 +1,11 @@
+<!--{
+	"Title": "Terms of service"
+}-->
+
+<p>
+The Go website (the "Website") is hosted by Google.
+By using and/or visiting the Website, you consent to be bound by Google's general
+<a href="//www.google.com/intl/en/policies/terms/">Terms of Service</a>
+and Google's general
+<a href="//www.google.com/intl/en/privacy/privacy-policy.html">Privacy Policy</a>.
+</p>