~abyxcos/smallblog

9fc1e20902eee8361d7b508a9acde8a30f2e99b4 — abyxcos 3 years ago d33ed14
renderTemplate doesn't actually need to take an interface{} even though it's passing to one. Let's tighten up our side more.
1 files changed, 1 insertions(+), 1 deletions(-)

M smallblog.go
M smallblog.go => smallblog.go +1 -1
@@ 184,7 184,7 @@ func parsePost(path string) (Post, error) {

// Render the template and save it in the appropriate location.
// Create all directories needed to do so.
func renderTemplate(fileName string, tmplFile string, data interface{}) {
func renderTemplate(fileName string, tmplFile string, data Content) {
	dst := *outputDir + fileName
	// Equivalent to mkdir -p
	os.MkdirAll(filepath.Dir(dst), os.ModePerm)