20 lines
332 B
Go
20 lines
332 B
Go
package frontend
|
|
|
|
import (
|
|
"html/template"
|
|
"net/http"
|
|
)
|
|
|
|
func Home(w http.ResponseWriter, r *http.Request) {
|
|
w.Header().Set("Content-Type", "text/html")
|
|
var tmpl = template.Must(template.ParseFiles("frontend/htmx/home.html"))
|
|
err := tmpl.Execute(w, struct {
|
|
Name string
|
|
}{
|
|
Name: "Miau",
|
|
})
|
|
if err != nil {
|
|
return
|
|
}
|
|
}
|