File: field

package info (click to toggle)
golang-github-digitalocean-go-qemu 0.0~git20200529.1b453d0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,264 kB
  • sloc: sh: 34; makefile: 7
file content (11 lines) | stat: -rw-r--r-- 321 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
{{- if .List -}}
  {{ .Name.FieldName }} []{{ .Type.Go }}
{{- else if and .Optional (not (.Type.InterfaceType API)) -}}
  {{ .Name.FieldName }} *{{ .Type.Go }}
{{- else -}}
  {{ .Name.FieldName }} {{ .Type.Go }}
{{- end -}}

{{- if .Optional }} `json:"{{ .Name }},omitempty"`
{{- else }} `json:"{{ .Name }}"`
{{- end -}}