{{/* For package with a group name, list all type definitions in it. */}}
{{ range .VisibleTypes }}
{{- if or .Referenced .IsExported -}}
{{ template "type" . }}
{{- end -}}
{{ end }}
{{ else }}
{{/* For package without a group name, list only type definitions that are referenced. */}}
{{ range .VisibleTypes }}
{{ if .Referenced }}
{{ template "type" . }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}