16 lines
296 B
Go
16 lines
296 B
Go
package handlers
|
|
|
|
import (
|
|
"html/template"
|
|
"net/http"
|
|
)
|
|
|
|
func HandlePing(w http.ResponseWriter, r *http.Request) {
|
|
w.Write([]byte("pong"))
|
|
}
|
|
|
|
func HandleHome(w http.ResponseWriter, r *http.Request) {
|
|
tmpl := template.Must(template.ParseFiles("components/index.html"))
|
|
tmpl.Execute(w, nil)
|
|
}
|