Пример #1
0
func loadRivetSingle(method, path string, handler interface{}) http.Handler {
	router := rivet.NewRouter(nil)

	router.Handle(method, path, handler)

	return router
}
Пример #2
0
func loadRivet(routes []route) http.Handler {
	router := rivet.NewRouter(nil)
	for _, route := range routes {
		router.Handle(route.method, route.path, rivetHandler)
	}
	return router
}