Чтобы template исполнялся его нужно распарсить, определить и именовать.
Недостаточно указать путь к файлу
{{ template "templates/header.html" . }} //<-вот здесь ошибка
А нужно примерно так
t, err := template.ParseFiles( "templates/content.html" , "templates/header.html", "templates/footer.html")
файлы
content.html:{{ template "header" . }}
text
{{ template "footer" . }}
header.html:{{define "header"}}
<!DOCTYPE html>
<html>
<head>
<title>text</title>
</head>
<body>
{{end}}
footer.html:{{define "footer"}}
</body>
</html>
{{end}}