godoc: flip order of signature and doc string for functions and methods

This partially reverts https://go-review.googlesource.com/#/c/33279/
(which moved doc strings above the declaration for all kinds of objects)
by moving the doc string for functions and methods below the signature
where they traditionally were.

Fixes golang/go#18150.

Change-Id: Icbb9e7edcb3b34ad1d900acb3180217abdc56a16
Reviewed-on: https://go-review.googlesource.com/34332
Reviewed-by: Chris Broadfoot <cbro@golang.org>
diff --git a/godoc/static/package.html b/godoc/static/package.html
index 067cfc2..674196d 100644
--- a/godoc/static/package.html
+++ b/godoc/static/package.html
@@ -168,8 +168,8 @@
 			<h2 id="{{$name_html}}">func <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a>
 				<a class="permalink" href="#{{$name_html}}">&#xb6;</a>
 			</h2>
-			{{comment_html .Doc}}
 			<pre>{{node_html $ .Decl true}}</pre>
+			{{comment_html .Doc}}
 			{{example_html $ .Name}}
 			{{callgraph_html $ "" .Name}}
 
@@ -202,8 +202,8 @@
 				<h3 id="{{$name_html}}">func <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a>
 					<a class="permalink" href="#{{$name_html}}">&#xb6;</a>
 				</h3>
-				{{comment_html .Doc}}
 				<pre>{{node_html $ .Decl true}}</pre>
+				{{comment_html .Doc}}
 				{{example_html $ .Name}}
 				{{callgraph_html $ "" .Name}}
 			{{end}}
@@ -213,8 +213,8 @@
 				<h3 id="{{$tname_html}}.{{$name_html}}">func ({{html .Recv}}) <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a>
 					<a class="permalink" href="#{{$tname_html}}.{{$name_html}}">&#xb6;</a>
 				</h3>
-				{{comment_html .Doc}}
 				<pre>{{node_html $ .Decl true}}</pre>
+				{{comment_html .Doc}}
 				{{$name := printf "%s_%s" $tname .Name}}
 				{{example_html $ $name}}
 				{{callgraph_html $ .Recv .Name}}
diff --git a/godoc/static/static.go b/godoc/static/static.go
index 74338bf..0ee5762 100644
--- a/godoc/static/static.go
+++ b/godoc/static/static.go
@@ -1778,8 +1778,8 @@
 			<h2 id="{{$name_html}}">func <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a>
 				<a class="permalink" href="#{{$name_html}}">&#xb6;</a>
 			</h2>
-			{{comment_html .Doc}}
 			<pre>{{node_html $ .Decl true}}</pre>
+			{{comment_html .Doc}}
 			{{example_html $ .Name}}
 			{{callgraph_html $ "" .Name}}
 
@@ -1812,8 +1812,8 @@
 				<h3 id="{{$name_html}}">func <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a>
 					<a class="permalink" href="#{{$name_html}}">&#xb6;</a>
 				</h3>
-				{{comment_html .Doc}}
 				<pre>{{node_html $ .Decl true}}</pre>
+				{{comment_html .Doc}}
 				{{example_html $ .Name}}
 				{{callgraph_html $ "" .Name}}
 			{{end}}
@@ -1823,8 +1823,8 @@
 				<h3 id="{{$tname_html}}.{{$name_html}}">func ({{html .Recv}}) <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a>
 					<a class="permalink" href="#{{$tname_html}}.{{$name_html}}">&#xb6;</a>
 				</h3>
-				{{comment_html .Doc}}
 				<pre>{{node_html $ .Decl true}}</pre>
+				{{comment_html .Doc}}
 				{{$name := printf "%s_%s" $tname .Name}}
 				{{example_html $ $name}}
 				{{callgraph_html $ .Recv .Name}}