blob: 577166e15ca94810fc69e16e6ae0e94ef0b45c27 [file] [log] [blame]
Andrew Gerrand7cb21a72012-01-19 11:24:54 +11001<!--{
Andrew Gerrand8bbe5cc2012-01-20 07:37:36 +11002 "Title": "Documentation",
3 "Path": "/doc/"
Andrew Gerrand7cb21a72012-01-19 11:24:54 +11004}-->
Andrew Gerrand1ca99c82010-05-27 16:47:42 -07005
Andrew Gerrandd84de092012-02-13 21:22:36 +11006<p>
7The Go programming language is an open source project to make programmers more
8productive.
9</p>
10
11<p>
12Go is expressive, concise, clean, and efficient. Its concurrency
13mechanisms make it easy to write programs that get the most out of multicore
14and networked machines, while its novel type system enables flexible and
15modular program construction. Go compiles quickly to machine code yet has the
16convenience of garbage collection and the power of run-time reflection. It's a
17fast, statically typed, compiled language that feels like a dynamically typed,
18interpreted language.
19</p>
20
21<div id="manual-nav"></div>
Andrew Gerrand6ab8d242010-09-16 14:01:02 +100022
Andrew Gerrandf78d50c2012-03-05 14:31:27 +110023<h2>Installing Go</h2>
24
25<h3><a href="/doc/install">Getting Started</a></h3>
26<p>
27Instructions for downloading and installing the Go compilers, tools, and
28libraries.
29</p>
30
31
Andrew Gerrand6ab8d242010-09-16 14:01:02 +100032<h2 id="learning">Learning Go</h2>
33
Andrew Gerrandf200b722012-03-06 12:50:52 +110034<img class="gopher" src="/doc/gopher/doc.png"/>
35
Andrew Gerrand1fe22d22011-11-01 16:09:29 +090036<h3 id="go_tour"><a href="http://tour.golang.org/">A Tour of Go</a></h3>
Andrew Gerrandf03b37b2011-10-05 11:12:07 -070037<p>
38An interactive introduction to Go in three sections.
39The first section covers basic syntax and data structures; the second discusses
40methods and interfaces; and the third introduces Go's concurrency primitives.
41Each section concludes with a few exercises so you can practice what you've
Andrew Gerrand1fe22d22011-11-01 16:09:29 +090042learned. You can <a href="http://tour.golang.org/">take the tour online</a> or
Andrew Gerrandf03b37b2011-10-05 11:12:07 -070043<a href="http://code.google.com/p/go-tour/">install it locally</a>.
44</p>
45
Andrew Gerrandf78d50c2012-03-05 14:31:27 +110046<h3 id="code"><a href="code.html">How to write Go code</a></h3>
47<p>
48How to use the <a href="/cmd/go/">go command</a> to fetch, build, and install
49packages, commands, and run tests.
50</p>
51
Andrew Gerrand1ca99c82010-05-27 16:47:42 -070052<h3 id="effective_go"><a href="effective_go.html">Effective Go</a></h3>
53<p>
54A document that gives tips for writing clear, idiomatic Go code.
Rob Pike7201b0c2012-02-28 13:35:58 +110055A must read for any new Go programmer. It augments the tour and
Peter Mundyabb0c092010-11-29 10:10:02 +090056the language specification, both of which should be read first.
Andrew Gerrand1ca99c82010-05-27 16:47:42 -070057</p>
58
Andrew Gerranddd91d832012-02-15 12:58:40 +110059<h3 id="appengine"><a href="http://code.google.com/appengine/docs/go/gettingstarted/">Getting Started with Go on App Engine</a></h3>
60<p>
61How to develop and deploy a simple Go project with
62<a href="http://code.google.com/appengine/">Google App Engine</a>.
63</p>
64
Andrew Gerrandd84de092012-02-13 21:22:36 +110065<h3 id="go_faq"><a href="go_faq.html">Frequently Asked Questions (FAQ)</a></h3>
Andrew Gerrand1ca99c82010-05-27 16:47:42 -070066<p>
Andrew Gerrandd84de092012-02-13 21:22:36 +110067Answers to common questions about Go.
Andrew Gerrand1ca99c82010-05-27 16:47:42 -070068</p>
69
Andrew Gerrandf78d50c2012-03-05 14:31:27 +110070<h3 id="wiki"><a href="http://code.google.com/p/go-wiki/wiki">Go Language Community Wiki</a></h3>
Andrew Gerrand539178b2012-03-05 15:07:43 +110071<p>A wiki maintained by the Go community.</p>
Andrew Gerrandd84de092012-02-13 21:22:36 +110072
Andrew Gerrandc9836be2012-03-08 16:10:55 +110073<h2 id="go1">Go version 1</h2>
74
75<h3 id="go1notes"><a href="/doc/go1.html">Go 1 Release Notes</a></h3>
76<p>
77A guide for updating your code to work with Go 1.
78</p>
79
80<h3 id="go1compat"><a href="/doc/go1compat.html">Go 1 and the Future of Go Programs</a></h3>
81<p>
82What Go 1 defines and the backwards-compatibility guarantees one can expect as
83Go 1 matures.
84</p>
85
Andrew Gerrandd84de092012-02-13 21:22:36 +110086<h2 id="articles">Go Articles</h2>
87
Andrew Gerrandf78d50c2012-03-05 14:31:27 +110088<h3 id="blog"><a href="http://blog.golang.org/">The Go Blog</a></h3>
89<p>The official blog of the Go project, featuring news and in-depth articles by
90the Go team and guests.</p>
91
Andrew Gerrande8636a62012-03-13 11:00:11 +110092<h4>Codewalks</h4>
Yves Junqueirade3a3972010-11-23 10:43:16 +110093<p>
Francisco Souzaa786fe82012-03-27 13:35:40 +110094Guided tours of Go programs.
Yves Junqueirade3a3972010-11-23 10:43:16 +110095</p>
Andrew Gerrand3bc2d0f2011-09-10 09:35:25 +100096<ul>
97<li><a href="/doc/codewalk/functions">First-Class Functions in Go</a></li>
98<li><a href="/doc/codewalk/markov">Generating arbitrary text: a Markov chain algorithm</a></li>
99<li><a href="/doc/codewalk/sharemem">Share Memory by Communicating</a></li>
Andrew Gerrandf78d50c2012-03-05 14:31:27 +1100100<li><a href="/doc/articles/wiki/">Writing Web Applications</a> - building a simple web application.</li>
Andrew Gerrand3bc2d0f2011-09-10 09:35:25 +1000101</ul>
Yves Junqueirade3a3972010-11-23 10:43:16 +1100102
Andrew Gerrande8636a62012-03-13 11:00:11 +1100103<h4>Language</h4>
Andrew Gerrand3bc2d0f2011-09-10 09:35:25 +1000104<ul>
Francisco Souzaa786fe82012-03-27 13:35:40 +1100105<li><a href="/doc/articles/json_rpc_tale_of_interfaces.html">JSON-RPC: a tale of interfaces</a></li>
Francisco Souza6033a482012-03-13 14:46:08 +1100106<li><a href="/doc/articles/gos_declaration_syntax.html">Go's Declaration Syntax</a></li>
Andrew Gerrand10689cd2012-02-21 13:59:51 +1100107<li><a href="/doc/articles/defer_panic_recover.html">Defer, Panic, and Recover</a></li>
Rob Pikea99e9c52012-03-23 07:51:16 +1100108<li><a href="/doc/articles/concurrency_patterns.html">Go Concurrency Patterns: Timing out, moving on</a></li>
Andrew Gerrand10689cd2012-02-21 13:59:51 +1100109<li><a href="/doc/articles/slices_usage_and_internals.html">Go Slices: usage and internals</a></li>
Andrew Gerrand3bc2d0f2011-09-10 09:35:25 +1000110<li><a href="http://blog.golang.org/2011/05/gif-decoder-exercise-in-go-interfaces.html">A GIF decoder: an exercise in Go interfaces</a></li>
Andrew Gerrand10689cd2012-02-21 13:59:51 +1100111<li><a href="/doc/articles/error_handling.html">Error Handling and Go</a></li>
Andrew Gerrand3bc2d0f2011-09-10 09:35:25 +1000112</ul>
113
Andrew Gerrande8636a62012-03-13 11:00:11 +1100114<h4>Packages</h4>
Andrew Gerrand3bc2d0f2011-09-10 09:35:25 +1000115<ul>
Francisco Souza289a3572012-03-22 18:25:40 +1100116<li><a href="/doc/articles/json_and_go.html">JSON and Go</a> - using the <a href="/pkg/encoding/json/">json</a> package.</li>
Francisco Souza9e03dcb2012-03-16 08:21:13 +1100117<li><a href="/doc/articles/gobs_of_data.html">Gobs of data</a> - the design and use of the <a href="/pkg/encoding/gob/">gob</a> package.</li>
Johan Euphrosine6652b0b2012-03-01 10:05:51 +1100118<li><a href="/doc/articles/laws_of_reflection.html">The Laws of Reflection</a> - the fundamentals of the <a href="/pkg/reflect/">reflect</a> package.</li>
Andrew Gerrand76d82db2011-09-23 07:22:28 +1000119<li><a href="http://blog.golang.org/2011/09/go-image-package.html">The Go image package</a> - the fundamentals of the <a href="/pkg/image/">image</a> package.</li>
Johan Euphrosinefef92cb2012-03-14 11:27:41 +1100120<li><a href="/doc/articles/image_draw.html">The Go image/draw package</a> - the fundamentals of the <a href="/pkg/image/draw/">image/draw</a> package.</li>
Andrew Gerrand3bc2d0f2011-09-10 09:35:25 +1000121</ul>
122
Andrew Gerrande8636a62012-03-13 11:00:11 +1100123<h4>Tools</h4>
Andrew Gerrand3bc2d0f2011-09-10 09:35:25 +1000124<ul>
Andrew Gerrand73b8ccb2012-03-07 07:40:21 +1100125<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>
Francisco Souza60b98d62012-03-13 09:07:37 +1100126<li><a href="/doc/articles/c_go_cgo.html">C? Go? Cgo!</a> - linking against C code with <a href="/cmd/cgo/">cgo</a>.</li>
Andrew Gerrand98155bd2012-03-27 11:42:01 +1100127<li><a href="/doc/gdb">Debugging Go Code with GDB</a></li>
Francisco Souza235863c2012-03-15 14:51:44 +1100128<li><a href="/doc/articles/godoc_documenting_go_code.html">Godoc: documenting Go code</a> - writing good documentation for <a href="/cmd/godoc/">godoc</a>.</li>
Andrew Gerrand3bc2d0f2011-09-10 09:35:25 +1000129<li><a href="http://blog.golang.org/2011/06/profiling-go-programs.html">Profiling Go Programs</a></li>
130</ul>
131
Andrew Gerrandf78d50c2012-03-05 14:31:27 +1100132<h2 id="talks">Talks</h2>
Andrew Gerrandbab711b2010-07-30 10:36:13 +1000133
Andrew Gerrandf200b722012-03-06 12:50:52 +1100134<img class="gopher" src="/doc/gopher/talks.png"/>
135
Andrew Gerrandf78d50c2012-03-05 14:31:27 +1100136<p>
137The talks marked with a red asterisk (<font color="red">*</font>) were written
138before Go 1 and contain some examples that are no longer correct, but they are
139still of value.
140</p>
141
142<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>
Andrew Gerrand4fb58572011-05-17 13:46:54 +1000143<p>
144A talk by Rob Pike and Andrew Gerrand presented at Google I/O 2011.
145It walks through the construction and deployment of a simple web application
146and unveils the <a href="http://blog.golang.org/2011/05/go-and-google-app-engine.html">Go runtime for App Engine</a>.
147See the <a href="/doc/talks/io2011/Writing_Web_Apps_in_Go.pdf">presentation slides</a>.
148</p>
149
Andrew Gerrandf78d50c2012-03-05 14:31:27 +1100150<h3 id="real_world_go"><a href="http://www.youtube.com/watch?v=7QDVRowyUQA">Real World Go</a><font color="red">*</font></h3>
Andrew Gerrand4fb58572011-05-17 13:46:54 +1000151<p>
152A talk by Andrew Gerrand presented at Google I/O Bootcamp 2011.
153It gives a broad overview of Go's type system and concurrency model
154and provides four examples of Go programs that solve real problems.
155See the <a href="/doc/talks/io2011/Real_World_Go.pdf">presentation slides</a>.
156</p>
157
Andrew Gerrandf78d50c2012-03-05 14:31:27 +1100158<h3 id="integrated_apps"><a href="http://www.youtube.com/watch?v=Mo1YKpIF1PQ">Building Integrated Apps on Google's Cloud Platform</a></h3>
159<p>
160A talk by Andrew Gerrand presented at Google Developer Day Japan 2011.
161It discusses the development of a web application that runs on Google
162App Engine and renders images that it stores on Google Cloud Storage.
163</p>
164
165<h3 id="go_programming"><a href="http://www.youtube.com/watch?v=jgVhBThJdXc">Go Programming</a><font color="red">*</font></h3>
Andrew Gerrandbab711b2010-07-30 10:36:13 +1000166<p>
167A presentation delivered by Rob Pike and Russ Cox at Google I/O 2010. It
168illustrates how programming in Go differs from other languages through a set of
169examples demonstrating features particular to Go. These include concurrency,
Francisco Souzaa786fe82012-03-27 13:35:40 +1100170embedded types, methods on any type, and program construction using interfaces.
Andrew Gerrandbab711b2010-07-30 10:36:13 +1000171</p>
Andrew Gerrand1ca99c82010-05-27 16:47:42 -0700172
Andrew Gerrandf78d50c2012-03-05 14:31:27 +1100173<h3 id="practical_go_programming"><a href="http://www.youtube.com/watch?v=2-pPAvqyluI">Practical Go Programming</a><font color="red">*</font></h3>
Andrew Gerrand0e3eefa2010-12-03 06:57:30 +0900174<p>
175This talk presents the development of a complete web application in Go.
176It looks at design, storage, concurrency, and scaling issues in detail, using
177the simple example of an URL shortening service.
178See the <a href="http://wh3rd.net/practical-go/">presentation slides</a>.
179</p>
180
Andrew Gerrande8636a62012-03-13 11:00:11 +1100181<h4 id="talks_more">More</h4>
Andrew Gerrand1ca99c82010-05-27 16:47:42 -0700182<p>
Andrew Gerrandf78d50c2012-03-05 14:31:27 +1100183See the <a href="http://code.google.com/p/go-wiki/wiki/GoTalks">GoTalks
184page</a> at the <a href="http://code.google.com/p/go-wiki/wiki">Go Wiki</a> for
185more Go talks.
Andrew Gerrand1ca99c82010-05-27 16:47:42 -0700186</p>
187
Andrew Gerrandf78d50c2012-03-05 14:31:27 +1100188<h2 id="nonenglish">Non-English Documentation</h2>
189
Andrew Gerrand1748dc32010-10-14 17:25:23 +1100190<p>
Francisco Souzaa786fe82012-03-27 13:35:40 +1100191See the <a href="http://code.google.com/p/go-wiki/wiki/NonEnglish">NonEnglish</a> page
Andrew Gerrandf78d50c2012-03-05 14:31:27 +1100192at the <a href="http://code.google.com/p/go-wiki/wiki">Go Wiki</a> for localized
193documentation.
Andrew Gerrand1748dc32010-10-14 17:25:23 +1100194</p>
195
Andrew Gerrandf78d50c2012-03-05 14:31:27 +1100196<h2 id="community">The Go Community</h2>
Andrew Gerrand520d5db2010-07-02 13:32:02 +1000197
Andrew Gerrandf200b722012-03-06 12:50:52 +1100198<img class="gopher" src="/doc/gopher/project.png"/>
199
Andrew Gerrandd84de092012-02-13 21:22:36 +1100200<h3 id="mailinglist"><a href="http://groups.google.com/group/golang-nuts">Go Nuts Mailing List</a></h3>
Francisco Souzaa786fe82012-03-27 13:35:40 +1100201<p>The <a href="http://groups.google.com/group/golang-nuts">golang-nuts</a>
Andrew Gerrandd84de092012-02-13 21:22:36 +1100202mailing list is for general Go discussion.</p>
203
Andrew Gerrandf78d50c2012-03-05 14:31:27 +1100204<h3 id="projects"><a href="http://godashboard.appspot.com/project">Go Project Dashboard</a></h3>
Andrew Gerrandd84de092012-02-13 21:22:36 +1100205<p>A list of external Go projects including programs and libraries.</p>
206
207<h3 id="irc"><a href="irc:irc.freenode.net/go-nuts">Go IRC Channel</a></h3>
208<p><b>#go-nuts</b> on <b>irc.freenode.net</b> is the official Go IRC channel.</p>
209
Andrew Gerrandf78d50c2012-03-05 14:31:27 +1100210<h3 id="plus"><a href="https://plus.google.com/101406623878176903605/posts">The Go Programming Language at Google+</a></h3>
211<p>The Go project's Google+ page.</p>
212
Andrew Gerrandd84de092012-02-13 21:22:36 +1100213<h3 id="twitter"><a href="http://twitter.com/go_nuts">@go_nuts at Twitter</a></h3>
214<p>The Go project's official Twitter account.</p>