INNER CODE UNIT · Go
templates
shurcooL/githubv4 · gen.go:83
var templates = map[string]*template.Template{
"enum.go": t(`// Code generated by gen.go; DO NOT EDIT.
package githubv4
{{range .data.__schema.types | sortByName}}{{if and (eq .kind "ENUM") (not (internal .name)) (not (skip .name))}}
{{template "enum" .}}
{{end}}{{end}}
{{- define "enum" -}}
// {{.name}} {{.description | clean | endSentence}}
type {{.name}} string
// {{.description | clean | fullSentence}}
const ({{range .enumValues}}
{{enumIdentifier $.name .name}} {{$.name}} = {{.name | quote}} // {{.description | clean | fullSentence}}{{end}}
)
{{- end -}}