togo/struct.tmpl
jolheiser e8a896fbac
Initial commit
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2021-04-08 23:58:22 -05:00

10 lines
333 B
Cheetah

{{range .Structs}}
type {{.Name}} struct {
{{range .Fields}} {{ .Name}} {{.Type}} {{if $.Options.Tags}}`
{{- if $.Options.JSON}}json:"{{.Tag}}" {{end}}
{{- if $.Options.YAML}}yaml:"{{.Tag}}" {{end}}
{{- if $.Options.TOML}}toml:"{{.Tag}}" {{end}}`
{{- if .Comment}} // {{.Comment}}{{end}}
{{- end}}
{{end}}}
{{end}}