Better way to Parse multiple files ParseFiles

here is how I cache my templates:

var templates = template.Must(template.ParseFiles(“tmpl/base.html”, “tmpl/index.html”, “tmpl/signup.html”))

And I assume that this is a horrible way, I only have three -empty- files for now and it started to look horrible. Is there any way to make get all html file with one command like tmpl/* or something like that?

maybe use something like template.ParseGlob("tmpl/*.html")

1 Like