blob: e99017fca0ed107796e74fa79cedba8252403567 [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 Gerrand6ab8d242010-09-16 14:01:02 +10006<div class="left-column">
7
8<h2 id="learning">Learning Go</h2>
9
Andrew Gerrand1ca99c82010-05-27 16:47:42 -070010<p>
Andrew Gerrand6ab8d242010-09-16 14:01:02 +100011If you're new to Go, we recommend you work through the
12<a href="go_tutorial.html">tutorial</a>. The
Peter Mundyabb0c092010-11-29 10:10:02 +090013<a href="go_spec.html">language specification</a> has all the details should
Andrew Gerrand6ab8d242010-09-16 14:01:02 +100014you want to explore.
Andrew Gerrand1ca99c82010-05-27 16:47:42 -070015</p>
Andrew Gerrand1ca99c82010-05-27 16:47:42 -070016<p>
Andrew Gerrand6ab8d242010-09-16 14:01:02 +100017Once you've learned a little about the language,
18<a href="effective_go.html">Effective Go</a> will help you learn the style and
19idioms of programming in Go.
Andrew Gerrand1ca99c82010-05-27 16:47:42 -070020</p>
21
Andrew Gerrand1fe22d22011-11-01 16:09:29 +090022<h3 id="go_tour"><a href="http://tour.golang.org/">A Tour of Go</a></h3>
Andrew Gerrandf03b37b2011-10-05 11:12:07 -070023<p>
24An interactive introduction to Go in three sections.
25The first section covers basic syntax and data structures; the second discusses
26methods and interfaces; and the third introduces Go's concurrency primitives.
27Each section concludes with a few exercises so you can practice what you've
Andrew Gerrand1fe22d22011-11-01 16:09:29 +090028learned. You can <a href="http://tour.golang.org/">take the tour online</a> or
Andrew Gerrandf03b37b2011-10-05 11:12:07 -070029<a href="http://code.google.com/p/go-tour/">install it locally</a>.
30</p>
31
Andrew Gerrand1ca99c82010-05-27 16:47:42 -070032<h3 id="orig_tutorial"><a href="go_tutorial.html">A Tutorial for the Go Programming Language</a></h3>
33<p>
34The first tutorial. An introductory text that touches upon several core
35concepts: syntax, types, allocation, constants, I/O, sorting, printing,
36goroutines, and channels.
37</p>
38
39<h3 id="effective_go"><a href="effective_go.html">Effective Go</a></h3>
40<p>
41A document that gives tips for writing clear, idiomatic Go code.
42A must read for any new Go programmer. It augments the tutorial and
Peter Mundyabb0c092010-11-29 10:10:02 +090043the language specification, both of which should be read first.
Andrew Gerrand1ca99c82010-05-27 16:47:42 -070044</p>
45
Andrew Gerrand4164d602010-09-29 16:52:22 +100046<h3 id="go_faq"><a href="go_faq.html">Frequently Asked Questions (FAQ)</a></h3>
47<p>
48Answers to common questions about Go.
49</p>
50
Andrew Gerrand6ab8d242010-09-16 14:01:02 +100051<h3 id="code"><a href="code.html">How to write Go code</a></h3>
52<p>
53How to write a new package and how to test code.
54</p>
55
Andrew Gerrand1ca99c82010-05-27 16:47:42 -070056<h3 id="codelab_wiki"><a href="codelab/wiki/">Codelab: Writing Web Applications</a></h3>
57<p>
58This codelab takes the reader through the creation of a simple wiki web
59application. It touches on structs, methods, file I/O, http, regular expressions,
60and closures.
61</p>
62
Yves Junqueirade3a3972010-11-23 10:43:16 +110063<h3 id="codewalks"><a href="codewalk/">Codewalks</a></h3>
64<p>
65Guided tours of Go programs.
66</p>
Andrew Gerrand3bc2d0f2011-09-10 09:35:25 +100067<ul>
68<li><a href="/doc/codewalk/functions">First-Class Functions in Go</a></li>
69<li><a href="/doc/codewalk/markov">Generating arbitrary text: a Markov chain algorithm</a></li>
70<li><a href="/doc/codewalk/sharemem">Share Memory by Communicating</a></li>
71</ul>
Yves Junqueirade3a3972010-11-23 10:43:16 +110072
Andrew Gerrand1ca99c82010-05-27 16:47:42 -070073<h3 id="go_for_cpp_programmers"><a href="go_for_cpp_programmers.html">Go for C++ Programmers</a></h3>
74<p>
75An introduction to Go for C++ programmers.
76</p>
77
Andrew Gerrand3bc2d0f2011-09-10 09:35:25 +100078<h2 id="articles">Go Articles</h2>
79
80<p>
81Notable articles from the <a href="http://blog.golang.org/">Go Blog</a>.
82</p>
83
84<h3>Language</h3>
85
86<ul>
87<li><a href="http://blog.golang.org/2010/04/json-rpc-tale-of-interfaces.html">JSON-RPC: a tale of interfaces</a></li>
88<li><a href="http://blog.golang.org/2010/07/gos-declaration-syntax.html">Go's Declaration Syntax</a></li>
89<li><a href="http://blog.golang.org/2010/08/defer-panic-and-recover.html">Defer, Panic, and Recover</a></li>
90<li><a href="http://blog.golang.org/2010/09/go-concurrency-patterns-timing-out-and.html">Go Concurrency Patterns: Timing out, moving on</a></li>
91<li><a href="http://blog.golang.org/2011/01/go-slices-usage-and-internals.html">Go Slices: usage and internals</a></li>
92<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>
93<li><a href="http://blog.golang.org/2011/07/error-handling-and-go.html">Error Handling and Go</a></li>
94</ul>
95
96<h3>Packages</h3>
97
98<ul>
Scott Lawrenceddef49d2012-01-17 10:29:08 -080099<li><a href="http://blog.golang.org/2011/01/json-and-go.html">JSON and Go</a> - using the <a href="/pkg/encoding/json/">json</a> package.</li>
100<li><a href="http://blog.golang.org/2011/03/gobs-of-data.html">Gobs of data</a> - the design and use of the <a href="/pkg/encoding/gob/">gob</a> package.</li>
Andrew Gerrand3bc2d0f2011-09-10 09:35:25 +1000101<li><a href="http://blog.golang.org/2011/09/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 +1000102<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>
Nigel Tao585294d2011-09-30 13:11:20 +1000103<li><a href="http://blog.golang.org/2011/09/go-imagedraw-package.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 +1000104</ul>
105
106<h3>Tools</h3>
107
108<ul>
109<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>
110<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>
111<li><a href="http://blog.golang.org/2011/06/profiling-go-programs.html">Profiling Go Programs</a></li>
112</ul>
113
Andrew Gerrand6ab8d242010-09-16 14:01:02 +1000114<h2 id="tutorials_nonenglish">Non-English Documentation</h2>
Andrew Gerrand520d5db2010-07-02 13:32:02 +1000115
Andrew Gerrand6c2b43482011-06-03 09:48:42 +1000116<h3 id="docs_be">Belarusian &mdash; Беларуская</h3>
117
118<ul>
119<li><a href="http://www.designcontest.com/show/faq-be">faq-be</a> - Frequently Asked Questions.</li>
120</ul>
121
Andrew Gerrand6b2c7ff2010-09-30 13:43:09 +1000122<h3 id="docs_cn">Chinese &mdash; 中文</h3>
Andrew Gerrand520d5db2010-07-02 13:32:02 +1000123
Andrew Gerrand6b2c7ff2010-09-30 13:43:09 +1000124<ul>
Andrew Gerrand0bbbb442011-11-18 15:22:48 +1100125<li><a href="http://go-tour-zh.appspot.com/">A Tour of Go</a></li>
Andrew Gerrand6b2c7ff2010-09-30 13:43:09 +1000126<li><a href="http://code.google.com/p/golang-china/">golang-china</a> - a broad range of Go documentation.</li>
127<li><a href="http://code.google.com/p/ac-me/downloads/detail?name=fango.pdf">Effective Go and Tutorial</a></li>
128</ul>
Andrew Gerrandf34e1912010-08-26 10:17:14 +1000129
Andrew Gerrand5d51b0a2011-10-05 12:45:56 -0700130<h3 id="docs_cz">Czech &mdash; Čeština</h3>
131
132<ul>
133<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>
134</ul>
135
Andrew Gerrandcecddc42011-09-19 15:36:06 +1000136<h3 id="docs_fr">French &mdash; Français</h3>
137
138<ul>
139<li>
140<a href="http://code.google.com/p/golang-france/">golang-france</a> - Go documentation.
141</ul>
142
Andrew Gerrand6b2c7ff2010-09-30 13:43:09 +1000143<h3 id="docs_de">German &mdash; Deutsch</h3>
Andrew Gerrandf34e1912010-08-26 10:17:14 +1000144
Andrew Gerrand6b2c7ff2010-09-30 13:43:09 +1000145<ul>
146<li><a href="http://bitloeffel.de/DOC/golang/go_tutorial_de.html">Eine Anleitung zum Programmieren in Go</a> - the Go Tutorial.</li>
147<li><a href="http://bitloeffel.de/DOC/golang/effective_go_de.html">Wirkungsvoll Go programmieren</a> - Effective Go.</li>
148<li><a href="http://bitloeffel.de/DOC/golang/code_de.html">Wie man Go-Kode schreibt</a> - How to Write Go Code.</li>
149</ul>
150
151<h3 id="docs_jp">Japanese &mdash; 日本語</h3>
152<ul>
Andrew Gerrand8a7b2b22011-10-28 10:55:58 +0900153<li><a href="http://go-tour-jp.appspot.com/">A Tour of Go</a></li>
Andrew Gerrand92b7b482011-10-15 08:42:31 +1100154<li><a href="http://golang.jp/">golang.jp</a> - Go documentation and news.</li>
Andrew Gerrand6b2c7ff2010-09-30 13:43:09 +1000155</ul>
Andrew Gerrand1ca99c82010-05-27 16:47:42 -0700156
Andrew Gerrandb96fc592011-05-17 14:24:32 +1000157<h3 id="docs_kr">Korean &mdash; 한국어</h3>
158<ul>
Andrew Gerrand92b7b482011-10-15 08:42:31 +1100159<li><a href="http://go-tour-kr.appspot.com">A Tour of Go</a></li>
160<li><a href="http://code.google.com/p/golang-korea">golang-korea</a> - Go documentation and news.</li>
Andrew Gerrandb96fc592011-05-17 14:24:32 +1000161</ul>
162
Andrew Gerrand6ab8d242010-09-16 14:01:02 +1000163</div>
164
165
166<div class="right-column">
167
168<h2 id="References">References</h2>
169
170<p>Keep these under your pillow.</p>
171
172<h3 id="pkg"><a href="/pkg/">Package Documentation</a></h3>
Andrew Gerrand1ca99c82010-05-27 16:47:42 -0700173<p>
Andrew Gerrand6ab8d242010-09-16 14:01:02 +1000174The built-in documentation for the Go standard library.
Andrew Gerrand1ca99c82010-05-27 16:47:42 -0700175</p>
176
Andrew Gerrand6ab8d242010-09-16 14:01:02 +1000177<h3 id="cmd"><a href="/cmd/">Command Documentation</a></h3>
Andrew Gerrand1ca99c82010-05-27 16:47:42 -0700178<p>
Andrew Gerrand6ab8d242010-09-16 14:01:02 +1000179The built-in documentation for the Go tools.
Andrew Gerrand1ca99c82010-05-27 16:47:42 -0700180</p>
181
Andrew Gerrand6ab8d242010-09-16 14:01:02 +1000182<h3 id="spec"><a href="go_spec.html">Language Specification</a></h3>
Andrew Gerrand1ca99c82010-05-27 16:47:42 -0700183<p>
Andrew Gerrand6ab8d242010-09-16 14:01:02 +1000184The official Go Language specification.
Andrew Gerrand1ca99c82010-05-27 16:47:42 -0700185</p>
186
Andrew Gerrand23868082011-05-27 16:07:30 +1000187<h3 id="release"><a href="devel/release.html">Release History</a></h3>
188<p>A summary of the changes between Go releases.</p>
189
Andrew Gerrand6ab8d242010-09-16 14:01:02 +1000190<h3 id="go_mem"><a href="go_mem.html">The Go Memory Model</a></h3>
Andrew Gerrand1ca99c82010-05-27 16:47:42 -0700191<p>
Andrew Gerrand6ab8d242010-09-16 14:01:02 +1000192A document that specifies the conditions under which reads of a variable in
193one goroutine can be guaranteed to observe values produced by writes to the
194same variable in a different goroutine.
Andrew Gerrand1ca99c82010-05-27 16:47:42 -0700195</p>
196
Luuk van Dijk3e268622011-10-05 10:49:23 -0700197<h3 id="debugging_with_gdb"><a href="debugging_with_gdb.html">Debugging Go Code with GDB</a></h3>
198<p>
199Using GDB to debug Go programs.
200</p>
201
Andrew Gerrandbab711b2010-07-30 10:36:13 +1000202<h2 id="videos_talks">Videos and Talks</h2>
203
Andrew Gerrand4fb58572011-05-17 13:46:54 +1000204<h3 id="writing_web_apps"><a href="http://www.youtube.com/watch?v=-i0hat7pdpk">Writing Web Apps in Go</a></h3>
205<p>
206A talk by Rob Pike and Andrew Gerrand presented at Google I/O 2011.
207It walks through the construction and deployment of a simple web application
208and unveils the <a href="http://blog.golang.org/2011/05/go-and-google-app-engine.html">Go runtime for App Engine</a>.
209See the <a href="/doc/talks/io2011/Writing_Web_Apps_in_Go.pdf">presentation slides</a>.
210</p>
211
212<h3 id="real_world_go"><a href="http://www.youtube.com/watch?v=7QDVRowyUQA">Real World Go</a></h3>
213<p>
214A talk by Andrew Gerrand presented at Google I/O Bootcamp 2011.
215It gives a broad overview of Go's type system and concurrency model
216and provides four examples of Go programs that solve real problems.
217See the <a href="/doc/talks/io2011/Real_World_Go.pdf">presentation slides</a>.
218</p>
219
Andrew Gerrandbab711b2010-07-30 10:36:13 +1000220<h3 id="go_programming"><a href="http://www.youtube.com/watch?v=jgVhBThJdXc">Go Programming</a></h3>
221<p>
222A presentation delivered by Rob Pike and Russ Cox at Google I/O 2010. It
223illustrates how programming in Go differs from other languages through a set of
224examples demonstrating features particular to Go. These include concurrency,
225embedded types, methods on any type, and program construction using interfaces.
226</p>
Andrew Gerrand1ca99c82010-05-27 16:47:42 -0700227
Andrew Gerrand0e3eefa2010-12-03 06:57:30 +0900228<h3 id="practical_go_programming"><a href="http://osdc.blip.tv/file/4432146/">Practical Go Programming</a></h3>
229<p>
230This talk presents the development of a complete web application in Go.
231It looks at design, storage, concurrency, and scaling issues in detail, using
232the simple example of an URL shortening service.
233See the <a href="http://wh3rd.net/practical-go/">presentation slides</a>.
234</p>
235
Andrew Gerrand1ca99c82010-05-27 16:47:42 -0700236<h3 id="techtalk"><a href="http://www.youtube.com/watch?v=rKnDgT73v8s">The Go Tech Talk</a></h3>
237<p>
238An hour-long talk delivered by Rob Pike at Google in October 2009.
239The 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,
240but it's still a good introduction.
241</p>
242
Andrew Gerrand1ca99c82010-05-27 16:47:42 -0700243<h3 id="gocoding_channel"><a href="http://www.youtube.com/gocoding">gocoding YouTube Channel</a></h3>
244<p>
245A YouTube channel that includes screencasts and other Go-related videos:
246</p>
247<ul>
248<li><a href="http://www.youtube.com/gocoding#p/u/0/jDWBJOXs_iI">Screencast: Writing Go Packages</a> - writing, building, and distributing Go packages.</li>
Andrew Gerrandbab711b2010-07-30 10:36:13 +1000249<li><a href="http://www.youtube.com/watch?v=3brH0zOqm0w">Screencast: Testing Go Packages</a> - writing unit tests and benchmarking Go packages.</li>
Andrew Gerrand1ca99c82010-05-27 16:47:42 -0700250</ul>
251
Andrew Gerrand1748dc32010-10-14 17:25:23 +1100252<h3 id="jaoo_go"><a href="/doc/ExpressivenessOfGo.pdf">The Expressiveness Of Go</a></h3>
253<p>
254A discussion of the qualities that make Go an expressive and comprehensible
255language. The talk was presented by Rob Pike at JAOO 2010.
256The recording of the event was lost due to a hardware error.
257</p>
258
Andrew Gerrandbab711b2010-07-30 10:36:13 +1000259<h3 id="oscon_go"><a href="http://www.oscon.com/oscon2010/public/schedule/detail/14760">Another Go at Language Design</a></h3>
260<p>
261A tour, with some background, of the major features of Go, intended for
262an audience new to the language. The talk was presented at OSCON 2010.
263See the <a href="http://assets.en.oreilly.com/1/event/45/Another%20Go%20at%20Language%20Design%20Presentation.pdf">presentation slides</a>.
264</p>
Andrew Gerrand96868c72010-10-13 09:15:28 +1100265<p>
266This talk was also delivered at Sydney University in September 2010. A video
267of the lecture is available
268<a href="http://sydney.edu.au/engineering/it/videos/seminar_pike">here</a>.
269</p>
Andrew Gerrandbab711b2010-07-30 10:36:13 +1000270
Andrew Gerrand96868c72010-10-13 09:15:28 +1100271<h3 id="emerging_go"><a href="http://www.oscon.com/oscon2010/public/schedule/detail/15464">Go Emerging Languages Conference Talk</a></h3>
Andrew Gerrandbab711b2010-07-30 10:36:13 +1000272<p>
273Rob 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:
274</p>
275<p><i>
276Go’s approach to concurrency differs from that of many languages, even those
277(such as Erlang) that make concurrency central, yet it has deep roots. The path
278from Hoare’s 1978 paper to Go provides insight into how and why Go works as it
279does.
280</i></p>
281
Rob Pike9b409ac2011-06-10 15:05:51 +1000282<h3 id="go_frontend_gcc"><a href="talks/gofrontend-gcc-summit-2010.pdf">The Go frontend for GCC</a></h3>
Andrew Gerrandbddc6992010-12-03 11:47:33 +1100283<p>
284A description of the Go language frontend for gcc.
285Ian Lance Taylor's paper delivered at the GCC Summit 2010.
286</p>
287
Andrew Gerrand1ca99c82010-05-27 16:47:42 -0700288<h3 id="promo_video"><a href="http://www.youtube.com/watch?v=wwoWei-GAPo">The Go Promo Video</a></h3>
289<p>
290A short promotional video featuring Russ Cox demonstrating Go's fast compiler.
291</p>
292
Andrew Gerrand6ab8d242010-09-16 14:01:02 +1000293</div>
Andrew Gerrand520d5db2010-07-02 13:32:02 +1000294
Andrew Gerrand6ab8d242010-09-16 14:01:02 +1000295<div class="end-columns"></div>