// ParseAndExecute template, returns input string in case of errors. Expensive operation.
ParseAndExecute template, returns input string in case of errors. Expensive operation.
// ParseAndExecute template returns input string in case of errors . Expensive operation .
func ParseAndExecute(logger *zap.Logger, input string, data interface{}) string {
	tpl, err := Parse(input)
	if err != nil {
		logger.Error("error parsing template", zap.Error(err))
		return input
	}
	var output strings.Builder
	if err = tpl.Execute(&output, data); err != nil {
		logger.Error("error executing template", zap.Error(err))
		return input
	}
	return output.String()
}
func ParseAndExecute ( logger * zap . Logger , input string , data interface { } ) string { tpl , err := Parse ( input ) if err != nil { logger . Error ( " " , zap . Error ( err ) ) return input } var output strings . Builder if err = tpl . Execute ( & output , data ) ; err != nil { logger . Error ( " " , zap . Error ( err ) ) return input } return output . String ( ) }
ParseAndExecute template, returns input string in case of errors.
ParseAndExecute template returns input string in case of errors .