Florian Hoss преди 2 години
родител
ревизия
7d25ebf59e
променени са 2 файла, в които са добавени 3 реда и са изтрити 3 реда
  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/"
 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, _ := template.ParseFiles(templatesFolder+htmlFile, templatesFolder+"_base.gohtml")
 	_ = parsedHtml.Execute(w, info)
 	_ = parsedHtml.Execute(w, info)
 }
 }

+ 2 - 2
server/routes.go

@@ -15,8 +15,8 @@ type LaunchpadInformation struct {
 
 
 func launchpad(w http.ResponseWriter, r *http.Request) {
 func launchpad(w http.ResponseWriter, r *http.Request) {
 	w.Header().Set("Content-Type", "text/html")
 	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,
 		Bookmarks: bookmark.Bookmarks,
 		Weather:   weather.CurrentOpenWeather,
 		Weather:   weather.CurrentOpenWeather,
 	})
 	})