Bläddra i källkod

Fix html title

Florian Hoss 2 år sedan
förälder
incheckning
7d25ebf59e
2 ändrade filer med 3 tillägg och 3 borttagningar
  1. 1 1
      files/files.go
  2. 2 2
      server/routes.go

+ 1 - 1
files/files.go

@@ -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)
 }

+ 2 - 2
server/routes.go

@@ -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,
 	})