blob: ff2d2e9f4bc7f8c46954d214bcffa35f92c4f10d [file] [log] [blame]
<!--
Copyright 2021 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 "unit-build-context"}}
{{if .BuildContexts}}
{{if gt (len .BuildContexts) 1}}
<div class="UnitBuildContext-titleContext">
<label>
<a href="https://go.dev/about#build-context" class="UnitBuildContext-link">Rendered for</a>
<select class="go-Select js-buildContextSelect">
{{range .BuildContexts}}
<option{{if eq .GOOS $.GOOS}} selected{{end}} value="{{.GOOS}}">{{.GOOS}}/{{.GOARCH}}</option>
{{end}}
</select>
</label>
</div>
{{else if not (eq .GOOS "all")}}
<div class="UnitBuildContext-titleContext">
<div class="UnitBuildContext-singleContext">
<a href="/about#build-context" class="UnitBuildContext-link">Rendered for</a> {{.GOOS}}/{{.GOARCH}}
</div>
</div>
{{end}}
{{end}}
{{end}}