thrift/thrift-gen/main.go
func parseTemplates(skipTChannel bool, templateFiles []string) ([]*Template, error) {
	var templates []*Template

	if !skipTChannel {
		templates = append(templates, &Template{
			name:     "tchan",
			template: template.Must(parseTemplate(tchannelTmpl)),
		})
	}

	for _, f := range templateFiles {
		t, err := parseTemplateFile(f)
		if err != nil {
			return nil, err
		}

		templates = append(templates, t)
	}

	return templates, nil
}
func parseTemplates(skipTChannel bool, templateFiles []string) ([]*Template, error) {
	var templates []*Template

	if !skipTChannel {
		templates = append(templates, &Template{
			name:     "tchan",
			template: template.Must(parseTemplate(tchannelTmpl)),
		})
	}

	for _, f := range templateFiles {
		t, err := parseTemplateFile(f)
		if err != nil {
			return nil, err
		}

		templates = append(templates, t)
	}

	return templates, nil
}
// parseTemplates returns a list of Templates that must be rendered given the template files.