From 516306f67781279e175fe0697446ba087b8ac793 Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Wed, 3 Oct 2012 15:05:08 +1000 Subject: [PATCH] godoc: move Examples above Index and make them both collapsable R=golang-dev, dsymonds, bradfitz, r CC=golang-dev https://golang.org/cl/6591066 --- lib/godoc/package.html | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/lib/godoc/package.html b/lib/godoc/package.html index 158be24804..ae574827d6 100644 --- a/lib/godoc/package.html +++ b/lib/godoc/package.html @@ -37,10 +37,32 @@ {{example_html "" $.Examples $.FSet}} + + {{if $.Examples}} +
+ +
+

Examples ▾

+
+ {{range $.Examples}} +
{{example_name .Name}}
+ {{end}} +
+
+
+ {{end}} -

Index

+
+ +
+

Index ▾

+ -
+
{{if .Consts}}
Constants
@@ -67,16 +89,8 @@ {{if .Bugs}}
Bugs
{{end}} -
- - {{if $.Examples}} -

Examples

-
- {{range $.Examples}} -
{{example_name .Name}}
- {{end}}
- {{end}} +
{{with .Filenames}}

Package files

@@ -88,6 +102,8 @@

{{end}} +
+
{{with .Consts}}

Constants

-- 2.48.1