blob: a4a6f90ae2a6cae873ee6c88f43fbf191819a211 (
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 html/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))
}
|