package test type WeekDay int const ( Monday WeekDay = iota Tuesday Wednesday Thursday Friday Saturday Sunday )
package {{.PackageName}} func (r {{.TypeName}}) String() string { s, ok := map[{{.TypeName}}]string { {{range .Values}}{{.}}:"{{.}}",{{end}} } if !ok { return "unknown {{.TypeName}}" } return s }