Skip to content

Commit

Permalink
Include docstrings on interface getters
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Rose committed Aug 9, 2022
1 parent f5d6032 commit 2742c61
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugin/modelgen/models.gotpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
{{- end }}
Is{{.Name|go }}()
{{- range $field := .Fields }}
{{- with .Description }}
{{.|prefixLines "// "}}
{{- end}}
Get{{ $field.GoName }}() {{ $field.Type | ref }}
{{- end }}
}
Expand All @@ -40,6 +43,9 @@
func ({{ $model.Name|go }}) Is{{ .|go }}() {}
{{- with getInterfaceByName . }}
{{- range .Fields }}
{{- with .Description }}
{{.|prefixLines "// "}}
{{- end}}
{{ generateGetter $model . }}
{{- end }}
{{- end }}
Expand Down

0 comments on commit 2742c61

Please sign in to comment.