Commits

Joseph Poirier committed ccd7ff3 Merge

Merged changes from golang.

Comments (0)

Files changed (276)

 build.out
 test.out
 doc/tmpltohtml
-doc/codelab/wiki/*.bin
+doc/articles/wiki/*.bin
 misc/cgo/life/run.out
-misc/dashboard/builder/gobuilder
+misc/cgo/stdio/run.out
+misc/dashboard/builder/builder
 misc/goplay/goplay
 misc/osx/*.pkg
 misc/osx/*.dmg
-src/Make.inc
 src/cmd/6a/6a
 src/cmd/?l/enam.c
 src/cmd/cc/y.output
 src/pkg/exp/norm/maketesttables
 src/pkg/exp/norm/normregtest
 src/pkg/exp/ebnflint/ebnflint
-src/pkg/go/build/syslist.go
 src/pkg/go/doc/headscan
 src/pkg/runtime/goc2c
 src/pkg/runtime/mkversion
 52ba9506bd993663a0a033c2bd68699e25d061ab weekly.2012-02-07
 43cf9b39b6477d3144b0353ee91096e55db6107f weekly.2012-02-14
 96bd78e7d35e892113bdfa1bdc392d3a5f2e644b weekly.2012-02-22
-96bd78e7d35e892113bdfa1bdc392d3a5f2e644b weekly
+f4470a54e6dbcdd52d8d404e12e4754adcd2c948 weekly.2012-03-04
+f4470a54e6dbcdd52d8d404e12e4754adcd2c948 weekly
 Dmitry Chestnykh <dchest@gmail.com>
 Eden Li <eden.li@gmail.com>
 Eivind Uggedal <eivind@uggedal.com>
+Emil Hessman <c.emil.hessman@gmail.com>
 Eoghan Sherry <ejsherry@gmail.com>
 Eric Clark <zerohp@gmail.com>
 Eric Eisner <eric.d.eisner@gmail.com>
 Taru Karttunen <taruti@taruti.net>
 Timo Savola <timo.savola@gmail.com>
 Tor Andersson <tor.andersson@gmail.com>
+Ugorji Nwoke <ugorji@gmail.com>
 Vadim Vygonets <unixdj@gmail.com>
 Vincent Ambo <tazjin@googlemail.com>
 Vincent Vanackere <vincent.vanackere@gmail.com>
 Dmitry Chestnykh <dchest@gmail.com>
 Eden Li <eden.li@gmail.com>
 Eivind Uggedal <eivind@uggedal.com>
+Emil Hessman <c.emil.hessman@gmail.com>
 Eoghan Sherry <ejsherry@gmail.com>
 Eric Clark <zerohp@gmail.com>
 Eric Eisner <eric.d.eisner@gmail.com>
 Tom Szymanski <tgs@google.com>
 Tor Andersson <tor.andersson@gmail.com>
 Trevor Strohman <trevor.strohman@gmail.com>
+Ugorji Nwoke <ugorji@gmail.com>
 Vadim Vygonets <unixdj@gmail.com>
 Vincent Ambo <tazjin@googlemail.com>
 Vincent Vanackere <vincent.vanackere@gmail.com>
 	go build tmpltohtml.go
 
 %.html: %.tmpl tmpltohtml
-	./makehtml $*.tmpl
+	./tmpltohtml $*.tmpl > $@
+
+clean:
+	rm -f $(HTML) tmpltohtml 

doc/articles/defer_panic_recover.html

 For a real-world example of <b>panic</b> and <b>recover</b>, see the
 <a href="/pkg/encoding/json/">json package</a> from the Go standard library.
 It decodes JSON-encoded data with a set of recursive functions.
-When malformed JSON is encountered, the parser calls panic is to unwind the
+When malformed JSON is encountered, the parser calls panic to unwind the
 stack to the top-level function call, which recovers from the panic and returns
 an appropriate error value (see the 'error' and 'unmarshal' functions in
 <a href="/src/pkg/encoding/json/decode.go">decode.go</a>).

doc/articles/defer_panic_recover.tmpl

 For a real-world example of <b>panic</b> and <b>recover</b>, see the
 <a href="/pkg/encoding/json/">json package</a> from the Go standard library.
 It decodes JSON-encoded data with a set of recursive functions.
-When malformed JSON is encountered, the parser calls panic is to unwind the
+When malformed JSON is encountered, the parser calls panic to unwind the
 stack to the top-level function call, which recovers from the panic and returns
 an appropriate error value (see the 'error' and 'unmarshal' functions in
 <a href="/src/pkg/encoding/json/decode.go">decode.go</a>).

doc/articles/go_command.html

+<!--{
+	"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 the convention
+is 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 old <code>goinstall</code> command
+(now replaced by <a href="/cmd/go/#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 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 for it.</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 an 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 supplemental networking
+libraries for Go are obtained by running</p>
+
+<pre>
+hg clone http://code.google.com/p/go.net
+</pre>
+
+<p>and thus the import path for the root directory of that repository is
+"<code>code.google.com/p/go.net</code>".  The websocket package is stored in a
+subdirectory, so its import path is
+"<code>code.google.com/p/go.net/websocket</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, the first choice
+is <code>$GOPATH/src/&lt;import-path&gt;</code>.  If <code>$GOPATH</code> is
+unset, the go command will fall back to storing source code alongside the
+standard Go packages, in <code>$GOROOT/src/pkg/&lt;import-path&gt;</code>.
+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 tool chain.</p>
+
+<h2>Getting started with the go command</h2>
+
+<p>Finally, a quick tour of how to use the go command, to supplement
+the information in <a href="/doc/code.html">How to Write Go Code</a>,
+which you might want to read first.  Assuming you want
+to keep your source code separate from the Go distribution source
+tree, the first step is to set <code>$GOPATH</code>, the one piece of global
+configuration that the go command needs.  The <code>$GOPATH</code> can be a
+list of directories, but by far the most common usage should be to set it to a
+single directory.  In particular, you do not need a separate entry in
+<code>$GOPATH</code> for each of your projects.  One <code>$GOPATH</code> can
+support many projects.</p>
+
+<p>Here’s an example.  Let’s say we decide to keep our Go code in the directory
+<code>$HOME/mygo</code>.  We need to create that directory and set
+<code>$GOPATH</code> accordingly.</p>
+
+<pre>
+$ mkdir $HOME/mygo
+$ export GOPATH=$HOME/mygo
+$
+</pre>
+
+<p>Into this directory, we now 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 code.google.com/p/codesearch/index
+$ go get github.com/petar/GoLLRB/llrb
+$
+</pre>
+
+<p>Both of these projects are now downloaded and installed into our
+<code>$GOPATH</code> directory. The one tree now contains the two directories
+<code>src/code.google.com/p/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>
+$ go list ./...
+code.google.com/p/codesearch/cmd/cgrep
+code.google.com/p/codesearch/cmd/cindex
+code.google.com/p/codesearch/cmd/csearch
+code.google.com/p/codesearch/index
+code.google.com/p/codesearch/regexp
+code.google.com/p/codesearch/sparse
+github.com/petar/GoLLRB/example
+github.com/petar/GoLLRB/llrb
+$
+</pre>
+
+<p>We can also test those packages:</p>
+
+<pre>
+$ go test ./...
+?       code.google.com/p/codesearch/cmd/cgrep   [no test files]
+?       code.google.com/p/codesearch/cmd/cindex  [no test files]
+?       code.google.com/p/codesearch/cmd/csearch [no test files]
+ok      code.google.com/p/codesearch/index       0.239s
+ok      code.google.com/p/codesearch/regexp      0.021s
+?       code.google.com/p/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 $GOPATH/src/code.google.com/p/codesearch/regexp
+$ go list
+code.google.com/p/codesearch/regexp
+$ go test -v
+=== RUN TestNstateEnc
+--- PASS: TestNstateEnc (0.00 seconds)
+=== RUN TestMatch
+--- PASS: TestMatch (0.01 seconds)
+=== RUN TestGrep
+--- PASS: TestGrep (0.00 seconds)
+PASS
+ok      code.google.com/p/codesearch/regexp     0.021s
+$ 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>
+
+<p>As the example shows, it’s fine to work with packages from many different
+projects at once within a single <code>$GOPATH</code> root directory.</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 during a build.  Instead, if you want to use a tool like
+yacc or the protocol buffer compiler, you will need to write a
+makefile (or a configuration file for the build tool of your choice)
+to generate 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>

doc/articles/laws_of_reflection.html

 type and value pair stored inside an interface variable. To get
 started, there are two types we need to know about in
 <a href="http://golang.org/pkg/reflect">package reflect</a>:
-<a href="http://golang.org/pkg/reflect/#Type">Type</a>and
+<a href="http://golang.org/pkg/reflect/#Type">Type</a> and
 <a href="http://golang.org/pkg/reflect/#Value">Value</a>. Those two types
 give access to the contents of an interface variable, and two
 simple functions, called <code>reflect.TypeOf</code> and
 as in
 </p>
 
-<pre><!--{{code "progs/interface2.go" `/START f3/` `/START/`}}
+<pre><!--{{code "progs/interface2.go" `/START f3/` `/STOP/`}}
 -->    type MyInt int
     var x MyInt = 7
     v := reflect.ValueOf(x)</pre>
 As a consequence we can say
 </p>
 
-<pre><!--{{code "progs/interface2.go" `/START f3b/` `/START/`}}
+<pre><!--{{code "progs/interface2.go" `/START f3b/` `/STOP/`}}
 -->    y := v.Interface().(float64) // y will have type float64.
     fmt.Println(y)</pre>
 
 routine:
 </p>
 
-<pre><!--{{code "progs/interface2.go" `/START f3c/` `/START/`}}
+<pre><!--{{code "progs/interface2.go" `/START f3c/` `/STOP/`}}
 -->    fmt.Println(v.Interface())</pre>
 
 <p>
 item. When we say
 </p>
 
-<pre><!--{{code "progs/interface2.go" `/START f6/` `/START/`}}
+<pre><!--{{code "progs/interface2.go" `/START f6/` `/STOP/`}}
 -->    var x float64 = 3.4
     v := reflect.ValueOf(x)</pre>
 
 <code>p</code>.
 </p>
 
-<pre><!--{{code "progs/interface2.go" `/START f7/` `/START/`}}
+<pre><!--{{code "progs/interface2.go" `/START f7/` `/STOP/`}}
 -->    var x float64 = 3.4
     p := reflect.ValueOf(&amp;x) // Note: take the address of x.
     fmt.Println(&#34;type of p:&#34;, p.Type())
 <code>v</code>:
 </p>
 
-<pre><!--{{code "progs/interface2.go" `/START f7b/` `/START/`}}
+<pre><!--{{code "progs/interface2.go" `/START f7b/` `/STOP/`}}
 -->    v := p.Elem()
     fmt.Println(&#34;settability of v:&#34;, v.CanSet())</pre>
 
         f := s.Field(i)
         fmt.Printf(&#34;%d: %s %s = %v\n&#34;, i,
             typeOfT.Field(i).Name, f.Type(), f.Interface())
-    }
-    s.Field(0).SetInt(77)
-    s.Field(1).SetString(&#34;Sunset Strip&#34;)
-    fmt.Println(&#34;t is now&#34;, t)</pre>
+    }</pre>
 
 <p>
 The output of this program is

doc/articles/laws_of_reflection.tmpl

 type and value pair stored inside an interface variable. To get
 started, there are two types we need to know about in
 <a href="http://golang.org/pkg/reflect">package reflect</a>:
-<a href="http://golang.org/pkg/reflect/#Type">Type</a>and
+<a href="http://golang.org/pkg/reflect/#Type">Type</a> and
 <a href="http://golang.org/pkg/reflect/#Value">Value</a>. Those two types
 give access to the contents of an interface variable, and two
 simple functions, called <code>reflect.TypeOf</code> and
 as in
 </p>
 
-{{code "progs/interface2.go" `/START f3/` `/START/`}}
+{{code "progs/interface2.go" `/START f3/` `/STOP/`}}
 
 <p>
 the <code>Kind</code> of <code>v</code> is still
 As a consequence we can say
 </p>
 
-{{code "progs/interface2.go" `/START f3b/` `/START/`}}
+{{code "progs/interface2.go" `/START f3b/` `/STOP/`}}
 
 <p>
 to print the <code>float64</code> value represented by the
 routine:
 </p>
 
-{{code "progs/interface2.go" `/START f3c/` `/START/`}}
+{{code "progs/interface2.go" `/START f3c/` `/STOP/`}}
 
 <p>
 (Why not <code>fmt.Println(v)</code>? Because <code>v</code> is a
 item. When we say
 </p>
 
-{{code "progs/interface2.go" `/START f6/` `/START/`}}
+{{code "progs/interface2.go" `/START f6/` `/STOP/`}}
 
 <p>
 we pass a <em>copy</em> of <code>x</code> to
 <code>p</code>.
 </p>
 
-{{code "progs/interface2.go" `/START f7/` `/START/`}}
+{{code "progs/interface2.go" `/START f7/` `/STOP/`}}
 
 <p>
 The output so far is
 <code>v</code>:
 </p>
 
-{{code "progs/interface2.go" `/START f7b/` `/START/`}}
+{{code "progs/interface2.go" `/START f7b/` `/STOP/`}}
 
 <p>
 Now <code>v</code> is a settable reflection object, as the output

doc/articles/wiki/index.html

 </p>
 
 <p>
-Install Go (see the <a href="/doc/install.html">Installation Instructions</a>).
+Install Go (see the <a href="/doc/install">Installation Instructions</a>).
 </p>
 
 <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="/doc/go_spec.html#Errors">language specification</a> for details).
+<a href="/ref/spec#Errors">language specification</a> for details).
 </p>
 
 <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="http://golang.org/doc/go_spec.html#Function_declarations">function 
+<a href="/ref/spec#Function_declarations">function 
 literals</a> provide a powerful means of abstracting functionality 
 that can help us here.
 </p>

doc/articles/wiki/wiki.html

 </p>
 
 <p>
-Install Go (see the <a href="/doc/install.html">Installation Instructions</a>).
+Install Go (see the <a href="/doc/install">Installation Instructions</a>).
 </p>
 
 <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="/doc/go_spec.html#Errors">language specification</a> for details).
+<a href="/ref/spec#Errors">language specification</a> for details).
 </p>
 
 <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="http://golang.org/doc/go_spec.html#Function_declarations">function 
+<a href="/ref/spec#Function_declarations">function 
 literals</a> provide a powerful means of abstracting functionality 
 that can help us here.
 </p>

doc/codewalk/markov.xml

 	<br/><br/>
 	For more information about the <code>append</code> function and slices
 	in general see the
-	<a href="http://blog.golang.org/2011/01/go-slices-usage-and-internals.html">Slices: usage and internals</a> article.
+	<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/">
 	"Path": "/project/"
 }-->
 
-<h2 id="the_go_project">The Go Project</h2>
+<img class="gopher" src="/doc/gopher/project.png" />
+
+<div id="manual-nav"></div>
+
+<p>
+Go is an open source project developed by a team at
+<a href="http://google.com/">Google</a> and many
+<a href="/CONTRIBUTORS">contributors</a> from the open source community.
+</p>
+
+<p>
+Go is distributed under a <a href="/LICENSE">BSD-style license</a>.
+</p>
+
+<h3 id="announce"><a href="http://groups.google.com/group/golang-announce">Announcements Mailing List</a></h3>
+<p>
+A low traffic mailing list for important announcements, such as new releases.
+</p>
+<p>
+We encourage all Go users to subscribe to
+<a href="http://groups.google.com/group/golang-announce">golang-announce</a>.
+</p>
+
+<h2 id="resources">Developer Resources</h2>
 
 <h3 id="source"><a href="https://code.google.com/p/go/source">Source Code</a></h3>
 <p>Check out the Go source code.</p>
 
-<h3 id="build_status"><a href="http://build.golang.org/">Build Status</a></h3>
-<p>View the status of Go builds across the supported operating
-systems and architectures.</p>
-
 <h3 id="release"><a href="/doc/devel/release.html">Release History</a></h3>
 <p>A summary of the changes between Go releases.</p>
 
-<h3 id="release"><a href="/doc/devel/weekly.html">Weekly Snapshot History</a></h3>
+<h3 id="weekly"><a href="/doc/devel/weekly.html">Weekly Snapshot History</a></h3>
 <p>A summary of the changes between weekly snapshots of Go.</p>
 
 <h3 id="golang-dev"><a href="http://groups.google.com/group/golang-dev">Developer Mailing List</a></h3>
 <h3 id="golang-checkins"><a href="http://groups.google.com/group/golang-checkins">Checkins Mailing List</a></h3>
 <p>A mailing list that receives a message summarizing each checkin to the Go repository.</p>
 
+<h3 id="build_status"><a href="http://build.golang.org/">Build Status</a></h3>
+<p>View the status of Go builds across the supported operating
+systems and architectures.</p>
+
+
 <h2 id="howto">How you can help</h2>
 
 <h3><a href="http://code.google.com/p/go/issues">Reporting issues</a></h3>
 <a href="http://code.google.com/p/go/issues/list?q=status=HelpWanted">HelpWanted</a>
 are particularly in need of outside help.
 </p>
+
+
+<h2 id="community">The Go Community</h2>
+
+<h3 id="mailinglist"><a href="http://groups.google.com/group/golang-nuts">Go Nuts Mailing List</a></h3>
+<p>The <a href="http://groups.google.com/group/golang-nuts">golang-nuts</a> 
+mailing list is for general Go discussion.</p>
+
+<h3 id="projects"><a href="http://godashboard.appspot.com/project">Go Project Dashboard</a></h3>
+<p>A list of external Go projects including programs and libraries.</p>
+
+<h3 id="irc"><a href="irc:irc.freenode.net/go-nuts">Go IRC Channel</a></h3>
+<p><b>#go-nuts</b> on <b>irc.freenode.net</b> is the official Go IRC channel.</p>
+
+<h3 id="plus"><a href="https://plus.google.com/101406623878176903605/posts">The Go Programming Language at Google+</a></h3>
+<p>The Go project's Google+ page.</p>
+
+<h3 id="twitter"><a href="http://twitter.com/go_nuts">@go_nuts at Twitter</a></h3>
+<p>The Go project's official Twitter account.</p>
+
+<h3 id="blog"><a href="http://blog.golang.org/">The Go Blog</a></h3>
+<p>The official blog of the Go project, featuring news and in-depth articles by
+the Go team and guests.</p>

doc/contribute.html

 <p>
 This document explains how to contribute changes to the Go project.
 It assumes you have installed Go using the
-<a href="install.html">installation instructions</a> and
+<a href="/doc/install">installation instructions</a> and
 have <a href="code.html">written and tested your code</a>.
 (Note that the <code>gccgo</code> frontend lives elsewhere;
 see <a href="gccgo_contribute.html">Contributing to gccgo</a>.)

doc/debugging_with_gdb.html

 <!--{
-	"Title": "Debugging Go Code with GDB"
+	"Title": "Debugging Go Code with GDB",
+	"Path": "/ref/gdb"
 }-->
 
 <p><i>

doc/devel/weekly.html

 hg update weekly.<i>YYYY-MM-DD</i>
 </pre>
 
+<h2 id="2012-03-04">2012-03-04</h2>
+
+<pre>
+This snapshot includes a major re-design of the go/build package.
+Its FindTree, ScanDir, Tree, and DirInfo types have been replaced with the
+Import and Package types. There is no gofix. Code that uses go/build will need
+to be updated manually to use the package's new interface.
+
+Other changes:
+* 6a/6l: add IMUL3Q and SHLDL.
+* all: remove unused unexported functions and constants (thanks Rémy Oudompheng).
+* build: add GO_ prefix to LDFLAGS and GCFLAGS (thanks Gustavo Niemeyer).
+* cmd/cc: fix an out of bounds array access (thanks Anthony Martin),
+	grow some global arrays.
+* cmd/dist: force line-buffering stdout/stderr on Unix (thanks Shenghou Ma),
+	recognize CC="ccache clang" as clang.
+* cmd/go: avoid repeated include dirs (thanks Rémy Oudompheng),
+	fix -I flag for gc command (thanks Gustavo Niemeyer),
+	fix verbose command displaying (thanks Gustavo Niemeyer),
+	fixes for gccgo (thanks Rémy Oudompheng),
+	many fixes,
+	test -i should not disable -c (thanks Shenghou Ma).
+* cmd/vet: don't give error for Printf("%+5.2e", x) (thanks Shenghou Ma).
+* cmd/yacc/units.y: update comment, give better error messages when $GOROOT not set (thanks Shenghou Ma).
+* crypto/tls: force OS X target version to 10.6 for API compatibility (thanks Mikkel Krautz).
+* crypto/x509: fix typo in Verify documentation (thanks Mikkel Krautz).
+* dist: treat CC as one unit (thanks Scott Lawrence).
+* doc/go1: add justification discussions to major changes,
+	minor corrections and updates.
+* doc: describe API changes to go/build,
+	elaborate available checks for cmd/vet (thanks Shenghou Ma),
+	expand code.html to discuss the go tool in more depth,
+	instruct FreeBSD/Linux users to rm the old version first,
+	remove Go for C++ Programmers,
+	remove roadmap document,
+	remove tutorial,
+	update codelab/wiki to Go 1 (thanks Shenghou Ma),
+* encoding/gob: fix "// +build" comment for debug.go (thanks Shenghou Ma),
+	more hardening for lengths of input strings.
+* encoding/json: drop MarshalForHTML; gofix calls to Marshal,
+	escape output from Marshalers.
+* encoding/xml: fix anonymous field Unmarshal example (thanks Gustavo Niemeyer),
+	fix xml test tag usage (thanks Gustavo Niemeyer).
+* gc: disallow absolute import paths,
+	fix escape analysis + inlining + closure bug,
+	fix string comparisons for new bool rules (thanks Anthony Martin),
+	reject import paths containing special characters (thanks Anthony Martin).
+* go/ast: examples for ast.Print, ast.Inspect.
+* go/doc, godoc: fix range of type declarations.
+* go/parser: check import path restrictions,
+	expand test cases for bad import.
+* go/printer, gofmt: improved comment placement.
+* go/printer: fix printing of variadic function calls (thanks Anthony Martin),
+	fix test for new import path restrictions (thanks Anthony Martin),
+	replace multiline logic,
+	simpler exprList code, more tests.
+* godoc: add Examples link to top-level index,
+	bring back highlighting, selections, and alerts,
+	consistent placement of documentation sections,
+	don't show directories w/o packages in flat dir mode,
+	don't show testdata directories,
+	fix codewalks.
+* gotype: provide -comments flag.
+* html/template: make doctype check case-insensitive (thanks Scott Lawrence),
+	use correct method signature in introduction example (thanks Mike Rosset).
+* io: document that I/O is not necessarily safe for parallel access.
+* ld: allow more -L options (thanks Shenghou Ma),
+	fix alignment of rodata section.
+* misc: add zsh completion for go tool (thanks Rémy Oudompheng).
+* misc/bash: Completion for go tool (thanks Yissakhar Z. Beck).
+* misc/dashboard: fix bug in UI template,
+	record install counts for external packages.
+* misc/dist: implement binary distribution scripts in go.
+* misc/gobuilder: send commit time in RFC3339 format.
+* misc/xcode: move Xcode3 specific files into sub directory.
+* net/http/cgi: add an empty response test,
+	fix empty response.
+* net/http/httptest: make Server.Close wait for outstanding requests to finish.
+* net/http/httputil: fix DumpRequestOut on https URLs,
+	make https DumpRequestOut less racy.
+* net/http: add overlooked 418 status code, per RFC 2324,
+	fix ProxyFromEnvironment bug, docs, add tests,
+	make a test more paranoid & reliable on Windows.
+* net/rpc: silence read error on closing connection.
+* net: add stubs for NetBSD (thanks Benny Siegert),
+	make -external flag for tests default to true (thanks Mikio Hara),
+	reorganize test files (thanks Mikio Hara).
+* os: diagnose chdir error during StartProcess,
+	implement UserTime/SystemTime on windows (thanks Alex Brainman),
+	implement sameFile on windows (thanks Alex Brainman),
+	release process handle at the end of windows (*Process).Wait (thanks Alex Brainman),
+	sleep 5ms after process has exited on windows (thanks Alex Brainman).
+* path/filepath: note that SplitList is different from strings.Split,
+	steer people away from HasPrefix.
+* reflect: don't panic comparing functions in DeepEqual.
+	make Value.Interface return immutable data.
+* runtime/pprof: support OS X CPU profiling.
+* runtime: add sanity checks to the runtime-gdb.py prettyprinters,
+	check for ARM syscall failures (thanks Shenghou Ma),
+	darwin and linux signal masking,
+	run init on main thread,
+	size arena to fit in virtual address space limit.
+* spec: allow disallow of \uFFFD in import path,
+	apply method sets, embedding to all types, not just named types,
+	clarifications around exports, uniqueness of identifiers,
+	import path implementation restriction,
+	inside functions, variables must be evaluated,
+	use the term "lexical token" (rather then "lexical symbol").
+* sync: add Once example, remove old WaitGroup example.
+* test/bench/shootout: update post-Makefile.
+* test: add documentation, misc fixes.
+* testing: add -test.example flag to control execution of examples.
+* text/template: add example showing use of custom function,
+	add examples that use multiple templates,
+	fix redefinition bugs.
+* time: add a comment about how to use the Duration constants.
+</pre>
+
 <h2 id="2012-02-22">2012-02-22</h2>
 
 <pre>
 
 <div id="manual-nav"></div>
 
+<h2>Installing Go</h2>
+
+<h3><a href="/doc/install">Getting Started</a></h3>
+<p>
+Instructions for downloading and installing the Go compilers, tools, and
+libraries.
+</p>
+
+
 <h2 id="learning">Learning Go</h2>
 
+<img class="gopher" src="/doc/gopher/doc.png"/>
+
 <h3 id="go_tour"><a href="http://tour.golang.org/">A Tour of Go</a></h3>
 <p>
 An interactive introduction to Go in three sections.
 <a href="http://code.google.com/p/go-tour/">install it locally</a>.
 </p>
 
+<h3 id="code"><a href="code.html">How to write Go code</a></h3>
+<p>
+How to use the <a href="/cmd/go/">go command</a> to fetch, build, and install
+packages, commands, and run tests.
+</p>
+
 <h3 id="effective_go"><a href="effective_go.html">Effective Go</a></h3>
 <p>
 A document that gives tips for writing clear, idiomatic Go code.
 the language specification, both of which should be read first.
 </p>
 
-<h3 id="code"><a href="code.html">How to write Go code</a></h3>
-<p>
-How to write a new package and how to test code.
-</p>
-
 <h3 id="appengine"><a href="http://code.google.com/appengine/docs/go/gettingstarted/">Getting Started with Go on App Engine</a></h3>
 <p>
 How to develop and deploy a simple Go project with
 Answers to common questions about Go.
 </p>
 
-<h3>Other introductory articles</h3>
-
-<ul>
-<li><a href="/doc/articles/wiki/">Writing Web Applications</a> - 
-	building a simple web application.</li>
-</ul>
+<h3 id="wiki"><a href="http://code.google.com/p/go-wiki/wiki">Go Language Community Wiki</a></h3>
+<p>A wiki maintained by the Go community.</p>
 
 <h2 id="articles">Go Articles</h2>
 
+<h3 id="blog"><a href="http://blog.golang.org/">The Go Blog</a></h3>
+<p>The official blog of the Go project, featuring news and in-depth articles by
+the Go team and guests.</p>
+
 <h3>Codewalks</h3>
 <p>
 Guided tours of Go programs. 
 <li><a href="/doc/codewalk/functions">First-Class Functions in Go</a></li>
 <li><a href="/doc/codewalk/markov">Generating arbitrary text: a Markov chain algorithm</a></li>
 <li><a href="/doc/codewalk/sharemem">Share Memory by Communicating</a></li>
+<li><a href="/doc/articles/wiki/">Writing Web Applications</a> - building a simple web application.</li>
 </ul>
 
 <h3>Language</h3>
 <h3>Tools</h3>
 
 <ul>
+<li><a href="/doc/articles/go_command.html">About the Go command</a> - why we wrote it, what it is, what it's not, and how to use it.</li>
 <li><a href="http://blog.golang.org/2011/03/c-go-cgo.html">C? Go? Cgo!</a> - linking against C code with <a href="/cmd/cgo/">cgo</a>.</li>
 <li><a href="http://blog.golang.org/2011/03/godoc-documenting-go-code.html">Godoc: documenting Go code</a> - writing good documentation for <a href="/cmd/godoc/">godoc</a>.</li>
 <li><a href="http://blog.golang.org/2011/06/profiling-go-programs.html">Profiling Go Programs</a></li>
 </ul>
 
-<h2 id="videos_talks">Videos and Talks</h2>
+<h2 id="talks">Talks</h2>
 
-<h3 id="writing_web_apps"><a href="http://www.youtube.com/watch?v=-i0hat7pdpk">Writing Web Apps in Go</a></h3>
+<img class="gopher" src="/doc/gopher/talks.png"/>
+
+<p>
+The talks marked with a red asterisk (<font color="red">*</font>) were written
+before Go 1 and contain some examples that are no longer correct, but they are
+still of value.
+</p>
+
+<h3 id="writing_web_apps"><a href="http://www.youtube.com/watch?v=-i0hat7pdpk">Writing Web Apps in Go</a><font color="red">*</font></h3>
 <p>
 A talk by Rob Pike and Andrew Gerrand presented at Google I/O 2011.
 It walks through the construction and deployment of a simple web application
 See the <a href="/doc/talks/io2011/Writing_Web_Apps_in_Go.pdf">presentation slides</a>.
 </p>
 
-<h3 id="real_world_go"><a href="http://www.youtube.com/watch?v=7QDVRowyUQA">Real World Go</a></h3>
+<h3 id="real_world_go"><a href="http://www.youtube.com/watch?v=7QDVRowyUQA">Real World Go</a><font color="red">*</font></h3>
 <p>
 A talk by Andrew Gerrand presented at Google I/O Bootcamp 2011.
 It gives a broad overview of Go's type system and concurrency model
 See the <a href="/doc/talks/io2011/Real_World_Go.pdf">presentation slides</a>.
 </p>
 
-<h3 id="go_programming"><a href="http://www.youtube.com/watch?v=jgVhBThJdXc">Go Programming</a></h3>
+<h3 id="integrated_apps"><a href="http://www.youtube.com/watch?v=Mo1YKpIF1PQ">Building Integrated Apps on Google's Cloud Platform</a></h3>
+<p>
+A talk by Andrew Gerrand presented at Google Developer Day Japan 2011.
+It discusses the development of a web application that runs on Google
+App Engine and renders images that it stores on Google Cloud Storage.
+</p>
+
+<h3 id="go_programming"><a href="http://www.youtube.com/watch?v=jgVhBThJdXc">Go Programming</a><font color="red">*</font></h3>
 <p>
 A presentation delivered by Rob Pike and Russ Cox at Google I/O 2010.  It
 illustrates how programming in Go differs from other languages through a set of
 embedded types, methods on any type, and program construction using interfaces. 
 </p>
 
-<h3 id="practical_go_programming"><a href="http://www.youtube.com/watch?v=2-pPAvqyluI">Practical Go Programming</a></h3>
+<h3 id="practical_go_programming"><a href="http://www.youtube.com/watch?v=2-pPAvqyluI">Practical Go Programming</a><font color="red">*</font></h3>
 <p>
 This talk presents the development of a complete web application in Go.
 It looks at design, storage, concurrency, and scaling issues in detail, using
 See the <a href="http://wh3rd.net/practical-go/">presentation slides</a>.
 </p>
 
-<h3 id="techtalk"><a href="http://www.youtube.com/watch?v=rKnDgT73v8s">The Go Tech Talk</a></h3>
+<h3 id="talks_more">More</h3>
 <p>
-An hour-long talk delivered by Rob Pike at Google in October 2009. 
-The language's first public introduction. (See the <a href="talks/go_talk-20091030.pdf">slides in PDF format</a>.) The language has changed since it was made,
-but it's still a good introduction.
+See the <a href="http://code.google.com/p/go-wiki/wiki/GoTalks">GoTalks
+page</a> at the <a href="http://code.google.com/p/go-wiki/wiki">Go Wiki</a> for
+more Go talks.
 </p>
 
-<h3 id="jaoo_go"><a href="/doc/ExpressivenessOfGo.pdf">The Expressiveness Of Go</a></h3>
+<h2 id="nonenglish">Non-English Documentation</h2>
+
 <p>
-A discussion of the qualities that make Go an expressive and comprehensible
-language.  The talk was presented by Rob Pike at JAOO 2010.
-The recording of the event was lost due to a hardware error.
+See the <a href="http://code.google.com/p/go-wiki/wiki/NonEnglish">NonEnglish</a> page 
+at the <a href="http://code.google.com/p/go-wiki/wiki">Go Wiki</a> for localized
+documentation.
 </p>
 
-<h3 id="oscon_go"><a href="http://www.oscon.com/oscon2010/public/schedule/detail/14760">Another Go at Language Design</a></h3>
-<p>
-A tour, with some background, of the major features of Go, intended for
-an audience new to the language.  The talk was presented at OSCON 2010.
-See the <a href="http://assets.en.oreilly.com/1/event/45/Another%20Go%20at%20Language%20Design%20Presentation.pdf">presentation slides</a>.
-</p>
-<p>
-This talk was also delivered at Sydney University in September 2010. A video
-of the lecture is available 
-<a href="http://sydney.edu.au/engineering/it/videos/seminar_pike">here</a>.
-</p>
+<h2 id="community">The Go Community</h2>
 
-<h3 id="emerging_go"><a href="http://www.oscon.com/oscon2010/public/schedule/detail/15464">Go Emerging Languages Conference Talk</a></h3>
-<p>
-Rob Pike's Emerging Languages Conference presentation delivered in July 2010. See the <a href="http://assets.en.oreilly.com/1/event/45/Go%20Presentation.pdf">presentation slides</a>. Abstract:
-</p>
-<p><i>
-Go’s approach to concurrency differs from that of many languages, even those
-(such as Erlang) that make concurrency central, yet it has deep roots. The path
-from Hoare’s 1978 paper to Go provides insight into how and why Go works as it
-does.
-</i></p>
-
-<h3 id="go_frontend_gcc"><a href="talks/gofrontend-gcc-summit-2010.pdf">The Go frontend for GCC</a></h3>
-<p>
-A description of the Go language frontend for gcc.
-Ian Lance Taylor's paper delivered at the GCC Summit 2010.
-</p>
-
-<h3 id="promo_video"><a href="http://www.youtube.com/watch?v=wwoWei-GAPo">The Go Promo Video</a></h3>
-<p>
-A short promotional video featuring Russ Cox demonstrating Go's fast compiler.
-</p>
-
-<h2 id="developer_info">The Go Community</h2>
+<img class="gopher" src="/doc/gopher/project.png"/>
 
 <h3 id="mailinglist"><a href="http://groups.google.com/group/golang-nuts">Go Nuts Mailing List</a></h3>
 <p>The <a href="http://groups.google.com/group/golang-nuts">golang-nuts</a> 
 mailing list is for general Go discussion.</p>
 
-<h3 id=""><a href="http://godashboard.appspot.com/package">Go Packages Dashboard</a></h3>
-<p>A list of the most popular <a href="/cmd/goinstall/">goinstall</a>'d
-Go libraries.</p>
-
-<h3 id=""><a href="http://godashboard.appspot.com/project">Go Project Dashboard</a></h3>
+<h3 id="projects"><a href="http://godashboard.appspot.com/project">Go Project Dashboard</a></h3>
 <p>A list of external Go projects including programs and libraries.</p>
 
 <h3 id="irc"><a href="irc:irc.freenode.net/go-nuts">Go IRC Channel</a></h3>
 <p><b>#go-nuts</b> on <b>irc.freenode.net</b> is the official Go IRC channel.</p>
 
+<h3 id="plus"><a href="https://plus.google.com/101406623878176903605/posts">The Go Programming Language at Google+</a></h3>
+<p>The Go project's Google+ page.</p>
+
 <h3 id="twitter"><a href="http://twitter.com/go_nuts">@go_nuts at Twitter</a></h3>
 <p>The Go project's official Twitter account.</p>
-
-<h2 id="tutorials_nonenglish">Non-English Documentation</h2>
-
-<h4 id="docs_be">Belarusian &mdash; Беларуская</h4>
-
-<ul>
-<li><a href="http://www.designcontest.com/show/faq-be">faq-be</a> - Frequently Asked Questions.</li>
-</ul>
-
-<h4 id="docs_cn">Chinese &mdash; 中文</h4>
-
-<ul>
-<li><a href="http://go-tour-zh.appspot.com/">A Tour of Go</a></li>
-<li><a href="http://code.google.com/p/golang-china/">golang-china</a> - a broad range of Go documentation.</li>
-<li><a href="http://code.google.com/p/ac-me/downloads/detail?name=fango.pdf">Effective Go and (old) Tutorial</a></li>
-</ul>
-
-<h4 id="docs_cz">Czech &mdash; Čeština</h4>
-
-<ul>
-<li><a href="http://www.abclinuxu.cz/clanky/google-go-pravidla-reflexe">Pravidla reflexe</a> - a translation of <a href="http://blog.golang.org/2011/09/laws-of-reflection.html">The Laws of Reflection</a>.</li>
-</ul>
-
-<h4 id="docs_fr">French &mdash; Français</h4>
-
-<ul>
-<li>
-<a href="http://code.google.com/p/golang-france/">golang-france</a> - Go documentation.
-</ul>
-
-<h4 id="docs_de">German &mdash; Deutsch</h4>
-
-<ul>
-<li><a href="http://bitloeffel.de/DOC/golang/go_tutorial_de.html">Eine Anleitung zum Programmieren in Go</a> - the (old) Go Tutorial.</li>
-<li><a href="http://bitloeffel.de/DOC/golang/effective_go_de.html">Wirkungsvoll Go programmieren</a> - Effective Go.</li>
-<li><a href="http://bitloeffel.de/DOC/golang/code_de.html">Wie man Go-Kode schreibt</a> - How to Write Go Code.</li>
-</ul>
-
-<h4 id="docs_jp">Japanese &mdash; 日本語</h4>
-<ul>
-<li><a href="http://go-tour-jp.appspot.com/">A Tour of Go</a></li>
-<li><a href="http://golang.jp/">golang.jp</a> - Go documentation and news.</li>
-</ul>
-
-<h4 id="docs_kr">Korean &mdash; 한국어</h4>
-<ul>
-<li><a href="http://go-tour-kr.appspot.com">A Tour of Go</a></li>
-<li><a href="http://code.google.com/p/golang-korea">golang-korea</a> - Go documentation and news.</li>
-</ul>

doc/effective_go.html

 
 <p>
 This document gives tips for writing clear, idiomatic Go code.
-It augments the <a href="go_spec.html">language specification</a>,
+It augments the <a href="/ref/spec">language specification</a>,
 the <a href="http://tour.golang.org/">Tour of Go</a>,
 and <a href="/doc/code.html">How to Write Go Code</a>,
 all of which you
 approach and let the machine
 take care of most formatting issues.
 The <code>gofmt</code> program
-(also available as <code>go tool fmt</code>, which
+(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
 <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.) The only restriction is that, although
-goroutines can be launched during initialization, they will not begin
-execution until it completes; initialization always runs as a single thread
-of execution.
+<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

doc/effective_go.tmpl

 
 <p>
 This document gives tips for writing clear, idiomatic Go code.
-It augments the <a href="go_spec.html">language specification</a>,
+It augments the <a href="/ref/spec">language specification</a>,
 the <a href="http://tour.golang.org/">Tour of Go</a>,
 and <a href="/doc/code.html">How to Write Go Code</a>,
 all of which you
 approach and let the machine
 take care of most formatting issues.
 The <code>gofmt</code> program
-(also available as <code>go tool fmt</code>, which
+(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
 <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.) The only restriction is that, although
-goroutines can be launched during initialization, they will not begin
-execution until it completes; initialization always runs as a single thread
-of execution.
+<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

doc/gccgo_contribute.html

 <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="contribute.html">Contributing to the Go project</a>.  For
+see <a href="/doc/contribute.html">Contributing to the Go project</a>.  For
 information on building gccgo for yourself,
-see <a href="gccgo_install.html">Setting up and using gccgo</a>.
+see <a href="/doc/gccgo_install.html">Setting up and using gccgo</a>.
 </p>
 
 <h2>Legal Prerequisites</h2>
 
 <p>
-You must follow the <a href="contribute.html#copyright">Go copyright
+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="http://gcc.gnu.org/contribute.html">GCC

doc/gccgo_install.html

 <!--{
 	"Title": "Setting up and using gccgo",
-	"Path": "/install/gccgo/"
+	"Path": "/doc/install/gccgo"
 }-->
 
 <p>
 
 <p>
 Note that <code>gccgo</code> is not the <code>6g</code> compiler; see
-the <a href="install.html">Installing Go</a> instructions for that
+the <a href="/doc/install">Installing Go</a> instructions for that
 compiler.
 </p>
 
 Note that although <code>gcc.gnu.org</code> is the most convenient way
 to get the source code for the compiler, that is not where the master
 sources live.  If you want to contribute changes to the gccgo
-compiler, see <a href="gccgo_contribute.html">Contributing to
+compiler, see <a href="/doc/gccgo_contribute.html">Contributing to
 gccgo</a>.
 </p>
 
 <h3 id="subrepo">Packages moving to subrepositories</h3>
 
 <p>
-Go 1 has moved a number of packages into sub-repositories of
+Go 1 has moved a number of packages into other repositories, usually sub-repositories of
 <a href="http://code.google.com/p/go/">the main Go repository</a>.
 This table lists the old and new import paths:
 
 </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>
         return
     }
     delta := wakeup.Sub(now) // A Duration.
-    log.Printf(&#34;Sleeping for %.3fs&#34;, delta.Seconds())
+    fmt.Printf(&#34;Sleeping for %.3fs\n&#34;, delta.Seconds())
     time.Sleep(delta)
 }</pre>
 
 <h3 id="subrepo">Packages moving to subrepositories</h3>
 
 <p>
-Go 1 has moved a number of packages into sub-repositories of
+Go 1 has moved a number of packages into other repositories, usually sub-repositories of
 <a href="http://code.google.com/p/go/">the main Go repository</a>.
 This table lists the old and new import paths:
 
 </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>

doc/go1compat.html

 in a separate package should use the tagged notation.
 </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>
+
 </ul>
 
 <p>
 license.
 </p>
 
-<h3 id="What_kind_of_a_name_is_6g">
-What kind of a name is 6g?</h3>
-
-<p>
-The <code>6g</code> (and <code>8g</code> and <code>5g</code>) compiler is named in the
-tradition of the Plan 9 C compilers, described in
-<a href="http://plan9.bell-labs.com/sys/doc/compiler.html">
-http://plan9.bell-labs.com/sys/doc/compiler.html</a>
-(see the table in section 2).
-
-<code>6</code> is the architecture letter for amd64 (or x86-64, if you prefer), while
-<code>g</code> stands for Go.
-</p>
-
 <h3 id="history">
 What is the history of the project?</h3>
 <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="http://blog.golang.org/2011/07/error-handling-and-go.html">A
-canonical error type, coupled
-with Go's other features</a>, makes error
-handling pleasant but quite different from that in other languages.
+<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>
 </p>
 
 <p>
-See the <a href="http://blog.golang.org/2010/08/defer-panic-and-recover.html">Defer, Panic, and Recover</a> article for details.
+See the <a href="/doc/articles/defer_panic_recover.html">Defer, Panic, and Recover</a> article for details.
 </p>
 
 <h3 id="assertions">
 
 <p>
 We haven't fully defined it all yet, but some details about atomicity are
-available in the <a href="go_mem.html">Go Memory Model specification</a>.
+available in the <a href="/ref/mem">Go Memory Model specification</a>.
 </p>
 
 <p>
 multiple OS threads.
 This is because sending data between threads involves switching
 contexts, which has significant cost.
-For instance, the <a href="/doc/go_spec.html#An_example_package">prime sieve example</a>
+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 <code>GOMAXPROCS</code> is more likely to slow it down than
 to speed it up.
 Why do T and *T have different method sets?</h3>
 
 <p>
-From the <a href="http://golang.org/doc/go_spec.html#Types">Go Spec</a>:
+From the <a href="/ref/spec#Types">Go Spec</a>:
 </p>
 
 <blockquote>
 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="http://golang.org/src/pkg/fmt/fmt_test.go">the formatting
-tests for the <code>fmt</code> package</a>.
+<a href="/src/pkg/fmt/fmt_test.go">the formatting tests for the <code>fmt</code> package</a>.
 </p>
 
 
 </p>
 
 <p>
-A trivial C "hello, world" program compiled and linked statically using gcc
-on Linux is around 750 kB.  An equivalent Go program using <code>fmt.Printf</code>
-is around 1.3 MB, but
+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>
+is around 1.2 MB, but
 that includes more powerful run-time support.
 </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="http://golang.org/cmd/gofmt/"><code>gofmt</code></a>,
+<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 new language and
 <code>gofmt</code>'s style is as good as any other.  More
 <!--{
 	"Title": "The Go Memory Model",
-	"Subtitle": "Version of June 10, 2011"
+	"Subtitle": "Version of March 6, 2012"
+	"Path": "/ref/mem"
 }-->
 
 <style>
 <h3>Initialization</h3>
 
 <p>
-Program initialization runs in a single goroutine and
-new goroutines created during initialization do not
-start running until initialization ends.
+Program initialization runs in a single goroutine,
+but that goroutine may create other goroutines,
+which run concurrently.
 </p>
 
 <p class="rule">
 all <code>init</code> functions have finished.
 </p>
 
-<p class="rule">
-The execution of any goroutines created during <code>init</code>
-functions happens after all <code>init</code> functions have finished.
-</p>
-
 <h3>Goroutine creation</h3>
 
 <p class="rule">
 <!--{
 	"Title": "The Go Programming Language Specification",
-	"Subtitle": "Version of March 1, 2012"
+	"Subtitle": "Version of March 1, 2012",
+	"Path": "/ref/spec"
 }-->
 
 <!--

doc/gopher/doc.png

Added
New image

doc/gopher/frontpage.png

Old
Old image
New
New image

doc/gopher/help.png

Added
New image

doc/gopher/pkg.png

Added
New image

doc/gopher/project.png

Added
New image

doc/gopher/run.png

Added
New image

doc/gopher/talks.png

Added
New image
+<!--{
+	"Title": "Getting Help",
+	"Path": "/help/"
+}-->
+
+<img class="gopher" src="/doc/gopher/help.png"/>
+
+<p>
+Need help with Go? Try these resources.
+</p>
+
+<div id="manual-nav"></div>
+
+<h3 id="go_faq"><a href="/doc/go_faq.html">Frequently Asked Questions (FAQ)</a></h3>
+<p>Answers to common questions about Go.</p>
+
+<h3 id="wiki"><a href="http://code.google.com/p/go-wiki/wiki">Go Language Community Wiki</a></h3>
+<p>A wiki maintained by the Go community.</p>
+
+<h3 id="mailinglist"><a href="http://groups.google.com/group/golang-nuts">Go Nuts Mailing List</a></h3>
+<p>
+Search the <a href="http://groups.google.com/group/golang-nuts">golang-nuts</a>
+archives and consult the <a href="/doc/go_faq.html">FAQ</a> and
+<a href="http://code.google.com/p/go-wiki/wiki">wiki</a> before posting.
+</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>
+
+<h3 id="twitter"><a href="http://twitter.com/go_nuts">@go_nuts at Twitter</a></h3>
+<p>The Go project's official Twitter account.</p>
+<p>Tweeting your about problem with the <code>#golang</code> hashtag usually
+generates some helpful responses.</p>
+
+<h3 id="plus"><a href="https://plus.google.com/101406623878176903605/posts">The Go Programming Language at Google+</a></h3>
+<p>The Go project's Google+ page.</p>
+

doc/install-source.html

 <!--{
 	"Title": "Installing Go from source",
-	"Path": "/install/source/"
+	"Path": "/doc/install/source"
 }-->
 
 <h2 id="introduction">Introduction</h2>
 <p>
 Most users don't need to do this, and will instead install
 from precompiled binary packages as described in
-<a href="/doc/install.html">Getting Started</a>,
+<a href="/doc/install">Getting Started</a>,
 a much simpler process.
 If you want to help develop what goes into those precompiled
 packages, though, read on.
 compiler and tools (<code>6g</code>, <code>8g</code> etc.).
 For information on how to work on <code>gccgo</code>, a more traditional
 compiler using the GCC back end, see
-<a href="/doc/gccgo_install.html">Setting up and using gccgo</a>.
+<a href="/doc/install/gccgo">Setting up and using gccgo</a>.
 </p>
 
 <p>
 </p>
 
 <p>
-<font color="red">TODO: add Windows compiler info</font>
+On Windows, install <code>gcc</code> with
+<a href="http://www.mingw.org/">MinGW</a>.
+(Make sure you add its <code>bin</code> subdirectory to your <code>PATH</code>.)
 </p>
 
 <h2 id="mercurial">Install Mercurial, if needed</h2>
 <p>
 To perform the next step you must have Mercurial installed. (Check that you
 have an <code>hg</code> command.) This suffices to install Mercurial on most
-systems:
+Unix systems:
 </p>
 
 <pre>
 </pre>
 
 <p>
-On Ubuntu/Debian, 
-the Mercurial in your distribution's
+On Ubuntu/Debian, the Mercurial in your distribution's
 package repository is most likely old and broken.
 You might try this first:
 </p>
 <pre>apt-get install python-setuptools python-dev build-essential</pre>
 
 <p>
-If that fails, try installing manually from the
+If that fails, or if you use Windows, install manually from the
 <a href="http://mercurial.selenic.com/wiki/Download">Mercurial Download</a>
 page.
 </p>
 <h2 id="releases">Keeping up with releases</h2>
 
 <p>
-XXX TODO XXX
+The Go project maintains two stable tags in its Mercurial repository:
+<code>release</code> and <code>weekly</code>.
 </p>
 
 <p>
-The Go project maintains two stable tags in its Mercurial repository:
-<code>release</code> and <code>weekly</code>.
-The <code>weekly</code> tag is updated about once a week, and should be used by
-those who want to track the project's development.
-The <code>release</code> tag is given, less often, to those weekly releases
-that have proven themselves to be robust.
-</p>
-
-<p>
-Most Go users will want to keep their Go installation at the latest
-<code>release</code> tag.
-New releases are announced on the
+The <code>release</code> tag refers to the current stable release of Go.
+Most Go users should use this version. New releases are announced on the
 <a href="http://groups.google.com/group/golang-announce">golang-announce</a>
 mailing list.
 </p>
 </pre>
 
 <p>
+The <code>weekly</code> tag is updated about once a week, and should be used 
+only by those who are actively working on the Go core.
 To use the <code>weekly</code> tag run <code>hg update weekly</code> instead.
 </p>
 
 to override the defaults.
 </p>
 
-<dl>
-<dt>
-	<code>$GOROOT</code>
-</dt>
-<dd>
-	<p>
-	XXX FONT IS WRONG IN THESE ENTRIES XXX
-	XXX I NEED SOME SPAN THING XXX
-	The root of the Go tree, often <code>$HOME/go</code>.
-	Its value is built into the tree when it is compiled, and
-	defaults to the parent of the directory where <code>all.bash</code> was run.
-	There is no need to set this unless you want to switch between multiple
-	local copies of the repository.
-	</p>
-</dd>
+<blockquote>
 
-<dt>
-	<code>$GOROOT_FINAL</code>
-</dt>
-<dd>
-	<p>
-	The value assumed by installed binaries and scripts when
-	<code>$GOROOT</code> is not set explicitly.
-	It defaults to the value of <code>$GOROOT</code>.
-	If you want to build the Go tree in one location
-	but move it elsewhere after the build, set 
-	<code>$GOROOT_FINAL</code> to the eventual location.
-	</p>
-</dd>
+<p><code>$GOROOT</code></p>
+<p>
+The root of the Go tree, often <code>$HOME/go</code>.
+Its value is built into the tree when it is compiled, and
+defaults to the parent of the directory where <code>all.bash</code> was run.
+There is no need to set this unless you want to switch between multiple
+local copies of the repository.
+</p>
 
-<dt>
-<code>$GOOS</code> and <code>$GOARCH</code>
-</dt>
-<dd>
-	<p>
-	The name of the target operating system and compilation architecture.
-	These default to the values of <code>$GOHOSTOS</code> and
-	<code>$GOHOSTARCH</code> respectively (described below).
+<p><code>$GOROOT_FINAL</code></p>
+<p>
+The value assumed by installed binaries and scripts when
+<code>$GOROOT</code> is not set explicitly.
+It defaults to the value of <code>$GOROOT</code>.
+If you want to build the Go tree in one location
+but move it elsewhere after the build, set 
+<code>$GOROOT_FINAL</code> to the eventual location.
+</p>
 
-	<p>
-	Choices for <code>$GOOS</code> are
-	<code>darwin</code> (Mac OS X 10.5 and above), <code>freebsd</code>,
-	<code>linux</code>, <code>netbsd</code>, <code>openbsd</code>, 
-	<code>plan9</code>, and <code>windows</code>.
-	Choices for <code>$GOARCH</code> are
-	<code>amd64</code> (64-bit x86, the most mature port),
-	<code>386</code> (32-bit x86), and <code>arm</code> (32-bit ARM).
-	The valid combinations of <code>$GOOS</code> and <code>$GOARCH</code> are:
-	<table cellpadding="0">
-	<tr>
-	<th width="50"><th align="left" width="100"><code>$GOOS</code></th> <th align="left" width="100"><code>$GOARCH</code></th> <th align="left"></th>
-	</tr>
-	<tr>
-	<td></td><td><code>darwin</code></td> <td><code>386</code></td>
-	</tr>
-	<tr>
-	<td></td><td><code>darwin</code></td> <td><code>amd64</code></td>
-	</tr>
-	<tr>
-	<td></td><td><code>freebsd</code></td> <td><code>386</code></td>
-	</tr>
-	<tr>
-	<td></td><td><code>freebsd</code></td> <td><code>amd64</code></td>
-	</tr>
-	<tr>
-	<td></td><td><code>linux</code></td> <td><code>386</code></td>
-	</tr>
-	<tr>
-	<td></td><td><code>linux</code></td> <td><code>amd64</code></td>
-	</tr>
-	<tr>
-	<td></td><td><code>linux</code></td> <td><code>arm</code></td>
-	</tr>
-	<tr>
-	<td></td><td><code>netbsd</code></td> <td><code>386</code></td>
-	</tr>
-	<tr>
-	<td></td><td><code>netbsd</code></td> <td><code>amd64</code></td>
-	</tr>
-	<tr>
-	<td></td><td><code>openbsd</code></td> <td><code>386</code></td>
-	</tr>
-	<tr>
-	<td></td><td><code>openbsd</code></td> <td><code>amd64</code></td>
-	</tr>
-	<tr>
-	<td></td><td><code>plan9</code></td> <td><code>386</code></td>
-	</tr>
-	<tr>
-	<td></td><td><code>windows</code></td> <td><code>386</code></td>
-	</tr>
-	<tr>
-	<td></td><td><code>windows</code></td> <td><code>amd64</code></td>
-	</tr>
-	</table>
-</dd>
+<p><code>$GOOS</code> and <code>$GOARCH</code></p>
+<p>
+The name of the target operating system and compilation architecture.
+These default to the values of <code>$GOHOSTOS</code> and
+<code>$GOHOSTARCH</code> respectively (described below).
 
-<dt>
-<code>$GOHOSTOS</code> and <code>$GOHOSTARCH</code>
-</dt>
-<dd>
-	<p>
-	The name of the host operating system and compilation architecture.
-	These default to the local system's operating system and
-	architecture.
+<p>
+Choices for <code>$GOOS</code> are
+<code>darwin</code> (Mac OS X 10.6 and above), <code>freebsd</code>,
+<code>linux</code>, <code>netbsd</code>, <code>openbsd</code>, 
+<code>plan9</code>, and <code>windows</code>.
+Choices for <code>$GOARCH</code> are
+<code>amd64</code> (64-bit x86, the most mature port),
+<code>386</code> (32-bit x86), and <code>arm</code> (32-bit ARM).
+The valid combinations of <code>$GOOS</code> and <code>$GOARCH</code> are:
+<table cellpadding="0">
+<tr>
+<th width="50"><th align="left" width="100"><code>$GOOS</code></th> <th align="left" width="100"><code>$GOARCH</code></th> <th align="left"></th>
+</tr>
+<tr>