// parses the given template config and returns the parsed template with error if there was any.
parses the given template config and returns the parsed template with error if there was any.
// parses the given template config and returns the parsed template with error if there was any .
func parseConfig(dsc string) (parser.TemplateConfig, error) {
	var config parser.TemplateConfig
	if dynamicVarsFile != "" {
		if err := parser.UnmarshalDynamicVars(dynamicVarsFile); err != nil {
			return config, err
		}
	}
	if err := parser.UnmarshalDefaultVars(dsc); err != nil {
		return config, err
	}
	parsedTemplateFileName, err := parser.ParseTemplate(dsc)
	if err != nil {
		return config, err
	}
	config, err = parser.UnmarshalYaml(parsedTemplateFileName)
	if err != nil {
		return config, err
	}
	clogger.Debugf("Parsed config can be found at: %s", parsedTemplateFileName)
	return config, nil
}
func parseConfig ( dsc string ) ( parser . TemplateConfig , error ) { var config parser . TemplateConfig if dynamicVarsFile != " " { if err := parser . UnmarshalDynamicVars ( dynamicVarsFile ) ; err != nil { return config , err } } if err := parser . UnmarshalDefaultVars ( dsc ) ; err != nil { return config , err } parsedTemplateFileName , err := parser . ParseTemplate ( dsc ) if err != nil { return config , err } config , err = parser . UnmarshalYaml ( parsedTemplateFileName ) if err != nil { return config , err } clogger . Debugf ( " " , parsedTemplateFileName ) return config , nil }
parses the given template config and returns the parsed template with error if there was any.
parses the given template config and returns the parsed template with error if there was any .