func GetBaseTemplate(name string) (*template.Template, error) {
	tmpl := template.New(name).Funcs(template.FuncMap{
		"getWarningWidth": getWarningWidth,
		"getSuccessWidth": getSuccessWidth,
		"getWeatherIcon":  getWeatherIcon,
		"getWeatherText":  getWeatherText,
		"getGrade":        getGrade,
		"getIcon":         getIcon,
		"getResultClass":  getResultClass,
		"getCategoryLink": getCategoryLink,
		"getCategoryInfo": getCategoryInfo,
	})
	templateFileNames := []string{
		DashboardTemplateName,
		HeadTemplateName,
		NavbarTemplateName,
		PreambleTemplateName,
		FooterTemplateName,
		MainTemplateName,
	}
	return parseTemplateFiles(tmpl, templateFileNames)
}
GetBaseTemplate puts together the dashboard template. Individual pieces can be overridden before rendering.
package dashboard
import (
	"bytes"
	"encoding/json"
	"html/template"
	"net/http"
	"net/url"
	"path"
	"strings"
	"github.com/fairwindsops/polaris/pkg/config"
	"github.com/fairwindsops/polaris/pkg/kube"
	"github.com/fairwindsops/polaris/pkg/validator"
	packr "github.com/gobuffalo/packr/v2"
	"github.com/gorilla/mux"
	"github.com/sirupsen/logrus"
)
const (
	MainTemplateName = "main.gohtml"
	HeadTemplateName = "head.gohtml"
	NavbarTemplateName = "navbar.gohtml"
	PreambleTemplateName = "preamble.gohtml"
	DashboardTemplateName = "dashboard.gohtml"
	FooterTemplateName = "footer.gohtml"
)
var (
	templateBox = (*packr.Box)(nil)
	assetBox    = (*packr.Box)(nil)
	markdownBox = (*packr.Box)(nil)
)
func GetAssetBox() *packr.Box {
	if assetBox == (*packr.Box)(nil) {
		assetBox = packr.New("Assets", "assets")
	}
	return assetBox
}
func GetTemplateBox() *packr.Box {
	if templateBox == (*packr.Box)(nil) {
		templateBox = packr.New("Templates", "templates")
	}
	return templateBox
}
type templateData struct {
	BasePath          string
	Config            config.Configuration
	AuditData         validator.AuditData
	FilteredAuditData validator.AuditData
	JSON              template.JS
}