| <!-- |
| 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 "declaration" -}} |
| {{- $out := render_decl .Doc .Decl -}} |
| {{if $out.Decl}} |
| <div class="Documentation-declaration"> |
| <pre>{{- $out.Decl -}}</pre> |
| </div> |
| {{end}} |
| {{- $out.Doc -}} |
| {{"\n"}} |
| {{- end -}} |
| |
| {{- define "declaration-view-source" -}} |
| {{- $out := render_decl .Doc .Decl -}} |
| {{if $out.Decl}} |
| <div class="Documentation-declaration"> |
| <span class="Documentation-declarationLink">{{source_link "View Source" .Decl}}</span> |
| <pre>{{- $out.Decl -}}</pre> |
| </div> |
| {{end}} |
| {{- $out.Doc -}} |
| {{"\n"}} |
| {{- end -}} |