From ae0208420024a4690a48068625e8fe111e8cb448 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Tue, 13 Dec 2016 12:47:37 -0800 Subject: [PATCH] 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 --- godoc/static/package.html | 6 +++--- godoc/static/static.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/godoc/static/package.html b/godoc/static/package.html index 067cfc2a..674196de 100644 --- a/godoc/static/package.html +++ b/godoc/static/package.html @@ -168,8 +168,8 @@

func {{$name_html}}

- {{comment_html .Doc}}
{{node_html $ .Decl true}}
+ {{comment_html .Doc}} {{example_html $ .Name}} {{callgraph_html $ "" .Name}} @@ -202,8 +202,8 @@

func {{$name_html}}

- {{comment_html .Doc}}
{{node_html $ .Decl true}}
+ {{comment_html .Doc}} {{example_html $ .Name}} {{callgraph_html $ "" .Name}} {{end}} @@ -213,8 +213,8 @@

func ({{html .Recv}}) {{$name_html}}

- {{comment_html .Doc}}
{{node_html $ .Decl true}}
+ {{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 74338bf7..0ee57620 100644 --- a/godoc/static/static.go +++ b/godoc/static/static.go @@ -1778,8 +1778,8 @@ function cgAddChild(tree, ul, cgn) {

func {{$name_html}}

- {{comment_html .Doc}}
{{node_html $ .Decl true}}
+ {{comment_html .Doc}} {{example_html $ .Name}} {{callgraph_html $ "" .Name}} @@ -1812,8 +1812,8 @@ function cgAddChild(tree, ul, cgn) {

func {{$name_html}}

- {{comment_html .Doc}}
{{node_html $ .Decl true}}
+ {{comment_html .Doc}} {{example_html $ .Name}} {{callgraph_html $ "" .Name}} {{end}} @@ -1823,8 +1823,8 @@ function cgAddChild(tree, ul, cgn) {

func ({{html .Recv}}) {{$name_html}}

- {{comment_html .Doc}}
{{node_html $ .Decl true}}
+ {{comment_html .Doc}} {{$name := printf "%s_%s" $tname .Name}} {{example_html $ $name}} {{callgraph_html $ .Recv .Name}}