diff --git a/doc/go_learning.html b/doc/docs.html
rename from doc/go_learning.html
rename to doc/docs.html
index 78a1ba94b07ca4d1e5a8c61e04e94b5ed77a4bc7..ae27dd2de016b7ecaa2f6dc0a74d54d461e30206 100644
--- a/doc/go_learning.html
+++ b/doc/docs.html
@@ -1,42 +1,21 @@
-
-
+
-
Recommendations
-
-If you're new to Go, we recommend following the
-tutorial while consulting the
-language spec.
-Then read Effective Go, as it addresses many
-common beginner questions.
-
-The built-in documentation for the Go tools.
+If you're new to Go, we recommend you work through the
+tutorial. The
+language specfication has all the details should
+you want to explore.
-The official Go Language specification.
+Once you've learned a little about the language,
+Effective Go will help you learn the style and
+idioms of programming in Go.
-A document that specifies the conditions under which reads of a variable in
-one goroutine can be guaranteed to observe values produced by writes to the
-same variable in a different goroutine.
-
The first tutorial. An introductory text that touches upon several core
@@ -51,6 +30,11 @@ A must read for any new Go programmer. It augments the tutorial and
the language spec, both of which should be read first.
-A summarization of the changes between tagged releases of Go.
+A document that specifies the conditions under which reads of a variable in
+one goroutine can be guaranteed to observe values produced by writes to the
+same variable in a different goroutine.
Videos and Talks
@@ -170,30 +166,6 @@
A short promotional video featuring Russ Cox demonstrating Go's fast compiler.
diff --git a/doc/godocs.js b/doc/godocs.js
index b2fc1b357b91cf7859f6ae0512139ffaaa4fbe23..8b451547d6b745bdac0cc95104e6173b40fdec0c 100644
--- a/doc/godocs.js
+++ b/doc/godocs.js
@@ -11,15 +11,30 @@
/* We want to do some stuff on page load (after the HTML is rendered).
So listen for that:
*/
-if (window.addEventListener){
- window.addEventListener('load', godocs_onload, false);
-} else if (window.attachEvent){
- window.attachEvent('onload', godocs_onload);
+function bindEvent(el, e, fn) {
+ if (el.addEventListener){
+ el.addEventListener(e, fn, false);
+ } else if (el.attachEvent){
+ el.attachEvent('on'+e, fn);
+ }
}
+bindEvent(window, 'load', godocs_onload);
function godocs_onload() {
+ godocs_bindSearchEvents();
godocs_generateTOC();
godocs_addTopLinks();
+}
+
+function godocs_bindSearchEvents() {
+ var search = document.getElementById('search');
+ function clearInactive() {
+ if (search.className == "inactive") {
+ search.value = "";
+ search.className = "";
+ }
+ }
+ bindEvent(search, 'focus', clearInactive);
}
/* Generates a table of contents: looks for h2 and h3 elements and generates
diff --git a/doc/ie.css b/doc/ie.css
new file mode 100644
index 0000000000000000000000000000000000000000..bb89d54be2236e29b5ac01be249627a83144c3a5
--- /dev/null
+++ b/doc/ie.css
@@ -0,0 +1 @@
+#nav-main li { display: inline; }
diff --git a/doc/install.html b/doc/install.html
index 25be700d66a812852d44db6114bda255428d2dbe..d184a7209b2df9bfb71da17b4beaa8ad85a45797 100644
--- a/doc/install.html
+++ b/doc/install.html
@@ -1,4 +1,4 @@
-
+
Introduction
@@ -7,6 +7,8 @@ BSD-style license.
This document explains how to check out the sources,
build them on your own machine, and run them.
+
+
There are two distinct ways to experiment with Go.
@@ -64,11 +66,20 @@ The full set of supported combinations is listed in the discussion of
environment variables below.
+
+
Install C tools, if needed
-
The Go tool chain is written in C. To build it, you need
-to have GCC, the standard C libraries, the parser generator Bison,
-make, awk, and the text editor ed installed.
+
The Go tool chain is written in C.
+To build it, you need these programs installed:
+
+
GCC,
+
the standard C libraries,
+
the parser generator Bison,
+
make,
+
awk, and
+
the text editor ed.
+
On OS X, they can be
@@ -76,18 +87,28 @@ installed as part of
Xcode.
-
On Linux, use sudo apt-get install bison ed gawk gcc libc6-dev make
-(or the equivalent on your Linux distribution).
+
On Ubuntu/Debian, use sudo apt-get install bison ed gawk gcc libc6-dev make.
+
+
+
Install Mercurial, if needed
+
+
+To perform the next step you must have Mercurial installed. (Check that you have an hg command.) This suffices to install Mercurial most systems:
+
+
+sudo easy_install mercurial
+
+(On Ubuntu/Debian, you might try apt-get install python-setuptools
+python-dev build-essential first. The Mercurial in your distribution's
+package repository will most likely be old and broken.)
+
+
+If that fails, try installing manually from the Mercurial Download page.
Fetch the repository
-If you do not have Mercurial installed (you do not have an hg command),
-sudo easy_install mercurial works on most systems.
-(On Ubuntu/Debian, you might try apt-get install python-setuptools python-dev build-essential gcc first.)
-If that fails, visit the Mercurial Download page.
-
Go will install to a directory named go.
Change to the directory that will be its parent
and make sure the go directory does not exist.
@@ -129,8 +150,11 @@ and the details on the last few lines will reflect the operating system,
architecture, and root directory used during the install.
+
+
For more information about ways to control the build,
see the discussion of environment variables below.
+
Writing programs
@@ -195,6 +219,7 @@ command line.
The linker learns about them by reading hello.6.
+
To build more complicated programs, you will probably
want to use a
@@ -207,6 +232,28 @@ document
about contributing to the Go project
gives more detail about
the process of building and testing Go programs.
+
+Build a web application by following the Wiki
+Codelab.
+
+
+
+Read Effective Go to learn about writing
+idiomatic Go code.
+
+
+
+For the full story, consult Go's extensive
+documentation.
Keeping up with releases
diff --git a/doc/logo.png b/doc/logo.png
new file mode 100644
index 0000000000000000000000000000000000000000..076ce398eb3923cac96669ac6030f087087aac85
Binary files /dev/null and b/doc/logo.png differ
diff --git a/doc/play_overlay.png b/doc/play_overlay.png
new file mode 100644
index 0000000000000000000000000000000000000000..20ef7f3996602e034441ebc282eeb00190c0bd6e
Binary files /dev/null and b/doc/play_overlay.png differ
diff --git a/doc/playground.html b/doc/playground.html
new file mode 100644
index 0000000000000000000000000000000000000000..a1cdb70c37e24ec9973148fbfa4a12b24e340fbd
--- /dev/null
+++ b/doc/playground.html
@@ -0,0 +1,27 @@
+
+
+
+
+The Go Playground is a web service that runs on
+golang.org's servers.
+The service receives a Go program, compiles, links, and runs the program inside
+a sandbox, then returns the output.
+
+
+
+There are limitations to the programs that can be run in the Playground.
+They must be single-threaded (but they may use many goroutines).
+There are also limits on execution time, and CPU and memory usage.
+The Playground can access only a subset of the standard library
+(notably absent are network and filesystem access).
+Therefore, the only communication a Playground program has to the outside world
+is via standard output.
+
a systems programming language expressive, concurrent, garbage-collected
-
-
-
-
-
-
Go videos
-
-
-
"Go Programming"
-
Google I/O Tech Talk
-
-
-
-
"Fast Compiles"
-
Go Promotional Video
-
-
-
-
Go Youtube Channel
-
Screencasts and more
+
+
+
+
+ The Go programming language is an open source project to make
+ programmers more productive. Go is expressive, concise, clean,
+ and efficient. Its concurrency mechanisms make it easy to write
+ programs that get the most out of multicore and networked machines,
+ while its novel type system enables flexible and modular program
+ construction. Go compiles quickly to machine code yet has the
+ convenience of garbage collection and the power of run-time reflection.
+ It's a fast, statically typed, compiled language that feels like a
+ dynamically typed, interpreted language.
+
Go has a small, simple feature set, making it easy to learn.
-
-
… fast
-
-
-Go compilers produce fast code fast. Typical builds take a fraction of a second yet the resulting programs run nearly as quickly as comparable C or C++ code.
-
-
-
… concurrent
-
-
-Go promotes writing systems and servers as sets of lightweight communicating
-processes, called goroutines, with strong support from the language. Run
-thousands of goroutines if you want—and say good-bye to stack overflows.
-
-
-
… safe
-
-
Go is type safe and memory safe. Go has pointers but no pointer arithmetic.
-For random access, use slices, which know their limits.
-
-
… fun
-
-
-Go has fast builds, clean syntax, garbage collection,
-methods for any type, and run-time reflection.
-It feels like a dynamic language but has the speed and safety of a static language.
-It's a joy to use.
-