{{with .PDoc}} {{if $.IsPkg}}
import "{{html .ImportPath}}"
Overview
Index
{{if $.Examples}}
Examples
{{end}} {{if $.Dirs}}
Subdirectories
{{end}}

Overview ▾

{{comment_html .Doc}}
{{example_html "" $.Examples $.FSet}}

Index ▾

{{if .Consts}}
Constants
{{end}} {{if .Vars}}
Variables
{{end}} {{range .Funcs}} {{$name_html := html .Name}}
{{node_html .Decl $.FSet}}
{{end}} {{range .Types}} {{$tname_html := html .Name}}
type {{$tname_html}}
{{range .Funcs}} {{$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}} {{if .Notes}} {{range $marker, $item := .Notes}}
{{$marker}}
{{end}} {{end}}
{{if $.Examples}}

Examples

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

Package files

{{range .}} {{.|filename|html}} {{end}}

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

Constants

{{range .}}
{{node_html .Decl $.FSet}}
{{comment_html .Doc}} {{end}} {{end}} {{with .Vars}}

Variables

{{range .}}
{{node_html .Decl $.FSet}}
{{comment_html .Doc}} {{end}} {{end}} {{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 := .Name}} {{$tname_html := html .Name}}

type {{$tname_html}}

{{node_html .Decl $.FSet}}
{{comment_html .Doc}} {{range .Consts}}
{{node_html .Decl $.FSet}}
{{comment_html .Doc}} {{end}} {{range .Vars}}
{{node_html .Decl $.FSet}}
{{comment_html .Doc}} {{end}} {{example_html $tname $.Examples $.FSet}} {{range .Funcs}} {{$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 ({{html .Recv}}) {{$name_html}}

{{node_html .Decl $.FSet}}
{{comment_html .Doc}} {{$name := printf "%s_%s" $tname .Name}} {{example_html $name $.Examples $.FSet}} {{end}} {{end}} {{else}} {{/* not a package; is a command */}} {{comment_html .Doc}} {{end}} {{with .Bugs}}

Bugs

{{range .}} {{comment_html .}} {{end}} {{end}} {{with .Notes}} {{range $marker, $content := .}}

{{$marker}}

{{range .}} {{comment_html .}} {{end}} {{end}} {{end}} {{end}} {{with .PAst}}
{{node_html . $.FSet}}
{{end}} {{with .Dirs}} {{/* DirList entries are numbers and strings - no need for FSet */}} {{if $.PDoc}}

Subdirectories

{{else}}
{{end}} {{if not $.DirFlat}} {{end}} {{range .List}} {{if $.DirFlat}} {{if .HasPkg}} {{end}} {{else}} {{end}} {{end}}
Name      Synopsis
..
{{html .Path}}      {{html .Synopsis}}
{{repeat `     ` .Depth}}{{html .Name}}      {{html .Synopsis}}
{{if $.PDoc}}{{else}}

Need more packages? Take a look at the Go Projects wiki page.

{{end}} {{end}} {{if $.Examples}} {{end}}