summaryrefslogtreecommitdiff
path: root/pages/landing.go
blob: d2c2fc3e108de306d1030b6c37726a2274cb313f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package pages

import (
	_ "embed"
	"html/template"
	"net/http"
)

//go:embed landing.gohtml
var landContent string

func Land(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusOK)
	err := tmpl.ExecuteTemplate(w, "land", nil)
	if err != nil {
		http.Error(w, err.Error(), http.StatusInternalServerError)
	}
}

func init() {
	template.Must(tmpl.New("land").Parse(landContent))
}