blob: 8227525ed2b889f44be174d7b542a0b4d23122ba [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 "robots"}}
<meta name="robots" content="noindex">
{{end}}
{{define "main-styles"}}
<link href="/static/frontend/unit/imports/imports.css?version={{.AppVersionLabel}}" rel="stylesheet">
{{end}}
{{define "main-header"}}
{{template "unit-header" .}}
{{end}}
{{define "main-content"}}
{{block "imports" .Details}}{{end}}
{{end}}
{{define "imports"}}
<div>
{{if or .ExternalImports .InternalImports .StdLib}}
{{if .ExternalImports}}
<h2 class="Imports-heading go-textTitle">Imports</h2>
<ul class="Imports-list">
{{range .ExternalImports}}
<li class="Imports-listItem"><a href="/{{.}}">{{.}}</a></li>
{{end}}
</ul>
{{end}}
{{if .InternalImports}}
<h2 class="Imports-heading go-textTitle">Imports in module “{{.ModulePath}}”</h2>
<ul class="Imports-list">
{{range .InternalImports}}
<li class="Imports-listItem"><a href="/{{.}}">{{.}}</a></li>
{{end}}
</ul>
{{end}}
{{if .StdLib}}
<h2 class="Imports-heading go-textTitle">Standard library imports</h2>
<ul class="Imports-list">
{{range .StdLib}}
<li class="Imports-listItem"><a href="/{{.}}">{{.}}</a></li>
{{end}}
</ul>
{{end}}
{{else}}
{{template "gopher-airplane" "This package does not have any imports!"}}
{{end}}
</div>
{{end}}