blob: 5c3dcdca82f2d723f320e3a603f2d699b2658526 [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">Rendered for</a>
<select class="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">Rendered for</a> {{.GOOS}}/{{.GOARCH}}</div>
</div>
{{end}}
{{end}}
{{end}}