MCPcopy Create free account
hub / github.com/egonelbre/exp / ServeHTTP

Method ServeHTTP

norouter/main.go:43–54  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

41}
42
43func (server *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
44 switch prefix, r := Route(r); prefix {
45 case "":
46 server.ServeDashboard(w, r)
47 case "user":
48 server.Users.ServeHTTP(w, r)
49 case "group":
50 server.Groups.ServeHTTP(w, r)
51 default:
52 http.NotFound(w, r)
53 }
54}
55
56func (server *Server) ServeDashboard(w http.ResponseWriter, r *http.Request) {
57 ServeBody(w, `

Callers 1

ServeHTTPMethod · 0.45

Calls 2

ServeDashboardMethod · 0.95
RouteFunction · 0.85

Tested by

no test coverage detected