aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2012-01-12 17:36:57 -0800
committerRobert Griesemer <gri@golang.org>2012-01-12 17:36:57 -0800
commiteac31c67a8fd94b9e91043a40b3a3cb1bf6daa4f (patch)
tree8e89723af569fca62c8cf3d2b9c8b5ef1f9a0a00 /lib
parent4f63cdc81ff3f401a04457036e2c08f71bab7ccf (diff)
downloadgo-eac31c67a8fd94b9e91043a40b3a3cb1bf6daa4f.tar.xz
go/doc: streamlined go/doc API
- the main changes are removing the Doc suffix from the exported types, so instead of doc.TypeDoc one will have doc.Type, etc. - All exported types now have a Name (or Names) field. For Values, the Names field lists all declared variables or constants. - Methods have additional information about where they are coming from. - There's a mode field instead of a bool to control the package's operation, which makes it easier to extend w/o API changes. Except for the partially implemented new Method type, this is based on existing code. A clean rewrite is in progress based on this new API. R=rsc, kevlar CC=golang-dev https://golang.org/cl/5528060
Diffstat (limited to 'lib')
-rw-r--r--lib/godoc/package.html4
-rw-r--r--lib/godoc/package.txt2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/godoc/package.html b/lib/godoc/package.html
index 34ca3b629f..d0a42b47ba 100644
--- a/lib/godoc/package.html
+++ b/lib/godoc/package.html
@@ -22,7 +22,7 @@
{{$tname := printf "%s" .Type.Name}}
{{$tname_html := node_html .Type.Name $.FSet}}
<dd><a href="#{{$tname_html}}">type {{$tname_html}}</a></dd>
- {{range .Factories}}
+ {{range .Funcs}}
{{$name_html := html .Name}}
<dd>&nbsp; &nbsp; <a href="#{{$name_html}}">{{node_html .Decl $.FSet}}</a></dd>
{{end}}
@@ -98,7 +98,7 @@
<pre>{{node_html .Decl $.FSet}}</pre>
{{end}}
{{example_html $tname $.Examples $.FSet}}
- {{range .Factories}}
+ {{range .Funcs}}
{{$name_html := html .Name}}
<h3 id="{{$name_html}}">func <a href="/{{posLink_url .Decl $.FSet}}">{{$name_html}}</a></h3>
<p><code>{{node_html .Decl $.FSet}}</code></p>
diff --git a/lib/godoc/package.txt b/lib/godoc/package.txt
index 2eae7055d5..f219ecee96 100644
--- a/lib/godoc/package.txt
+++ b/lib/godoc/package.txt
@@ -49,7 +49,7 @@ TYPES
{{comment_text .Doc " " "\t"}}
{{end}}{{range .Vars}}{{node .Decl $.FSet}}
{{comment_text .Doc " " "\t"}}
-{{end}}{{range .Factories}}{{node .Decl $.FSet}}
+{{end}}{{range .Funcs}}{{node .Decl $.FSet}}
{{comment_text .Doc " " "\t"}}
{{end}}{{range .Methods}}{{node .Decl $.FSet}}
{{comment_text .Doc " " "\t"}}