Fix html title

This commit is contained in:
Florian Hoss 2022-10-20 17:38:08 +02:00
parent 8a6aba974d
commit 7d25ebf59e
2 changed files with 3 additions and 3 deletions

View file

@ -7,7 +7,7 @@ import (
const templatesFolder = "templates/"
func ParseHtml(w http.ResponseWriter, htmlFile string, info interface{}) {
func ParseAndServeHtml(w http.ResponseWriter, htmlFile string, info interface{}) {
parsedHtml, _ := template.ParseFiles(templatesFolder+htmlFile, templatesFolder+"_base.gohtml")
_ = parsedHtml.Execute(w, info)
}

View file

@ -15,8 +15,8 @@ type LaunchpadInformation struct {
func launchpad(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html")
files.ParseHtml(w, "index.gohtml", LaunchpadInformation{
Title: "Launchpad",
files.ParseAndServeHtml(w, "index.gohtml", LaunchpadInformation{
Title: "Godash",
Bookmarks: bookmark.Bookmarks,
Weather: weather.CurrentOpenWeather,
})