gen/writers/metadata.go
func NewMetadataWriter() (*MetadataWriter, error) {
	funcMap := template.FuncMap{
		"comment":         comment,
		"join":            strings.Join,
		"commandLine":     commandLine,
		"toStringArray":   toStringArray,
		"flagType":        flagType,
		"location":        location,
		"escapeBackticks": escapeBackticks,
	}
	headerT, err := template.New("header-metadata").Funcs(funcMap).Parse(headerMetadataTmpl)
	if err != nil {
		return nil, err
	}
	resourceT, err := template.New("resource-metadata").Funcs(funcMap).Parse(resourceMetadataTmpl)
	if err != nil {
		return nil, err
	}
	return &MetadataWriter{
		headerTmpl:   headerT,
		resourceTmpl: resourceT,
	}, nil
}
func NewMetadataWriter() (*MetadataWriter, error) {
	funcMap := template.FuncMap{
		"comment":         comment,
		"join":            strings.Join,
		"commandLine":     commandLine,
		"toStringArray":   toStringArray,
		"flagType":        flagType,
		"location":        location,
		"escapeBackticks": escapeBackticks,
	}
	headerT, err := template.New("header-metadata").Funcs(funcMap).Parse(headerMetadataTmpl)
	if err != nil {
		return nil, err
	}
	resourceT, err := template.New("resource-metadata").Funcs(funcMap).Parse(resourceMetadataTmpl)
	if err != nil {
		return nil, err
	}
	return &MetadataWriter{
		headerTmpl:   headerT,
		resourceTmpl: resourceT,
	}, nil
}
// NewMetadataWriter creates a new writer that generates metadata data structures.