func BindHandlers(db *sql.DB, mux *mux.Router) { mux.HandleFunc("/", WrapHandler(db, UiHome)) mux.HandleFunc("/auth", WrapHandler(db, UiAuth)) mux.HandleFunc("/completeAuth", WrapHandler(db, UiCompleteAuth)) mux.HandleFunc("/water/{user}", WrapHandler(db, UiWater)) mux.HandleFunc("/water/{user}/{size}", WrapHandler(db, UiAddWater)) }
func routerHandlerFunc(router *mux.Router) http.HandlerFunc { return func(res http.ResponseWriter, req *http.Request) { router.ServeHTTP(res, req) } }