Skip to content

Commit a6866b7

Browse files
authored
Merge pull request #43 from RachelTucker/GOSDK-4
Created documentation script and generated v4.0.0 docs
2 parents b616f38 + 894d602 commit a6866b7

26 files changed

+80308
-0
lines changed

doc/create_docs.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
# Generates the documentation for the SDK and places the documentation
4+
# in a version specific folder.
5+
6+
if [ -z "$1" ]; then
7+
echo "Usage: $0 <SDK-Version>"
8+
exit 1
9+
fi
10+
11+
VERSION=$1
12+
13+
echo "Generating documentation for Go SDK version ${VERSION}"
14+
15+
mkdir $VERSION
16+
cd $VERSION
17+
18+
# Host the SDK documentation locally using godoc
19+
godoc -http=localhost:8080
20+
21+
# Get all the static docs generated by godoc
22+
# -r downloads files recursively
23+
# -np does not ascend to the parent directory
24+
# -N only retrieves files if newer than local
25+
# -E adds extension .html to html files if they do not have extension
26+
# -p downloads all files for each page, including css, js, and images
27+
# -k converts links to relative paths
28+
# -nH does not generate host prefix directory (i.e. no localhost:8080 folder)
29+
# --cut-dirs=1 does not generate the first layer of folders
30+
wget -r -np -N -E -p -k -nH --cut-dirs=1 http://localhost:8080/pkg/
Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<meta name="theme-color" content="#375EAB">
7+
8+
<title>buildclient - The Go Programming Language</title>
9+
10+
<link type="text/css" rel="stylesheet" href="../../godoc/style.css">
11+
12+
<link rel="stylesheet" href="../../godoc/jquery.treeview.css">
13+
<script type="text/javascript">window.initFuncs = [];</script>
14+
</head>
15+
<body>
16+
17+
<div id='lowframe' style="position: fixed; bottom: 0; left: 0; height: 0; width: 100%; border-top: thin solid grey; background-color: white; overflow: auto;">
18+
...
19+
</div><!-- #lowframe -->
20+
21+
<div id="topbar" class="wide"><div class="container">
22+
<div class="top-heading" id="heading-wide"><a href="http://localhost:8080/">The Go Programming Language</a></div>
23+
<div class="top-heading" id="heading-narrow"><a href="http://localhost:8080/">Go</a></div>
24+
<a href="index.html#" id="menu-button"><span id="menu-button-arrow">&#9661;</span></a>
25+
<form method="GET" action="http://localhost:8080/search">
26+
<div id="menu">
27+
<a href="http://localhost:8080/doc/">Documents</a>
28+
<a href="../../index.html">Packages</a>
29+
<a href="http://localhost:8080/project/">The Project</a>
30+
<a href="http://localhost:8080/help/">Help</a>
31+
<a href="http://localhost:8080/blog/">Blog</a>
32+
33+
<input type="text" id="search" name="q" class="inactive" value="Search" placeholder="Search">
34+
</div>
35+
</form>
36+
37+
</div></div>
38+
39+
40+
41+
<div id="page" class="wide">
42+
<div class="container">
43+
44+
45+
<h1>Package buildclient</h1>
46+
47+
48+
49+
50+
<div id="nav"></div>
51+
52+
53+
<!--
54+
Copyright 2009 The Go Authors. All rights reserved.
55+
Use of this source code is governed by a BSD-style
56+
license that can be found in the LICENSE file.
57+
-->
58+
<!--
59+
Note: Static (i.e., not template-generated) href and id
60+
attributes start with "pkg-" to make it impossible for
61+
them to conflict with generated attributes (some of which
62+
correspond to Go identifiers).
63+
-->
64+
65+
<script type='text/javascript'>
66+
document.ANALYSIS_DATA = null;
67+
document.CALLGRAPH = null;
68+
</script>
69+
70+
71+
72+
<div id="short-nav">
73+
<dl>
74+
<dd><code>import "ds3/buildclient"</code></dd>
75+
</dl>
76+
<dl>
77+
<dd><a href="index.html#pkg-overview" class="overviewLink">Overview</a></dd>
78+
<dd><a href="index.html#pkg-index" class="indexLink">Index</a></dd>
79+
80+
81+
</dl>
82+
</div>
83+
<!-- The package's Name is printed as title by the top-level template -->
84+
<div id="pkg-overview" class="toggleVisible">
85+
<div class="collapsed">
86+
<h2 class="toggleButton" title="Click to show Overview section">Overview ▹</h2>
87+
</div>
88+
<div class="expanded">
89+
<h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2>
90+
91+
</div>
92+
</div>
93+
94+
95+
<div id="pkg-index" class="toggleVisible">
96+
<div class="collapsed">
97+
<h2 class="toggleButton" title="Click to show Index section">Index ▹</h2>
98+
</div>
99+
<div class="expanded">
100+
<h2 class="toggleButton" title="Click to hide Index section">Index ▾</h2>
101+
102+
<!-- Table of contents for API; must be named manual-nav to turn off auto nav. -->
103+
<div id="manual-nav">
104+
<dl>
105+
106+
107+
108+
109+
<dd><a href="index.html#FromArgs">func FromArgs(args *commands.Arguments) (*ds3.Client, error)</a></dd>
110+
111+
112+
<dd><a href="index.html#FromEnv">func FromEnv() (*ds3.Client, error)</a></dd>
113+
114+
115+
116+
</dl>
117+
</div><!-- #manual-nav -->
118+
119+
120+
121+
122+
<h4>Package files</h4>
123+
<p>
124+
<span style="font-size:90%">
125+
126+
<a href="http://localhost:8080/src/ds3/buildclient/buildClient.go">buildClient.go</a>
127+
128+
</span>
129+
</p>
130+
131+
</div><!-- .expanded -->
132+
</div><!-- #pkg-index -->
133+
134+
<div id="pkg-callgraph" class="toggle" style="display: none">
135+
<div class="collapsed">
136+
<h2 class="toggleButton" title="Click to show Internal Call Graph section">Internal call graph ▹</h2>
137+
</div> <!-- .expanded -->
138+
<div class="expanded">
139+
<h2 class="toggleButton" title="Click to hide Internal Call Graph section">Internal call graph ▾</h2>
140+
<p>
141+
In the call graph viewer below, each node
142+
is a function belonging to this package
143+
and its children are the functions it
144+
calls&mdash;perhaps dynamically.
145+
</p>
146+
<p>
147+
The root nodes are the entry points of the
148+
package: functions that may be called from
149+
outside the package.
150+
There may be non-exported or anonymous
151+
functions among them if they are called
152+
dynamically from another package.
153+
</p>
154+
<p>
155+
Click a node to visit that function's source code.
156+
From there you can visit its callers by
157+
clicking its declaring <code>func</code>
158+
token.
159+
</p>
160+
<p>
161+
Functions may be omitted if they were
162+
determined to be unreachable in the
163+
particular programs or tests that were
164+
analyzed.
165+
</p>
166+
<!-- Zero means show all package entry points. -->
167+
<ul style="margin-left: 0.5in" id="callgraph-0" class="treeview"></ul>
168+
</div>
169+
</div> <!-- #pkg-callgraph -->
170+
171+
172+
173+
174+
175+
176+
<h2 id="FromArgs">func <a href="http://localhost:8080/src/ds3/buildclient/buildClient.go?s=303:363#L8">FromArgs</a></h2>
177+
<pre>func FromArgs(args *<a href="../../ds3_cli/commands/index.html">commands</a>.<a href="../../ds3_cli/commands/index.html#Arguments">Arguments</a>) (*<a href="../index.html">ds3</a>.<a href="../index.html#Client">Client</a>, <a href="http://localhost:8080/pkg/builtin/#error">error</a>)</pre>
178+
<p>
179+
Creates a client from cli arguments
180+
</p>
181+
182+
183+
184+
185+
186+
187+
188+
<h2 id="FromEnv">func <a href="http://localhost:8080/src/ds3/buildclient/buildClient.go?s=499:534#L13">FromEnv</a></h2>
189+
<pre>func FromEnv() (*<a href="../index.html">ds3</a>.<a href="../index.html#Client">Client</a>, <a href="http://localhost:8080/pkg/builtin/#error">error</a>)</pre>
190+
<p>
191+
Creates a client from environment variables
192+
</p>
193+
194+
195+
196+
197+
198+
199+
200+
201+
202+
203+
204+
205+
206+
207+
208+
209+
<div id="footer">
210+
Build version go1.6.<br>
211+
Except as <a href="https://developers.google.com/site-policies#restrictions">noted</a>,
212+
the content of this page is licensed under the
213+
Creative Commons Attribution 3.0 License,
214+
and code is licensed under a <a href="http://localhost:8080/LICENSE">BSD license</a>.<br>
215+
<a href="http://localhost:8080/doc/tos.html">Terms of Service</a> |
216+
<a href="http://www.google.com/intl/en/policies/privacy/">Privacy Policy</a>
217+
</div>
218+
219+
</div><!-- .container -->
220+
</div><!-- #page -->
221+
222+
<!-- TODO(adonovan): load these from <head> using "defer" attribute? -->
223+
<script type="text/javascript" src="../../godoc/jquery.js"></script>
224+
<script type="text/javascript" src="../../godoc/jquery.treeview.js"></script>
225+
<script type="text/javascript" src="../../godoc/jquery.treeview.edit.js"></script>
226+
227+
228+
<script type="text/javascript" src="../../godoc/godocs.js"></script>
229+
230+
</body>
231+
</html>
232+

0 commit comments

Comments
 (0)