summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/effective_go.html75
-rw-r--r--doc/go_for_cpp_programmers.html73
-rw-r--r--doc/go_lang_faq.html64
-rw-r--r--doc/go_mem.html62
-rw-r--r--doc/go_spec.html73
-rw-r--r--doc/go_tutorial.head7
-rw-r--r--doc/go_tutorial.html12
7 files changed, 15 insertions, 351 deletions
diff --git a/doc/effective_go.html b/doc/effective_go.html
index e9a1e2581..d72525c99 100644
--- a/doc/effective_go.html
+++ b/doc/effective_go.html
@@ -1,64 +1,7 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/transitional.dtd">
-<html>
-<head>
+<!-- Effective Go -->
<!-- interfaces; slices; embedding; value vs. pointer receivers; methods on anything; errors; testing -->
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
- <title>Effective Go</title>
-
- <link rel="stylesheet" type="text/css" href="style.css">
- <script type="text/javascript" src="godocs.js"></script>
-
-<style type="text/css">
-pre.bad {
- background-color: #ffeeee;
-}
-</style>
-
-</head>
-
-
-<body> <!-- onload="prettyPrint()" will color the programs -->
-
-<div id="topnav">
-<table summary=""><tr>
-<td id="headerImage">
-<a href="./"><img src="./logo_blue.png" height="44" width="120" alt="Go Home Page" style="border:0" /></a>
-</td>
-<td id="headerDocSetTitle">The Go Programming Language</td>
-</tr>
-</table>
-</div>
-
-<div id="linkList" style="clear:both">
- <ul>
- <li class="navhead">Related Guides</li>
- <li><a href="go_spec.html">Language Specification</a></li>
- <li><a href="go_mem.html">Memory Model</a></li>
- <li><a href="go_tutorial.html">Tutorial</a></li>
- <li><a href="effective_go.html">Effective Go</a></li>
- <li class="blank">&nbsp;</li>
- <li class="navhead">Other Resources</li>
- <li><a href="go_faq.html">FAQ</a></li>
- <li><a href="go_lang_faq.html">Language Design FAQ</a></li>
- <li><a href="go_for_cpp_programmers.html">Go for C++ Programmers</a></li>
- <li class="blank">&nbsp;</li>
- <li class="navhead">Home</li>
- <li><a href="/">Go documentation home</a></li>
- </ul>
-</div>
-
-<div id="content">
-
-<h1 id="effective_go">Effective Go</h1>
-
-
- <!-- The Table of Contents is automatically inserted in this <div>.
- Do not delete this <div>. -->
- <div id="nav"></div>
-
<h2 id="introduction">Introduction</h2>
<p>
@@ -187,7 +130,7 @@ x&lt;&lt;8 + y&lt;&lt;16
<h2>Commentary</h2>
<p>
-Go provides C-style <code>/* */</code> block comments
+Go provides C-style <code>/* */</code> block comments
and C++-style <code>//</code> line comments.
Line comments are the norm;
block comments appear mostly as package comments and
@@ -752,7 +695,7 @@ The return or result "parameters" of a Go function can be given names and
used as regular variables, just like the incoming parameters.
When named, they are initialized to the zero for their type when
the function begins; if the function executes a <code>return</code> statement
-with no arguments, the current values of the result parameters are
+with no arguments, the current values of the result parameters are
used as the returned values.
</p>
@@ -938,7 +881,7 @@ must be initialized before use.
A slice, for example, is a three-item descriptor
containing a pointer to the data (inside an array), the length, and the
capacity; until those items are initialized, the slice is <code>nil</code>.
-For slices, maps, and channels,
+For slices, maps, and channels,
<code>make</code> initializes the internal data structure and prepares
the value for use.
For instance,
@@ -1066,7 +1009,7 @@ header, body, checksum := buf[0:20], buf[20:n-4], buf[n-4:n];
Especially in libraries, functions tend to have multiple error modes.
Instead of returning a boolean to signal success,
return an <code>os.Error</code> that describes the failure.
-Even if there is only one failure mode now,
+Even if there is only one failure mode now,
there may be more later.
</p>
@@ -1255,9 +1198,9 @@ This data-driven style dominates in the Go package tests.
<p>
The <code>reflect.DeepEqual</code> function tests
whether two complex data structures have equal values.
-If a function returns a complex data structure,
+If a function returns a complex data structure,
<code>reflect.DeepEqual</code> combined with table-driven testing
-makes it easy to check that the return value is
+makes it easy to check that the return value is
exactly as expected.
</p>
@@ -1337,7 +1280,3 @@ lets readers concentrate on big ones.
</p>
-->
-
-</div>
-</body>
-</html>
diff --git a/doc/go_for_cpp_programmers.html b/doc/go_for_cpp_programmers.html
index 14ed14957..055242f71 100644
--- a/doc/go_for_cpp_programmers.html
+++ b/doc/go_for_cpp_programmers.html
@@ -1,59 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/transitional.dtd">
-<html>
-<head>
-
-<!--
-To convert <h2>Foo</h2> into <h2 id="Foo">Foo</h2>
-and convert §Foo into §<a href="#Foo">Foo</a>:
-
- Edit ,s/<(h.)>(.*)(<\/h.>)/<\1 id="\2">\2\3/g
- Edit ,x g/id="/ x/id="[^"]+"/ s/ /_/g
- Edit ,s/§([^),.]+)/§<a href="#\1">\1<\/a>/g
- Edit ,x/href="#[^"]+"/ s/ /_/g
--->
-
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
- <title>Go For C++ Programmers</title>
-
- <link rel="stylesheet" type="text/css" href="style.css">
- <script type="text/javascript" src="godocs.js"></script>
-
-</head>
-
-<body>
-
-<div id="topnav">
-<table summary=""><tr>
-<td id="headerImage">
-<a href="./"><img src="./logo_blue.png" height="44" width="120" alt="Go Home Page" style="border:0" /></a>
-</td>
-<td id="headerDocSetTitle">The Go Programming Language</td>
-</tr>
-</table>
-</div>
-
-<div id="linkList">
- <ul>
- <li class="navhead">Related Guides</li>
- <li><a href="go_spec.html">Language Specification</a></li>
- <li><a href="go_mem.html">Memory Model</a></li>
- <li><a href="go_tutorial.html">Tutorial</a></li>
- <li><a href="effective_go.html">Effective Go</a></li>
- <li class="blank">&nbsp;</li>
- <li class="navhead">Other Resources</li>
- <li><a href="go_faq.html">FAQ</a></li>
- <li><a href="go_lang_faq.html">Language Design FAQ</a></li>
- <li><a href="go_for_cpp_programmers.html">Go for C++ Programmers</a></li>
- <li class="blank">&nbsp;</li>
- <li class="navhead">Home</li>
- <li><a href="/">Go documentation home</a></li>
- </ul>
-</div>
-
-<div id="content">
-
-<h1 id="The_Go_Programming_Language_Specification">Go For C++ Programmers</h1>
+<!-- Go For C++ Programmers -->
<p>
Go is a systems programming language intended as an alternative to C++.
@@ -72,11 +17,6 @@ For a detailed description of the Go language, see the
<p>
There is more <a href="./">documentation about go</a>.
-
- <!-- The Table of Contents is automatically inserted in this <div>.
- Do not delete this <div>. -->
- <div id="nav"></div>
-
<h2 id="Conceptual_Differences">Conceptual Differences</h2>
<ul>
@@ -666,14 +606,3 @@ func f4(ch &lt;- chan cmd2) int {
return &lt;- my_ch;
}
</pre>
-
-</div>
-
-<div id="footer">
-<p>Except as noted, this content is
- licensed under <a href="http://creativecommons.org/licenses/by/3.0/">
- Creative Commons Attribution 3.0</a>.
-</div>
-
-</body>
-</html>
diff --git a/doc/go_lang_faq.html b/doc/go_lang_faq.html
index 142a22485..e40c3b036 100644
--- a/doc/go_lang_faq.html
+++ b/doc/go_lang_faq.html
@@ -1,54 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/transitional.dtd">
-<html>
-<head>
-
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
- <title>The Go Programming Language Design FAQ</title>
-
- <link rel="stylesheet" type="text/css" href="style.css">
- <script type="text/javascript" src="godocs.js"></script>
-
-</head>
-
-<body>
-
-<div id="topnav">
-<table summary=""><tr>
-<td id="headerImage">
-<a href="./"><img src="./logo_blue.png" height="44" width="120" alt="Go Home Page" style="border:0" /></a>
-</td>
-<td id="headerDocSetTitle">The Go Programming Language</td>
-</tr>
-</table>
-</div>
-
-<div id="linkList">
- <ul>
- <li class="navhead">Related Guides</li>
- <li><a href="go_spec.html">Language Specification</a></li>
- <li><a href="go_mem.html">Memory Model</a></li>
- <li><a href="go_tutorial.html">Tutorial</a></li>
- <li><a href="effective_go.html">Effective Go</a></li>
- <li class="blank">&nbsp;</li>
- <li class="navhead">Other Resources</li>
- <li><a href="go_faq.html">FAQ</a></li>
- <li><a href="go_lang_faq.html">Language Design FAQ</a></li>
- <li><a href="go_for_cpp_programmers.html">Go for C++ Programmers</a></li>
- <li class="blank">&nbsp;</li>
- <li class="navhead">Home</li>
- <li><a href="/">Go documentation home</a></li>
- </ul>
-</div>
-
-<div id="content">
-
-<h1 id="The_Go_Programming_Language_Design_FAQ">The Go Programming Language Design FAQ</h1>
-
-
- <!-- The Table of Contents is automatically inserted in this <div>.
- Do not delete this <div>. -->
- <div id="nav"></div>
+<!-- The Go Programming Language Design FAQ -->
<h2 id="origins">Origins</h2>
@@ -416,15 +366,3 @@ why no automatic numeric conversions?
make vs new
</pre>
-
-
-</div>
-
-<div id="footer">
-<p>Except as noted, this content is
- licensed under <a href="http://creativecommons.org/licenses/by/3.0/">
- Creative Commons Attribution 3.0</a>.
-</div>
-
-</body>
-</html>
diff --git a/doc/go_mem.html b/doc/go_mem.html
index 9239e9871..d2167a66a 100644
--- a/doc/go_mem.html
+++ b/doc/go_mem.html
@@ -1,64 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/transitional.dtd">
-<html>
-<head>
-
-<!--
-To convert <h2>Foo</h2> into <h2 id="Foo">Foo</h2>
-and convert §Foo into §<a href="#Foo">Foo</a>:
-
- Edit ,s/<(h.)>(.*)(<\/h.>)/<\1 id="\2">\2\3/g
- Edit ,x g/id="/ x/id="[^"]+"/ s/ /_/g
- Edit ,s/§([^),.]+)/§<a href="#\1">\1<\/a>/g
- Edit ,x/href="#[^"]+"/ s/ /_/g
--->
-
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
- <title>The Go Memory Model</title>
-
- <link rel="stylesheet" type="text/css" href="style.css">
- <script type="text/javascript" src="godocs.js"></script>
-
-</head>
-
-<body>
-
-<div id="topnav">
-<table summary=""><tr>
-<td id="headerImage">
-<a href="./"><img src="./logo_blue.png" height="44" width="120" alt="Go Home Page" style="border:0" /></a>
-</td>
-<td id="headerDocSetTitle">The Go Programming Language</td>
-</tr>
-</table>
-</div>
-
-<div id="linkList">
- <ul>
- <li class="navhead">Related Guides</li>
- <li><a href="go_spec.html">Language Specification</a></li>
- <li><a href="go_mem.html">Memory Model</a></li>
- <li><a href="go_tutorial.html">Tutorial</a></li>
- <li><a href="effective_go.html">Effective Go</a></li>
- <li class="blank">&nbsp;</li>
- <li class="navhead">Other Resources</li>
- <li><a href="go_faq.html">FAQ</a></li>
- <li><a href="go_lang_faq.html">Language Design FAQ</a></li>
- <li><a href="go_for_cpp_programmers.html">Go for C++ Programmers</a></li>
- <li class="blank">&nbsp;</li>
- <li class="navhead">Home</li>
- <li><a href="/">Go documentation home</a></li>
- </ul>
-</div>
-
-<div id="content">
-
-<h1 id="The_Go_Programming_Language_Specification">The Go Memory Model</h1>
-
-
- <!-- The Table of Contents is automatically inserted in this <div>.
- Do not delete this <div>. -->
- <div id="nav"></div>
+<!-- The Go Memory Model -->
<h2>Introduction</h2>
diff --git a/doc/go_spec.html b/doc/go_spec.html
index d49a4a075..afb85de02 100644
--- a/doc/go_spec.html
+++ b/doc/go_spec.html
@@ -1,64 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/transitional.dtd">
-<html>
-<head>
-
-<!--
-To convert <h2>Foo</h2> into <h2 id="Foo">Foo</h2>
-and convert §Foo into §<a href="#Foo">Foo</a>:
-
- Edit ,s/<(h.)>(.*)(<\/h.>)/<\1 id="\2">\2\3/g
- Edit ,x g/id="/ x/id="[^"]+"/ s/ /_/g
- Edit ,s/§([^),.]+)/§<a href="#\1">\1<\/a>/g
- Edit ,x/href="#[^"]+"/ s/ /_/g
--->
-
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
- <title>The Go Programming Language Specification</title>
-
- <link rel="stylesheet" type="text/css" href="style.css">
- <script type="text/javascript" src="godocs.js"></script>
-
-</head>
-
-<body>
-
-<div id="topnav">
-<table summary=""><tr>
-<td id="headerImage">
-<a href="./"><img src="./logo_blue.png" height="44" width="120" alt="Go Home Page" style="border:0" /></a>
-</td>
-<td id="headerDocSetTitle">The Go Programming Language</td>
-</tr>
-</table>
-</div>
-
-<div id="linkList" style="clear:both">
- <ul>
- <li class="navhead">Related Guides</li>
- <li><a href="go_spec.html">Language Specification</a></li>
- <li><a href="go_mem.html">Memory Model</a></li>
- <li><a href="go_tutorial.html">Tutorial</a></li>
- <li><a href="effective_go.html">Effective Go</a></li>
- <li class="blank">&nbsp;</li>
- <li class="navhead">Other Resources</li>
- <li><a href="go_faq.html">FAQ</a></li>
- <li><a href="go_lang_faq.html">Language Design FAQ</a></li>
- <li><a href="go_for_cpp_programmers.html">Go for C++ Programmers</a></li>
- <li class="blank">&nbsp;</li>
- <li class="navhead">Home</li>
- <li><a href="/">Go documentation home</a></li>
- </ul>
-</div>
-
-<div id="content">
-
-<h1 id="The_Go_Programming_Language_Specification">The Go Programming Language Specification</h1>
-
-
- <!-- The Table of Contents is automatically inserted in this <div>.
- Do not delete this <div>. -->
- <div id="nav"></div>
+<!-- The Go Programming Language Specification -->
<!--
Todo
@@ -4613,14 +4553,3 @@ The following minimal alignment properties are guaranteed:
<li><font color=red>Gccgo does not implement the blank identifier.</font></li>
<li><font color=red>Method expressions are not implemented.</font></li>
</ul>
-
-</div>
-
-<div id="footer">
-<p>Except as noted, this content is
- licensed under <a href="http://creativecommons.org/licenses/by/3.0/">
- Creative Commons Attribution 3.0</a>.
-</div>
-
-</body>
-</html>
diff --git a/doc/go_tutorial.head b/doc/go_tutorial.head
index c6977bd9c..a15e53683 100644
--- a/doc/go_tutorial.head
+++ b/doc/go_tutorial.head
@@ -1,8 +1,3 @@
-<div id="content">
-<h1 id="Lets_Go">Let's Go</h1>
-
- <!-- The Table of Contents is automatically inserted in this <div>.
- Do not delete this <div>. -->
- <div id="nav"></div>
+<!-- Let's Go -->
<h2>Introduction</h2>
diff --git a/doc/go_tutorial.html b/doc/go_tutorial.html
index 1029d744d..755e43db8 100644
--- a/doc/go_tutorial.html
+++ b/doc/go_tutorial.html
@@ -1,8 +1,4 @@
-<h1 id="Lets_Go">Let's Go</h1>
-
- <!-- The Table of Contents is automatically inserted in this <div>.
- Do not delete this <div>. -->
- <div id="nav"></div>
+<!-- Let's Go -->
<h2>Introduction</h2>
<p>
@@ -602,7 +598,7 @@ Finally we can run the program:
% helloworld3
hello, world
can't open file; err=No such file or directory
- %
+ %
</pre>
<h2>Rotting cats</h2>
@@ -770,7 +766,7 @@ Here it is in action:
abcdefghijklmnopqrstuvwxyz
% echo abcdefghijklmnopqrstuvwxyz | ./cat --rot13
nopqrstuvwxyzabcdefghijklm
- %
+ %
</pre>
<p>
Fans of dependency injection may take cheer from how easily interfaces
@@ -1354,5 +1350,3 @@ at the end of main:
There's a lot more to Go programming and concurrent programming in general but this
quick tour should give you some of the basics.
</table>
-</body>
-</html>