Commit d191ad11 authored by Robert Griesemer's avatar Robert Griesemer

lib/godoc: use Type.Name directly

Also: remove an unused template variable declaration.

R=adg
CC=golang-dev
https://golang.org/cl/5572043
parent 1dc37bbf
......@@ -20,8 +20,7 @@
<dd><a href="#{{$name_html}}">{{node_html .Decl $.FSet}}</a></dd>
{{end}}
{{range .Types}}
{{$tname := printf "%s" .Type.Name}}
{{$tname_html := node_html .Type.Name $.FSet}}
{{$tname_html := html .Name}}
<dd><a href="#{{$tname_html}}">type {{$tname_html}}</a></dd>
{{range .Funcs}}
{{$name_html := html .Name}}
......@@ -86,8 +85,8 @@
{{example_html .Name $.Examples $.FSet}}
{{end}}
{{range .Types}}
{{$tname := printf "%s" .Type.Name}}
{{$tname_html := node_html .Type.Name $.FSet}}
{{$tname := .Name}}
{{$tname_html := html .Name}}
<h2 id="{{$tname_html}}">type <a href="/{{posLink_url .Decl $.FSet}}">{{$tname_html}}</a></h2>
{{comment_html .Doc}}
<pre>{{node_html .Decl $.FSet}}</pre>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment