picgo/handler/index.go

20 lines
330 B
Go

package handler
import (
"net/http"
"picgo/corelib"
)
func IndexHandler(w http.ResponseWriter, r *http.Request) {
if r.Method == "GET" {
data := struct {
Title string
Active string
}{
Title: "Dashboard",
Active: r.URL.Path,
}
corelib.TemplateHandler(w, data, "view/layout.html", "view/index.html")
}
}