Skip to main content
cloudzilla
·
Edit file
Editing internal/router/router.go
Committing to
main
File path
Change the path to rename or move the file.
Contents
package router import ( "net/http" "github.com/go-chi/chi/v5" "github.com/mkappworks-dev/cloudzilla-app/internal/handler" ) // New returns a chi router with all Cloudzilla routes registered. func New(h *handler.Handlers) http.Handler { r := chi.NewRouter() r.Get("/", h.Home) r.Get("/explore", h.Explore) r.Route("/{owner}/{repo}", func(r chi.Router) { r.Get("/", h.PageRepo) r.Get("/tree/*", h.PageTree) r.Get("/blob/*", h.PageBlob) r.Get("/blame/*", h.PageBlame) r.Get("/commits/*", h.PageCommits) r.Get("/pulse", h.PagePulse) }) return r }
Commit message
Cancel
Commit changes