{{- define "type_struct" -}} 
// The {{.typeName}} type defines all the configurable options from cli.
{{.Prefix}}type {{.typeName}} struct { {{- range .Options}}
{{- if eq .Name "Args" }}
{{$.Prefix}}
{{$.Prefix}}	{{.Args}}
{{- else }}{{$f := stringsSplit .Flag ","}}{{ $flen := len $f }}
{{$.Prefix}}	{{.Name}}	{{.Type}}	`
{{- if gt $flen 1}}short:"{{index $f 0}}" long:"{{index $f 1}}"
{{- else}}
 {{- if le ((index $f 0) | len) 1 }}short:"{{index $f 0}}"
 {{- else}}long:"{{index $f 0}}"{{end}}
{{- end}}
{{- if .EnvV}} env:"{{printf "%s_%s" (clk2ss $.ProgramName) (clk2ss .Name)}}"{{end}} description:"{{.Usage}}"
{{- if .Value}} default:"{{.Value}}"{{end}}
{{- if .Choices}}{{range .Choices}} choice:"{{.}}"{{end}}{{end}}
{{- if .Required}} required:"true"{{end}}`{{end}}
{{- end}}
{{- if .Verbose}}
{{$.Prefix}}	Verbflg func()  `short:"v" long:"verbose" description:"Verbose mode (Multiple -v options increase the verbosity)"`
{{$.Prefix}}	Verbose int
{{- end}}
{{- if .Version}}
{{$.Prefix}}	Version func()  `short:"V" long:"version" description:"Show program version and exit"`
{{- end}}
{{$.Prefix -}} }
{{- end}}
