MCPcopy Create free account
hub / github.com/devfeel/dotweb / RegisterRoute

Method RegisterRoute

server.go:362–364  ·  view source on GitHub ↗

RegisterRoute a shortcut for router.RegisterRoute(routeMethod string, path string,handle HttpHandle)

(routeMethod string, path string, handle HttpHandle)

Source from the content-addressed store, hash-verified

360
361// RegisterRoute a shortcut for router.RegisterRoute(routeMethod string, path string,handle HttpHandle)
362func (server *HttpServer) RegisterRoute(routeMethod string, path string, handle HttpHandle) RouterNode {
363 return server.Router().RegisterRoute(routeMethod, path, handle)
364}
365
366// RegisterServerFile a shortcut for router.RegisterServerFile(routeMethod, path, fileRoot)
367// simple demo:server.RegisterServerFile(RouteMethod_GET, "/src/*", "/var/www", nil)

Callers

nothing calls this directly

Calls 2

RouterMethod · 0.95
RegisterRouteMethod · 0.65

Tested by

no test coverage detected