hack/api-docs/template/pkg.tpl (38 lines of code) (raw):

{{ define "packages" }} {{ with .packages}} <p>Packages:</p> <ul> {{ range . }} <li> <a href="#{{- packageAnchorID . -}}">{{ packageDisplayName . }}</a> </li> {{ end }} </ul> {{ end}} {{ range .packages }} <h2 id="{{- packageAnchorID . -}}"> {{- packageDisplayName . -}} </h2> {{ with (index .GoPackages 0 )}} {{ with .DocComments }} <p> {{ safe (renderComments .) }} </p> {{ end }} {{ end }} Resource Types: <ul> {{- range (visibleTypes (sortedTypes .Types)) -}} {{ if isExportedType . -}} <li> <a href="{{ linkForType . }}">{{ typeDisplayName . }}</a> </li> {{- end }} {{- end -}} </ul> {{ range (visibleTypes (sortedTypes .Types))}} {{ template "type" . }} {{ end }} <hr/> {{ end }} {{ end }}