package api import ( "net/http" "html/template" "arimelody.me/arimelody.me/api/v1/admin" ) func Handle(writer http.ResponseWriter, req *http.Request, root *template.Template) int { code := 404; if req.URL.Path == "/api/v1/admin/login" { code = admin.HandleLogin(writer, req, root) } if code == 404 { writer.Write([]byte("404 not found")) } return code; }