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 @@ ...@@ -20,8 +20,7 @@
<dd><a href="#{{$name_html}}">{{node_html .Decl $.FSet}}</a></dd> <dd><a href="#{{$name_html}}">{{node_html .Decl $.FSet}}</a></dd>
{{end}} {{end}}
{{range .Types}} {{range .Types}}
{{$tname := printf "%s" .Type.Name}} {{$tname_html := html .Name}}
{{$tname_html := node_html .Type.Name $.FSet}}
<dd><a href="#{{$tname_html}}">type {{$tname_html}}</a></dd> <dd><a href="#{{$tname_html}}">type {{$tname_html}}</a></dd>
{{range .Funcs}} {{range .Funcs}}
{{$name_html := html .Name}} {{$name_html := html .Name}}
...@@ -86,8 +85,8 @@ ...@@ -86,8 +85,8 @@
{{example_html .Name $.Examples $.FSet}} {{example_html .Name $.Examples $.FSet}}
{{end}} {{end}}
{{range .Types}} {{range .Types}}
{{$tname := printf "%s" .Type.Name}} {{$tname := .Name}}
{{$tname_html := node_html .Type.Name $.FSet}} {{$tname_html := html .Name}}
<h2 id="{{$tname_html}}">type <a href="/{{posLink_url .Decl $.FSet}}">{{$tname_html}}</a></h2> <h2 id="{{$tname_html}}">type <a href="/{{posLink_url .Decl $.FSet}}">{{$tname_html}}</a></h2>
{{comment_html .Doc}} {{comment_html .Doc}}
<pre>{{node_html .Decl $.FSet}}</pre> <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