Commits

Joseph Poirier committed 04eb61a Merge

Merged changes from golang.

Comments (0)

Files changed (436)

 Amrut Joshi <amrut.joshi@gmail.com>
 Andrei Vieru <euvieru@gmail.com>
 Andrew Balholm <andybalholm@gmail.com>
+Andrew Lutomirski <andy@luto.us>
 Andrew Pritchard <awpritchard@gmail.com>
 Andrew Skiba <skibaa@gmail.com>
+Andrew Wilkins <axwalk@gmail.com>
 Andrey Mirtchovski <mirtchovski@gmail.com>
 Andy Davis <andy@bigandian.com>
 Anh Hai Trinh <anh.hai.trinh@gmail.com>
 Blake Mizerany <blake.mizerany@gmail.com>
 Bobby Powers <bobbypowers@gmail.com>
 Caine Tighe <arctanofyourface@gmail.com>
+Carlos Castillo <cookieo9@gmail.com>
 Charles L. Dorian <cldorian@gmail.com>
 Chris Dollin <ehog.hedge@gmail.com>
 Chris Farmiloe <chrisfarms@gmail.com>
 Jeff R. Allen <jra@nella.org>
 Jeremy Jackins <jeremyjackins@gmail.com>
 Jim McGrath <jimmc2@gmail.com>
+Joakim Sernbrant <serbaut@gmail.com>
 Joe Poirier <jdpoirier@gmail.com>
 John Asmuth <jasmuth@gmail.com>
 Jonathan Gold <jgold.bg@gmail.com>
 Josh Goebel <dreamer3@gmail.com>
 Jukka-Pekka Kekkonen <karatepekka@gmail.com>
 Julian Phillips <julian@quantumfyre.co.uk>
+Julien Schmidt <google@julienschmidt.com>
 Kai Backman <kaib@golang.org>
 Kei Son <hey.calmdown@gmail.com>
 Keith Rarick <kr@xph.us>
 Mateusz Czapliński <czapkofan@gmail.com>
 Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
 Mats Lidell <mats.lidell@cag.se>
+Matt Jibson <matt.jibson@gmail.com>
 Matthew Horsnell <matthew.horsnell@gmail.com>
 Micah Stetson <micah.stetson@gmail.com>
 Michael Chaten <mchaten@gmail.com>
 Paul Lalonde <paul.a.lalonde@gmail.com>
 Paul Sbarra <Sbarra.Paul@gmail.com>
 Petar Maymounkov <petarm@gmail.com>
+Peter Armitage <peter.armitage@gmail.com>
 Peter Froehlich <peter.hans.froehlich@gmail.com>
 Peter Kleiweg <pkleiweg@xs4all.nl>
 Peter Mundy <go.peter.90@gmail.com>
 Taru Karttunen <taruti@taruti.net>
 Thomas Alan Copeland <talan.copeland@gmail.com>
 Timo Savola <timo.savola@gmail.com>
+Tobias Columbus <tobias.columbus@gmail.com>
 Tor Andersson <tor.andersson@gmail.com>
 Ugorji Nwoke <ugorji@gmail.com>
 Vadim Vygonets <unixdj@gmail.com>
 Andrei Vieru <euvieru@gmail.com>
 Andrew Balholm <andybalholm@gmail.com>
 Andrew Gerrand <adg@golang.org>
+Andrew Lutomirski <andy@luto.us>
 Andrew Pritchard <awpritchard@gmail.com>
 Andrew Skiba <skibaa@gmail.com>
+Andrew Wilkins <axwalk@gmail.com>
 Andrey Mirtchovski <mirtchovski@gmail.com>
 Andy Davis <andy@bigandian.com>
 Anh Hai Trinh <anh.hai.trinh@gmail.com>
 Brian Dellisanti <briandellisanti@gmail.com>
 Brendan O'Dea <bod@golang.org>
 Caine Tighe <arctanofyourface@gmail.com>
+Carlos Castillo <cookieo9@gmail.com>
 Cary Hull <chull@google.com>
 Charles L. Dorian <cldorian@gmail.com>
 Chris Dollin <ehog.hedge@gmail.com>
 Daniel Nadasi <dnadasi@google.com>
 Daniel Theophanes <kardianos@gmail.com>
 Darren Elwood <darren@textnode.com>
+Dave Borowitz <dborowitz@google.com>
 Dave Cheney <dave@cheney.net>
 Dave Grijalva <dgrijalva@ngmoco.com>
 David Anderson <danderson@google.com>
 Jeff R. Allen <jra@nella.org> <jeff.allen@gmail.com>
 Jeremy Jackins <jeremyjackins@gmail.com>
 Jim McGrath <jimmc2@gmail.com>
+Joakim Sernbrant <serbaut@gmail.com>
 Joe Poirier <jdpoirier@gmail.com>
 Joel Sing <jsing@google.com>
 Johan Euphrosine <proppy@google.com>
 Josh Goebel <dreamer3@gmail.com>
 Jukka-Pekka Kekkonen <karatepekka@gmail.com>
 Julian Phillips <julian@quantumfyre.co.uk>
+Julien Schmidt <google@julienschmidt.com>
 Kai Backman <kaib@golang.org>
 Kei Son <hey.calmdown@gmail.com>
 Keith Rarick <kr@xph.us>
 Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
 Mats Lidell <mats.lidell@cag.se> <mats.lidell@gmail.com>
 Matt Jones <mrjones@google.com>
+Matt Jibson <matt.jibson@gmail.com>
 Matthew Horsnell <matthew.horsnell@gmail.com>
 Maxim Pimenov <mpimenov@google.com>
 Maxim Ushakov <ushakov@google.com>
 Paul Lalonde <paul.a.lalonde@gmail.com>
 Paul Sbarra <Sbarra.Paul@gmail.com>
 Petar Maymounkov <petarm@gmail.com>
+Peter Armitage <peter.armitage@gmail.com>
 Peter Froehlich <peter.hans.froehlich@gmail.com>
 Peter Kleiweg <pkleiweg@xs4all.nl>
 Peter McKenzie <petermck@google.com>
 Taru Karttunen <taruti@taruti.net>
 Thomas Alan Copeland <talan.copeland@gmail.com>
 Timo Savola <timo.savola@gmail.com>
+Tobias Columbus <tobias.columbus@gmail.com>
 Tom Szymanski <tgs@google.com>
 Tor Andersson <tor.andersson@gmail.com>
 Trevor Strohman <trevor.strohman@gmail.com>

File contents unchanged.

 pkg archive/tar, func FileInfoHeader(os.FileInfo, string) (*Header, error)
+pkg bytes, method (*Buffer) Grow(int)
 pkg crypto/tls, const TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA uint16
 pkg crypto/tls, const TLS_RSA_WITH_AES_256_CBC_SHA uint16
 pkg crypto/x509, const ECDSA PublicKeyAlgorithm
 pkg crypto/x509, const ExtKeyUsageIPSECUser ExtKeyUsage
 pkg crypto/x509, const IncompatibleUsage InvalidReason
 pkg crypto/x509, type VerifyOptions struct, KeyUsages []ExtKeyUsage
+pkg debug/elf, method (*File) DynString(DynTag) ([]string, error)
 pkg debug/elf, type FileHeader struct, Entry uint64
 pkg encoding/json, method (*Decoder) UseNumber()
 pkg encoding/json, method (Number) Float64() (float64, error)
 pkg go/ast, method (CommentMap) String() string
 pkg go/ast, method (CommentMap) Update(Node) Node
 pkg go/ast, type CommentMap map[Node][]*CommentGroup
+pkg go/build, type Package struct, SwigCXXFiles []string
+pkg go/build, type Package struct, SwigFiles []string
 pkg go/doc, var IllegalPrefixes []string
 pkg image, const YCbCrSubsampleRatio440 YCbCrSubsampleRatio
 pkg math/big, method (*Int) MarshalJSON() ([]byte, error)
 pkg syscall (darwin-386), const VTDLY ideal-int
 pkg syscall (darwin-386), const VTIME ideal-int
 pkg syscall (darwin-386), const VWERASE ideal-int
+pkg syscall (darwin-386), func SlicePtrFromStrings([]string) ([]*byte, error)
 pkg syscall (darwin-386), type Termios struct
 pkg syscall (darwin-386), type Termios struct, Cc [20]uint8
 pkg syscall (darwin-386), type Termios struct, Cflag uint32
 pkg syscall (darwin-386-cgo), const VTDLY ideal-int
 pkg syscall (darwin-386-cgo), const VTIME ideal-int
 pkg syscall (darwin-386-cgo), const VWERASE ideal-int
+pkg syscall (darwin-386-cgo), func SlicePtrFromStrings([]string) ([]*byte, error)
 pkg syscall (darwin-386-cgo), type Termios struct
 pkg syscall (darwin-386-cgo), type Termios struct, Cc [20]uint8
 pkg syscall (darwin-386-cgo), type Termios struct, Cflag uint32
 pkg syscall (darwin-amd64), const VTDLY ideal-int
 pkg syscall (darwin-amd64), const VTIME ideal-int
 pkg syscall (darwin-amd64), const VWERASE ideal-int
+pkg syscall (darwin-amd64), func SlicePtrFromStrings([]string) ([]*byte, error)
 pkg syscall (darwin-amd64), type Termios struct
 pkg syscall (darwin-amd64), type Termios struct, Cc [20]uint8
 pkg syscall (darwin-amd64), type Termios struct, Cflag uint64
 pkg syscall (darwin-amd64-cgo), const VTDLY ideal-int
 pkg syscall (darwin-amd64-cgo), const VTIME ideal-int
 pkg syscall (darwin-amd64-cgo), const VWERASE ideal-int
+pkg syscall (darwin-amd64-cgo), func SlicePtrFromStrings([]string) ([]*byte, error)
 pkg syscall (darwin-amd64-cgo), type Termios struct
 pkg syscall (darwin-amd64-cgo), type Termios struct, Cc [20]uint8
 pkg syscall (darwin-amd64-cgo), type Termios struct, Cflag uint64
 pkg syscall (darwin-amd64-cgo), type Termios struct, Oflag uint64
 pkg syscall (darwin-amd64-cgo), type Termios struct, Ospeed uint64
 pkg syscall (darwin-amd64-cgo), type Termios struct, Pad_cgo_0 [4]byte
+pkg syscall (freebsd-386), func SlicePtrFromStrings([]string) ([]*byte, error)
+pkg syscall (freebsd-amd64), func SlicePtrFromStrings([]string) ([]*byte, error)
 pkg syscall (freebsd-amd64), func Syscall9(uintptr) (uintptr, Errno)
+pkg syscall (linux-386), func SlicePtrFromStrings([]string) ([]*byte, error)
+pkg syscall (linux-386-cgo), func SlicePtrFromStrings([]string) ([]*byte, error)
+pkg syscall (linux-amd64), func SlicePtrFromStrings([]string) ([]*byte, error)
+pkg syscall (linux-amd64-cgo), func SlicePtrFromStrings([]string) ([]*byte, error)
+pkg syscall (linux-arm), func SlicePtrFromStrings([]string) ([]*byte, error)
 pkg syscall (windows-386), const CREATE_NEW_PROCESS_GROUP ideal-int
 pkg syscall (windows-386), const CTRL_BREAK_EVENT ideal-int
 pkg syscall (windows-386), const CTRL_C_EVENT ideal-int
 pkg syscall (windows-386), func Getsockopt(Handle, int32, int32, *byte, *int32) error
+pkg syscall (windows-386), func UTF16FromString(string) ([]uint16, error)
+pkg syscall (windows-386), func UTF16PtrFromString(string) (*uint16, error)
 pkg syscall (windows-386), type SysProcAttr struct, CreationFlags uint32
 pkg syscall (windows-amd64), const CREATE_NEW_PROCESS_GROUP ideal-int
 pkg syscall (windows-amd64), const CTRL_BREAK_EVENT ideal-int
 pkg syscall (windows-amd64), const CTRL_C_EVENT ideal-int
 pkg syscall (windows-amd64), func Getsockopt(Handle, int32, int32, *byte, *int32) error
+pkg syscall (windows-amd64), func UTF16FromString(string) ([]uint16, error)
+pkg syscall (windows-amd64), func UTF16PtrFromString(string) (*uint16, error)
 pkg syscall (windows-amd64), type SysProcAttr struct, CreationFlags uint32
+pkg syscall, func BytePtrFromString(string) (*byte, error)
+pkg syscall, func ByteSliceFromString(string) ([]byte, error)
+pkg testing, func Verbose() bool
+pkg text/template/parse, const NodeNil NodeType
+pkg text/template/parse, method (*NilNode) Copy() Node
+pkg text/template/parse, method (*NilNode) String() string
+pkg text/template/parse, method (*NilNode) Type() NodeType
+pkg text/template/parse, type NilNode bool
+pkg unicode/utf8, func ValidRune(rune) bool

doc/articles/concurrency_patterns.html

 We can then use a <code>select</code> statement to receive from either
 <code>ch</code> or <code>timeout</code>. If nothing arrives on <code>ch</code>
 after one second, the timeout case is selected and the attempt to read from
-<cde>ch</cde> is abandoned.
+<code>ch</code> is abandoned.
 </p>
 
 {{code "/doc/progs/timeout1.go" `/select {/` `/STOP/`}}

doc/articles/image_package.html

 dstr, dstg, dstb, dsta := dst.RGBA()
 srcr, srcg, srcb, srca := src.RGBA()
 _, _, _, m := mask.RGBA()
-const M = 1<<16 - 1
+const M = 1&lt;&lt;16 - 1
 // The resultant red value is a blend of dstr and srcr, and ranges in [0, M].
 // The calculation for green, blue and alpha is similar.
 dstr = (dstr*(M-m) + srcr*m) / M
 A <code>Rectangle</code> is inclusive at the top-left and exclusive at the
 bottom-right. For a <code>Point p</code> and a <code>Rectangle r</code>,
 <code>p.In(r)</code> if and only if
-<code>r.Min.X <= p.X && p.X < r.Max.X</code>, and similarly for <code>Y</code>. This is analagous to how
+<code>r.Min.X &lt;= p.X &amp;&amp; p.X &lt; r.Max.X</code>, and similarly for <code>Y</code>. This is analagous to how
 a slice <code>s[i0:i1]</code> is inclusive at the low end and exclusive at the
 high end. (Unlike arrays and slices, a <code>Rectangle</code> often has a
 non-zero origin.)
 
 <pre>
 b := m.Bounds()
-for y := b.Min.Y; y < b.Max.Y; y++ {
-	for x := b.Min.X; y < b.Max.X; x++ {
+for y := b.Min.Y; y &lt; b.Max.Y; y++ {
+	for x := b.Min.X; y &lt; b.Max.X; x++ {
 		doStuffWith(m.At(x, y))
 	}
 }

doc/articles/json_and_go.html

 
 <p>
 The json package only accesses the exported fields of struct types (those that
-begin with an uppercase letter). Therefore only the the exported fields of a
-struct will be present in the JSON output.
+begin with an uppercase letter). Therefore only the exported fields of a struct
+will be present in the JSON output.
 </p>
 
 <p>

doc/articles/json_rpc_tale_of_interfaces.html

 After some similar changes to the client side, this was the full extent of the
 work we needed to do on the RPC package. This whole exercise took about 20
 minutes! After tidying up and testing the new code, the
-<a href="http://code.google.com/p/go/source/diff?spec=svn9daf796ebf1cae97b2fcf760a4ab682f1f063f29&r=9daf796ebf1cae97b2fcf760a4ab682f1f063f29&format=side&path=/src/pkg/rpc/server.go">final changeset</a>
+<a href="http://code.google.com/p/go/source/diff?spec=svn9daf796ebf1cae97b2fcf760a4ab682f1f063f29&amp;r=9daf796ebf1cae97b2fcf760a4ab682f1f063f29&amp;format=side&amp;path=/src/pkg/rpc/server.go">final changeset</a>
 was submitted.
 </p>
 
         // This is a terrible implementation.
         // Real code should import "math" and use math.Sqrt.
         z := 0.0
-        for i := 0; i < 1000; i++ {
+        for i := 0; i &lt; 1000; i++ {
                 z -= (z*z - x) / (2 * x)
         }
         return z
 the language specification, both of which should be read first.
 </p>
 
-<h3 id="appengine"><a href="http://code.google.com/appengine/docs/go/gettingstarted/">Getting Started with Go on App Engine</a></h3>
+<h3 id="appengine"><a href="https://developers.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
-<a href="http://code.google.com/appengine/">Google App Engine</a>.
+<a href="https://developers.google.com/appengine/">Google App Engine</a>.
 </p>
 
 <h3 id="go_faq"><a href="go_faq.html">Frequently Asked Questions (FAQ)</a></h3>
 still of value.
 </p>
 
+<h3 id="video_tour_of_go"><a href="http://research.swtch.com/gotour">A Video Tour of Go</a></h3>
+<p>
+Three things that make Go fast, fun, and productive:
+interfaces, reflection, and concurrency. Builds a toy web crawler to
+demonstrate these.
+</p>
+
+<h3 id="go_concurrency_patterns"><a href="http://www.youtube.com/watch?v=f6kdp27TYZs">Go Concurrency Patterns</a></h3>
+<p>
+Concurrency is the key to designing high performance network services. Go's concurrency primitives (goroutines and channels) provide a simple and efficient means of expressing concurrent execution. In this talk we see how tricky concurrency problems can be solved gracefully with simple Go code.
+</p>
+
+<h3 id="meet_the_go_team"><a href="http://www.youtube.com/watch?v=sln-gJaURzk">Meet the Go team</a></h3>
+<p>
+A panel discussion with David Symonds, Robert Griesemer, Rob Pike, Ken Thompson, Andrew Gerrand, and Brad Fitzpatrick.
+</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.
 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><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
-and provides four examples of Go programs that solve real problems.
-See the <a href="/doc/talks/io2011/Real_World_Go.pdf">presentation slides</a>.
-</p>
-
-<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
 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><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
-the simple example of an URL shortening service.
-See the <a href="http://wh3rd.net/practical-go/">presentation slides</a>.
-</p>
-
 <h4 id="talks_more">More</h4>
 <p>
 See the <a href="http://code.google.com/p/go-wiki/wiki/GoTalks">GoTalks
 software on multicore machines.
 </ul>
 
+<h3 id="What_is_the_status_of_the_project">
+What is the status of the project?</h3>
+
+<p>
+Go became a public open source project on November 10, 2009.
+After a couple of years of very active design and development, stability was called for and
+Go 1 was <a href="http://blog.golang.org/2012/03/go-version-1-is-released.html">released</a>
+on March 28, 2012.
+Go 1, which includes a <a href="/ref/spec">language specification</a>,
+<a href="/pkg/">standard libraries</a>,
+and <a href="/cmd/go/">custom tools</a>,
+provides a stable foundation for creating reliable products, projects, and publications.
+</p>
+
+<p>
+With that stability established, we are using Go to develop programs, products, and tools rather than
+actively changing the language and libraries.
+In fact, the purpose of Go 1 is to provide <a href="/doc/go1compat.html">long-term stability</a>.
+Backwards-incompatible changes will not be made to any Go 1 point release.
+We want to use what we have to learn how a future version of Go might look, rather than to play with
+the language underfoot.
+</p>
+
+<p>
+Of course, development will continue on Go itself, but the focus will be on performance, reliability,
+portability and the addition of new functionality such as improved support for internationalization.
+</p>
+
+<p>
+There may well be a Go 2 one day, but not for a few years and it will be influenced by what we learn using Go 1 as it is today.
+</p>
+
 <h3 id="What_is_the_origin_of_the_name">
 What is the origin of the name?</h3>
 
 <a href="http://golang.org">http://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="http://code.google.com/appengine/">Google App Engine</a>.
+<a href="https://developers.google.com/appengine/">Google App Engine</a>.
 </p>
 
 <h3 id="Do_Go_programs_link_with_Cpp_programs">
 <!--{
 	"Title": "The Go Programming Language Specification",
-	"Subtitle": "Version of June 27, 2012",
+	"Subtitle": "Version of August 17, 2012",
 	"Path": "/ref/spec"
 }-->
 
 elements that are themselves composite literals may elide the respective
 literal type if it is identical to the element type of <code>T</code>.
 Similarly, elements that are addresses of composite literals may elide
-the <code>&amp;T</code> when the the element type is <code>*T</code>.
+the <code>&amp;T</code> when the element type is <code>*T</code>.
 </p>
 
 
 </pre>
 
 <p>
-For floating-point numbers,
+For floating-point and complex numbers,
 <code>+x</code> is the same as <code>x</code>,
 while <code>-x</code> is the negation of <code>x</code>.
-The result of a floating-point division by zero is not specified beyond the
+The result of a floating-point or complex division by zero is not specified beyond the
 IEEE-754 standard; whether a <a href="#Run_time_panics">run-time panic</a>
 occurs is implementation-specific.
 </p>
 
 <pre>
 string('a')       // "a"
-string(-1)        // "\ufffd" == "\xef\xbf\xbd "
+string(-1)        // "\ufffd" == "\xef\xbf\xbd"
 string(0xf8)      // "\u00f8" == "ø" == "\xc3\xb8"
 type MyString string
 MyString(0x65e5)  // "\u65e5" == "日" == "\xe6\x97\xa5"
 <h3 id="Order_of_evaluation">Order of evaluation</h3>
 
 <p>
-When evaluating the elements of an assignment or expression,
-all function calls, method calls and
+When evaluating the <a href="#Operands">operands</a> of an expression,
+<a href="#Assignments">assignment</a>, or
+<a href="#Return_statements">return statement</a>,
+all function calls, method calls, and
 communication operations are evaluated in lexical left-to-right
 order.
 </p>
 of <code>y</code> is not specified.
 </p>
 
+<pre>
+a := 1
+f := func() int { a = 2; return 3 }
+x := []int{a, f()}  // x may be [1, 3] or [2, 3]: evaluation order between a and f() is not specified
+</pre>
+
 <p>
 Floating-point operations within a single expression are evaluated according to
 the associativity of the operators.  Explicit parentheses affect the evaluation

doc/install-source.html

 </p>
 
 <p>
-On OS X, a C compiler can be installed as part of
-<a href="http://developer.apple.com/Xcode/">Xcode</a>. 
+On OS X, a C compiler is bundled in the command line tools for
+<a href="http://developer.apple.com/Xcode/">Xcode</a>,
+and you don't need to install the whole Xcode to compile Go.
+If you have already installed Xcode 4.3+, you can install command
+line tools from the Components tab of the Downloads preferences panel.
+To verify you have a working compiler, just invoke <code>gcc</code>
+in a freshly created Terminal window, unless you see the
+"<code>gcc: command not found</code>" error, you are ready to go.
 </p>
 
 <p>
 <h2 id="releases">Keeping up with releases</h2>
 
 <p>
-The Go project maintains two stable tags in its Mercurial repository:
-<code>release</code> and <code>weekly</code>.
+The Go project maintains a stable tag in its Mercurial repository:
+<code>release</code>.
 </p>
 
 <p>
 $ ./all.bash
 </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>
-
 
 <h2 id="environment">Optional environment variables</h2>
 
 </tr>
 <tr><td colspan="3"><hr></td></tr>
 <tr><td>FreeBSD 7 or later</td> <td>amd64, 386</td> <td>Debian GNU/kFreeBSD not supported</td></tr>
-<tr><td>Linux 2.6.23 or later with glibc</td> <td>amd64, 386, arm</td> <td>CentOS/RHEL 5.x not supported; no binary distribution for ARM yet</tr>
-<tr><td>Mac OS X 10.6/10.7</td> <td>amd64, 386</td> <td>use the gcc<sup>&#8224;</sup> that comes with Xcode</td></tr>
+<tr><td>Linux 2.6.23 or later with glibc</td> <td>amd64, 386, arm</td> <td>CentOS/RHEL 5.x not supported; no binary distribution for ARM yet</td></tr>
+<tr><td>Mac OS X 10.6/10.7</td> <td>amd64, 386</td> <td>use the gcc<sup>&#8224;</sup> that comes with Xcode<sup>&#8225;</sup></td></tr>
 <tr><td>Windows 2000 or later</td> <td>amd64, 386</td> <td>use mingw gcc<sup>&#8224;</sup>; cygwin or msys is not needed</td></tr>
 </table>
 
 <p>
-<sup>&#8224;</sup><code>gcc</code> is required only if you plan to use <a href="/cmd/cgo">cgo</a>.
+<sup>&#8224;</sup><code>gcc</code> is required only if you plan to use
+<a href="/cmd/cgo">cgo</a>.<br/>
+<sup>&#8225;</sup>You only need to install the command line tools for
+<a href="http://developer.apple.com/Xcode/">Xcode</a>. If you have already
+installed Xcode 4.3+, you can install it from the Components tab of the
+Downloads preferences panel.
 </p>
 
 <h2 id="download">Download the Go tools</h2>
 experimental MSI installer that configures your installation automatically.
 </p>
 
-<h4 id="windows_zip">Zip archive</h3>
+<h4 id="windows_zip">Zip archive</h4>
 
 <p>
 Extract the <a href="http://code.google.com/p/go/downloads/list?q=OpSys-Windows+Type%3DArchive">zip file</a>
 Add the <code>bin</code> subdirectory of your Go root (for example, <code>c:\Go\bin</code>) to to your <code>PATH</code> environment variable.
 </p>
 
-<h4 id="windows_msi">MSI installer (experimental)</h3>
+<h4 id="windows_msi">MSI installer (experimental)</h4>
 
 <p>
 Open the <a href="http://code.google.com/p/go/downloads/list?q=OpSys-Windows+Type%3DInstaller">MSI file</a>

doc/reference.html

 The official Go Language specification. 
 </p>
 
-<h3 id="appengine"><a href="http://code.google.com/appengine/docs/go/">App Engine Go Runtime Documentation</a></h3>
+<h3 id="appengine"><a href="https://developers.google.com/appengine/docs/go/">App Engine Go Runtime Documentation</a></h3>
 <p>
 The documentation for
-<a href="http://code.google.com/appengine/">Google App Engine</a>'s Go runtime.
+<a href="https://developers.google.com/appengine/">Google App Engine</a>'s Go runtime.
 </p>
 
 <h3 id="go_mem"><a href="/ref/mem">The Go Memory Model</a></h3>

lib/godoc/godoc.html

 Creative Commons Attribution 3.0 License,
 and code is licensed under a <a href="/LICENSE">BSD license</a>.<br>
 <a href="/doc/tos.html">Terms of Service</a> | 
-<a href="http://www.google.com/intl/en/privacy/privacy-policy.html">Privacy Policy</a>
+<a href="http://www.google.com/intl/en/policies/privacy/">Privacy Policy</a>
 </div>
 
 </body>

lib/godoc/package.html

 	Use of this source code is governed by a BSD-style
 	license that can be found in the LICENSE file.
 -->
+<!--
+	Note: Static (i.e., not template-generated) href and id
+	attributes start with "pkg-" to make it impossible for
+	them to conflict with generated attributes (some of which
+	correspond to Go identifiers).
+-->
 {{with .PDoc}}
 	{{if $.IsPkg}}
 		<div id="short-nav">
 			<dd><code>import "{{html .ImportPath}}"</code></dd>
 			</dl>
 			<dl>
-			<dd><a href="#overview" class="overviewLink">Overview</a></dd>
-			<dd><a href="#index">Index</a></dd>
+			<dd><a href="#pkg-overview" class="overviewLink">Overview</a></dd>
+			<dd><a href="#pkg-index">Index</a></dd>
 			{{if $.Examples}}
-				<dd><a href="#examples">Examples</a></dd>
+				<dd><a href="#pkg-examples">Examples</a></dd>
 			{{end}}
 			{{if $.Dirs}}
-				<dd><a href="#subdirectories">Subdirectories</a></dd>
+				<dd><a href="#pkg-subdirectories">Subdirectories</a></dd>
 			{{end}}
 			</dl>
 		</div>
 		<!-- The package's Name is printed as title by the top-level template -->
-		<div id="overview" class="toggleVisible">
+		<div id="pkg-overview" class="toggleVisible">
 			<div class="collapsed">
 				<h2 class="toggleButton" title="Click to show Overview section">Overview ▹</h2>
 			</div>
 		</div>
 		{{example_html "" $.Examples $.FSet}}
 	
-		<h2 id="index">Index</h2>
+		<h2 id="pkg-index">Index</h2>
 		<!-- Table of contents for API; must be named manual-nav to turn off auto nav. -->
 		<div id="manual-nav">
 			<dl>
 			{{if .Consts}}
-				<dd><a href="#constants">Constants</a></dd>
+				<dd><a href="#pkg-constants">Constants</a></dd>
 			{{end}}
 			{{if .Vars}}
-				<dd><a href="#variables">Variables</a></dd>
+				<dd><a href="#pkg-variables">Variables</a></dd>
 			{{end}}
 			{{range .Funcs}}
 				{{$name_html := html .Name}}
 				{{end}}
 			{{end}}
 			{{if .Bugs}}
-				<dd><a href="#bugs">Bugs</a></dd>
+				<dd><a href="#pkg-bugs">Bugs</a></dd>
 			{{end}}
 		</dl>
 
 		{{if $.Examples}}
-			<h4 id="examples">Examples</h4>
+			<h4 id="pkg-examples">Examples</h4>
 			<dl>
 			{{range $.Examples}}
 			<dd><a class="exampleLink" href="#example_{{.Name}}">{{example_name .Name}}</a></dd>
 		{{end}}
 	
 		{{with .Consts}}
-			<h2 id="constants">Constants</h2>
+			<h2 id="pkg-constants">Constants</h2>
 			{{range .}}
 				<pre>{{node_html .Decl $.FSet}}</pre>
 				{{comment_html .Doc}}
 			{{end}}
 		{{end}}
 		{{with .Vars}}
-			<h2 id="variables">Variables</h2>
+			<h2 id="pkg-variables">Variables</h2>
 			{{range .}}
 				<pre>{{node_html .Decl $.FSet}}</pre>
 				{{comment_html .Doc}}
 	{{end}}
 
 	{{with .Bugs}}
-		<h2 id="bugs">Bugs</h2>
+		<h2 id="pkg-bugs">Bugs</h2>
 		{{range .}}
 		{{comment_html .}}
 		{{end}}
 	<pre>{{node_html . $.FSet}}</pre>
 {{end}}
 
-{{with .PList}}
-	<h2>Other packages</h2>
-	<p>
-	{{/* PList entries are strings - no need for FSet */}}
-	{{range .}}
-	<a href="?p={{urlquery .}}">{{html .}}</a><br />
-	{{end}}
-	</p>
-{{end}}
-
 {{with .Dirs}}
 	{{/* DirList entries are numbers and strings - no need for FSet */}}
 	{{if $.PDoc}}
-		<h2 id="subdirectories">Subdirectories</h2>
+		<h2 id="pkg-subdirectories">Subdirectories</h2>
 	{{else}}
 		<div class="pkgGopher">
 			<img class="gopher" src="/doc/gopher/pkg.png"/>
 		{{if $.DirFlat}}
 			{{if .HasPkg}}
 				<tr>
-				<td class="name"><a href="{{html .Path}}">{{html .Path}}</a></td>
+				<td class="name"><a href="{{html .Path}}/">{{html .Path}}</a></td>
 				<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
 				<td style="width: auto">{{html .Synopsis}}</td>
 				</tr>
 			{{end}}
 		{{else}}
 			<tr>
-			<td class="name">{{repeat `&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;` .Depth}}<a href="{{html .Path}}">{{html .Name}}</a></td>
+			<td class="name">{{repeat `&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;` .Depth}}<a href="{{html .Path}}/">{{html .Name}}</a></td>
 			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
 			<td style="width: auto">{{html .Synopsis}}</td>
 			</tr>

lib/godoc/package.txt

 
 ---------------------------------------
 
-*/}}{{with .PList}}
-OTHER PACKAGES
-
-{{range .}}
-{{.}}{{end}}
-{{end}}{{/*
-
----------------------------------------
-
 */}}{{with .Dirs}}
 SUBDIRECTORIES
 {{if $.DirFlat}}{{range .List}}{{if .HasPkg}}

misc/cgo/life/golden.out

-* life
-                
-                
-  XXX     XXX   
-                
-                
-                
-                
-                
-                
-                
-  XXX     XXX   
-                
-                
-                
-                
-                

misc/cgo/life/life.go

+// skip
+
 // 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.

misc/cgo/life/main.go

+// cmpout
+
 // 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.

misc/cgo/life/main.out

+                
+                
+  XXX     XXX   
+                
+                
+                
+                
+                
+                
+                
+  XXX     XXX   
+                
+                
+                
+                
+                

misc/cgo/life/test.bash

-#!/bin/sh
-# 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.
-
-set -e
-go build -o life main.go
-
-echo '*' life >run.out
-./life >>run.out
-diff run.out golden.out
-
-rm -f life
-

misc/cgo/stdio/chain.go

+// cmpout
+
 // 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.

misc/cgo/stdio/chain.out

+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10

misc/cgo/stdio/fib.go

+// cmpout
+
 // 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.

misc/cgo/stdio/fib.out

+0
+1
+1
+2
+3
+5
+8
+13
+21
+34
+55
+89
+144
+233
+377
+610
+987
+1597
+2584
+4181
+6765
+10946
+17711
+28657
+46368
+75025
+121393
+196418
+317811
+514229
+832040
+1346269
+2178309
+3524578
+5702887
+9227465
+14930352
+24157817
+39088169
+63245986
+102334155
+165580141
+267914296
+433494437
+701408733
+1134903170
+1836311903
+2971215073
+4807526976
+7778742049
+12586269025
+20365011074
+32951280099
+53316291173
+86267571272
+139583862445
+225851433717
+365435296162
+591286729879
+956722026041
+1548008755920
+2504730781961
+4052739537881
+6557470319842
+10610209857723
+17167680177565
+27777890035288
+44945570212853
+72723460248141
+117669030460994
+190392490709135
+308061521170129
+498454011879264
+806515533049393
+1304969544928657
+2111485077978050
+3416454622906707
+5527939700884757
+8944394323791464
+14472334024676221
+23416728348467685
+37889062373143906
+61305790721611591
+99194853094755497
+160500643816367088
+259695496911122585
+420196140727489673
+679891637638612258
+1100087778366101931
+1779979416004714189
+2880067194370816120

misc/cgo/stdio/file.go

+// skip
+
 // 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.

misc/cgo/stdio/golden.out

-* hello
-hello, world
-* fib
-0
-1
-1
-2
-3
-5
-8
-13
-21
-34
-55
-89
-144
-233
-377
-610
-987
-1597
-2584
-4181
-6765
-10946
-17711
-28657
-46368
-75025
-121393
-196418
-317811
-514229
-832040
-1346269
-2178309
-3524578
-5702887
-9227465
-14930352
-24157817
-39088169
-63245986
-102334155
-165580141
-267914296
-433494437
-701408733
-1134903170
-1836311903
-2971215073
-4807526976
-7778742049
-12586269025
-20365011074
-32951280099
-53316291173
-86267571272
-139583862445
-225851433717
-365435296162
-591286729879
-956722026041
-1548008755920
-2504730781961
-4052739537881
-6557470319842
-10610209857723
-17167680177565
-27777890035288
-44945570212853
-72723460248141
-117669030460994
-190392490709135
-308061521170129
-498454011879264
-806515533049393
-1304969544928657
-2111485077978050
-3416454622906707
-5527939700884757
-8944394323791464
-14472334024676221
-23416728348467685
-37889062373143906
-61305790721611591
-99194853094755497
-160500643816367088
-259695496911122585
-420196140727489673
-679891637638612258
-1100087778366101931
-1779979416004714189
-2880067194370816120
-* chain
-0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10

misc/cgo/stdio/hello.go

+// cmpout
+
 // 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.

misc/cgo/stdio/hello.out

+hello, world

misc/cgo/stdio/run.out

+* hello
+hello, world
+* fib
+0
+1
+1
+2
+3
+5
+8
+13
+21
+34
+55
+89
+144
+233
+377
+610
+987
+1597
+2584
+4181
+6765
+10946
+17711
+28657
+46368
+75025
+121393
+196418
+317811
+514229
+832040
+1346269
+2178309
+3524578
+5702887
+9227465
+14930352
+24157817
+39088169
+63245986
+102334155
+165580141
+267914296
+433494437
+701408733
+1134903170
+1836311903
+2971215073
+4807526976
+7778742049
+12586269025
+20365011074
+32951280099
+53316291173
+86267571272
+139583862445
+225851433717
+365435296162
+591286729879
+956722026041
+1548008755920
+2504730781961
+4052739537881
+6557470319842
+10610209857723
+17167680177565
+27777890035288
+44945570212853
+72723460248141
+117669030460994
+190392490709135
+308061521170129
+498454011879264
+806515533049393
+1304969544928657
+2111485077978050
+3416454622906707
+5527939700884757
+8944394323791464
+14472334024676221
+23416728348467685
+37889062373143906
+61305790721611591
+99194853094755497
+160500643816367088
+259695496911122585
+420196140727489673
+679891637638612258
+1100087778366101931
+1779979416004714189
+2880067194370816120
+* chain
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10

misc/cgo/stdio/test.bash

-#!/bin/sh
-# 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.
-
-set -e
-go build hello.go
-go build fib.go
-go build chain.go
-
-echo '*' hello >run.out
-./hello >>run.out
-echo '*' fib >>run.out
-./fib >>run.out
-echo '*' chain >>run.out
-./chain >>run.out
-diff run.out golden.out
-
-rm -f hello fib chain
-

misc/cgo/test/Makefile

-# 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.
-
-include ../../../src/Make.inc
-
-TARG=runtime/cgotest
-
-CGOFILES=\
-	align.go\
-	basic.go\
-	callback.go\
-	env.go\
-	exports.go\
-	helpers.go\
-	issue1222.go\
-	issue1328.go\
-	issue1560.go\
-	issue2462.go\
-	duplicate_symbol.go\
-
-CGO_OFILES=\
-	callback_c.o\
-
-OFILES=\
-	runtime.$O\
-
-ifeq ($(GOOS),windows)
-GCCVERSION=$(shell gcc -dumpversion)
-ifeq ($(GOARCH),386)
-GCCLIBDIR=/mingw/lib/gcc/mingw32/$(GCCVERSION)
-CHKSTK=_chkstk.o
-else
-GCCLIBDIR=/mingw/lib/gcc/x86_64-w64-mingw32/$(GCCVERSION)
-CHKSTK=_chkstk_ms.o
-endif
-
-CGOFILES+=sleep_windows.go
-CGO_OFILES+=$(CHKSTK)
-
-$(CHKSTK):
-	ar -x "$(GCCLIBDIR)/libgcc.a" $@
-endif
-
-include ../../../src/Make.pkg
-
-test:
-	echo cgo: tests disabled. gotest is gone. TODO

misc/cgo/test/basic.go

 	Enum2 = 2,
 };
 
-typedef unsigned char uuid_t[20];
+typedef unsigned char cgo_uuid_t[20];
 
-void uuid_generate(uuid_t x) {
+void uuid_generate(cgo_uuid_t x) {
 	x[0] = 0;
 }
 
 var KILO = C.KILO
 
 func uuidgen() {
-	var uuid C.uuid_t
+	var uuid C.cgo_uuid_t
 	C.uuid_generate(&uuid[0])
 }
 

misc/cgo/test/cgo_linux_test.go

+// 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 cgotest
+
+import "testing"
+
+func TestSetgid(t *testing.T) { testSetgid(t) }

misc/cgo/test/cgo_test.go

 func TestParallelSleep(t *testing.T)       { testParallelSleep(t) }
 func TestSetEnv(t *testing.T)              { testSetEnv(t) }
 func TestHelpers(t *testing.T)             { testHelpers(t) }
+func TestLibgcc(t *testing.T)              { testLibgcc(t) }
 
 func BenchmarkCgoCall(b *testing.B) { benchCgoCall(b) }

misc/cgo/test/issue3261.go

+// 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 cgotest
+
+/*
+// libgcc on ARM might be compiled as thumb code, but our 5l
+// can't handle that, so we have to disable this test on arm.
+#ifdef __ARMEL__
+#include <stdio.h>
+int vabs(int x) {
+	puts("testLibgcc is disabled on ARM because 5l cannot handle thumb library.");
+	return (x < 0) ? -x : x;
+}
+#else
+int __absvsi2(int); // dummy prototype for libgcc function
+// we shouldn't name the function abs, as gcc might use
+// the builtin one.
+int vabs(int x) { return __absvsi2(x); }
+#endif
+*/
+import "C"
+
+import "testing"
+
+func testLibgcc(t *testing.T) {
+	var table = []struct {
+		in, out C.int
+	}{
+		{0, 0},
+		{1, 1},
+		{-42, 42},
+		{1000300, 1000300},
+		{1 - 1<<31, 1<<31 - 1},
+	}
+	for _, v := range table {
+		if o := C.vabs(v.in); o != v.out {
+			t.Fatalf("abs(%d) got %d, should be %d", v.in, o, v.out)
+			return
+		}
+	}
+}

misc/cgo/test/setgid_linux.go

+// 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.
+
+// Test that setgid does not hang on GNU/Linux.
+// See http://code.google.com/p/go/issues/detail?id=3871 for details.
+
+package cgotest
+
+/*
+#include <sys/types.h>
+#include <unistd.h>
+*/
+import "C"
+
+import (
+	"testing"
+	"time"
+)
+
+func testSetgid(t *testing.T) {
+	c := make(chan bool)
+	go func() {
+		C.setgid(0)
+		c <- true
+	}()
+	select {
+	case <-c:
+	case <-time.After(5 * time.Second):
+		t.Error("setgid hung")
+	}
+}

misc/cgo/test/sleep_windows.go

-// 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 cgotest
-
-/*
-#include <windows.h>
-
-unsigned int sleep(unsigned int seconds) {
-	Sleep(1000 * seconds);
-	return 0;
-}
-
-*/
-import "C"

misc/cgo/test/sleep_windows_386.go

+// 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 cgotest
+
+/*
+// mingw32 on windows/386 provides usleep() but not sleep(),
+// as we don't want to require all other OSes to provide usleep,
+// we emulate sleep(int s) using win32 API Sleep(int ms).
+
+#include <windows.h>
+
+unsigned int sleep(unsigned int seconds) {
+	Sleep(1000 * seconds);
+	return 0;
+}
+
+*/
+import "C"