func executeTemplate(resourceDir, templateName string, data interface{}) string {
	t := template.New("template.html")
	_, err := t.ParseFiles(filepath.Join(resourceDir, "template.html"))
	if err != nil {
		return fmt.Sprintf("Failed to load template: %v", err)
	}
	var buf bytes.Buffer
	if err := t.ExecuteTemplate(&buf, templateName, data); err != nil {
		logrus.WithError(err).Error("Error executing template.")
	}
	return buf.String()
}
func executeTemplate(resourceDir, templateName string, data interface{}) string {
	t := template.New("template.html")
	_, err := t.ParseFiles(filepath.Join(resourceDir, "template.html"))
	if err != nil {
		return fmt.Sprintf("Failed to load template: %v", err)
	}
	var buf bytes.Buffer
	if err := t.ExecuteTemplate(&buf, templateName, data); err != nil {
		logrus.WithError(err).Error("Error executing template.")
	}
	return buf.String()
}
func executeTemplate ( resourceDir , templateName string , data interface { } ) string { t := template . New ( " " ) _ , err := t . ParseFiles ( filepath . Join ( resourceDir , " " ) ) if err != nil { return fmt . Sprintf ( " " , err ) } var buf bytes . Buffer if err := t . ExecuteTemplate ( & buf , templateName , data ) ; err != nil { logrus . WithError ( err ) . Error ( " " ) } return buf . String ( ) }
// LogViewTemplate executes the log viewer template ready for rendering
LogViewTemplate executes the log viewer template ready for rendering