blob: 4362948986e9823c83e535c77a2798d0e4237255 [file] [log] [blame]
<!--
Copyright 2020 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<ul role="group" id="doc-outline">
{{if or .Package.Doc (index .Examples.Map "")}}
<li role="none">
<a href="#pkg-overview" role="treeitem" aria-level="2" tabindex="-1"
data-gtmc="doc outline link">Overview</a>
</li>
{{end}}
{{- if or .Consts .Vars .Funcs .Types -}}
<li class="DocNav-overview" role="none">
<a href="#pkg-index" role="treeitem" aria-level="2" tabindex="-1" aria-owns="nav-group-index"
{{if .Examples.List}} aria-expanded="false"{{end}}
data-gtmc="doc outline link">
Index
</a>
{{if .Examples.List}}
<ul role="group" id="nav-group-index">
<li role="none">
<a href="#pkg-examples" role="treeitem" aria-level="3" tabindex="-1"
data-gtmc="doc outline link">
Examples
</a>
</li>
</ul>
{{end}}
</li>
<li class="DocNav-constants" role="none">
<a href="#pkg-constants" role="treeitem" aria-level="2" tabindex="-1"
data-gtmc="doc outline link">
Constants
</a>
</li>
<li class="DocNav-variables" role="none">
<a href="#pkg-variables" role="treeitem" aria-level="2" tabindex="-1"
data-gtmc="doc outline link">
Variables
</a>
</li>
<li class="DocNav-functions" role="none">
<a href="#pkg-functions" role="treeitem" aria-level="2" tabindex="-1" aria-owns="nav-group-functions"
{{if gt (len .Funcs) 0}}aria-expanded="false"{{end}} data-gtmc="doc outline link">
Functions
</a>
<ul role="group" id="nav-group-functions">
{{range .Funcs}}
<li role="none">
<a href="#{{.Name}}" role="treeitem" aria-level="3" tabindex="-1"
title="{{render_short_synopsis .Decl}}" data-gtmc="doc outline link">
{{render_short_synopsis .Decl}}
</a>
</li>
{{end}}
</ul>
</li>
<li class="DocNav-types" role="none">
<a href="#pkg-types" role="treeitem" aria-level="2" tabindex="-1" aria-owns="nav-group-types"
{{if gt (len .Types) 0}}aria-expanded="false"{{end}} data-gtmc="doc outline link">
Types
</a>
<ul role="group" id="nav-group-types">
{{range .Types}}
{{$tname := .Name}}
<li role="none">
{{if or .Funcs .Methods}}
{{$navgroupname := (printf "nav.group.%s" $tname)}}
{{$navgroupid := (safe_id $navgroupname)}}
<a href="#{{$tname}}" role="treeitem" aria-expanded="false" aria-level="3" tabindex="-1"
data-aria-owns="{{$navgroupid}}" title="type {{$tname}}"
data-gtmc="doc outline link">
type {{$tname}}
</a>
<ul role="group" id="{{$navgroupid}}">
{{range .Funcs}}
<li role="none">
<a href="#{{.Name}}" role="treeitem" aria-level="4" tabindex="-1"
title="{{render_short_synopsis .Decl}}" data-gtmc="doc outline link">
{{render_short_synopsis .Decl}}
</a>
</li>
{{end}}
{{range .Methods}}
<li role="none">
<a href="#{{$tname}}.{{.Name}}" role="treeitem" aria-level="4" tabindex="-1"
title="{{render_short_synopsis .Decl}}" data-gtmc="doc outline link">
{{render_short_synopsis .Decl}}
</a>
</li>
{{end}}
</ul>
{{else}}
<a href="#{{$tname}}" role="treeitem" aria-level="3" tabindex="-1" title="type {{$tname}}"
data-gtmc="doc outline link">
type {{$tname}}
</a>
{{end}} {{/* if or .Funcs .Methods */}}
</li>
{{end}} {{/* range .Types */}}
</ul>
</li>
{{end}}
{{if .Package.Notes}}
<li class="DocNav-notes" role="none">
<a href="#pkg-notes" role="treeitem" aria-expanded="false" aria-level="2" tabindex="-1"
aria-owns="nav-group-notes" data-gtmc="doc outline link">
Notes
</a>
<ul role="group" id="nav-group-notes">
{{range $marker, $item := .Package.Notes}}
<li role="none">
<a href="#pkg-note-{{$marker}}" role="treeitem" aria-level="3" tabindex="-1"
data-gtmc="doc outline link">
{{(index $.NoteHeaders $marker).Label}}s
</a>
</li>
{{end}}
</ul>
</li>
{{end}}
</ul>