blob: df111470a4c3911aea8acc2187116fa0098865c8 [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.
-->
{{define "imports"}}
<div>
{{if or .ExternalImports .InternalImports .StdLib}}
{{if .ExternalImports}}
<h2 class="Imports-heading">Imports</h2>
<ul class="Imports-list">
{{range .ExternalImports}}
<li><a href="/{{.}}">{{.}}</a></li>
{{end}}
</ul>
{{end}}
{{if .InternalImports}}
<h2 class="Imports-heading">Imports in module “{{.ModulePath}}”</h2>
<ul class="Imports-list">
{{range .InternalImports}}
<li><a href="/{{.}}">{{.}}</a></li>
{{end}}
</ul>
{{end}}
{{if .StdLib}}
<h2 class="Imports-heading">Standard library imports</h2>
<ul class="Imports-list">
{{range .StdLib}}
<li><a href="/{{.}}">{{.}}</a></li>
{{end}}
</ul>
{{end}}
{{else}}
{{template "empty_content" "This package does not have any imports!"}}
{{end}}
</div>
{{end}}