diff --git a/doc/godocs.js b/doc/godocs.js index 58ce52f85de..bbf5ea28931 100644 --- a/doc/godocs.js +++ b/doc/godocs.js @@ -57,6 +57,7 @@ function godocs_bindSearchEvents() { * links. "Decorates" the element with id=="nav" with this table of contents. */ function godocs_generateTOC() { + if (document.getElementById('manual-nav')) { return; } var navbar = document.getElementById('nav'); if (!navbar) { return; } diff --git a/lib/godoc/package.html b/lib/godoc/package.html index 55812d17bc5..e2889f5934e 100644 --- a/lib/godoc/package.html +++ b/lib/godoc/package.html @@ -3,10 +3,47 @@ Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> + +
+{{with .PDoc}} +
+
Overview
+ {{if .Consts}} +
Constants
+ {{end}} + {{if .Vars}} +
Variables
+ {{end}} + {{range .Funcs}} + {{$name_html := html .Name}} +
{{node_html .Decl $.FSet}}
+ {{end}} + {{range .Types}} + {{$tname := printf "%s" .Type.Name}} + {{$tname_html := node_html .Type.Name $.FSet}} +
type {{$tname_html}}
+ {{range .Factories}} + {{$name_html := html .Name}} +
    {{node_html .Decl $.FSet}}
+ {{end}} + {{range .Methods}} + {{$name_html := html .Name}} +
    {{node_html .Decl $.FSet}}
+ {{end}} + {{end}} + {{if .Bugs}} +
Bugs
+ {{end}} +
+{{end}} +
+ + {{with .PAst}}
{{node_html . $.FSet}}
{{end}} {{with .PDoc}} +

Overview

{{if $.IsPkg}}

import "{{html .ImportPath}}"

@@ -38,47 +75,43 @@
{{node_html .Decl $.FSet}}
{{end}} {{end}} - {{with .Funcs}} - {{range .}} - {{/* Name is a string - no need for FSet */}} + {{range .Funcs}} + {{/* Name is a string - no need for FSet */}} + {{$name_html := html .Name}} +

func {{$name_html}}

+

{{node_html .Decl $.FSet}}

+ {{comment_html .Doc}} + {{example_html .Name $.Examples $.FSet}} + {{end}} + {{range .Types}} + {{$tname := printf "%s" .Type.Name}} + {{$tname_html := node_html .Type.Name $.FSet}} +

type {{$tname_html}}

+ {{comment_html .Doc}} +

{{node_html .Decl $.FSet}}

+ {{example_html $tname $.Examples $.FSet}} + {{range .Consts}} + {{comment_html .Doc}} +
{{node_html .Decl $.FSet}}
+ {{end}} + {{range .Vars}} + {{comment_html .Doc}} +
{{node_html .Decl $.FSet}}
+ {{end}} + {{range .Factories}} {{$name_html := html .Name}} -

func {{$name_html}}

+

func {{$name_html}}

{{node_html .Decl $.FSet}}

{{comment_html .Doc}} {{example_html .Name $.Examples $.FSet}} {{end}} - {{end}} - {{with .Types}} - {{range .}} - {{$tname := printf "%s" .Type.Name}} - {{$tname_html := node_html .Type.Name $.FSet}} -

type {{$tname_html}}

+ {{range .Methods}} + {{$name_html := html .Name}} +

func ({{node_html .Recv $.FSet}}) {{$name_html}}

+

{{node_html .Decl $.FSet}}

{{comment_html .Doc}} -

{{node_html .Decl $.FSet}}

- {{example_html $tname $.Examples $.FSet}} - {{range .Consts}} - {{comment_html .Doc}} -
{{node_html .Decl $.FSet}}
- {{end}} - {{range .Vars}} - {{comment_html .Doc}} -
{{node_html .Decl $.FSet}}
- {{end}} - {{range .Factories}} - {{$name_html := html .Name}} -

func {{$name_html}}

-

{{node_html .Decl $.FSet}}

- {{comment_html .Doc}} - {{example_html .Name $.Examples $.FSet}} - {{end}} - {{range .Methods}} - {{$name_html := html .Name}} -

func ({{node_html .Recv $.FSet}}) {{$name_html}}

-

{{node_html .Decl $.FSet}}

- {{comment_html .Doc}} - {{$name := printf "%s_%s" $tname .Name}} - {{example_html $name $.Examples $.FSet}} - {{end}} + {{$name := printf "%s_%s" $tname .Name}} + {{example_html $name $.Examples $.FSet}} {{end}} {{end}} {{with .Bugs}}