Fix html title
This commit is contained in:
parent
8a6aba974d
commit
7d25ebf59e
2 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue