legit/routes/handler.go
Anirudh Oppiliappan 856f66808b
all: init
2022-12-11 11:22:47 +05:30

14 lines
268 B
Go

package routes
import (
"github.com/alexedwards/flow"
"icyphox.sh/legit/config"
)
func Handlers(c *config.Config) *flow.Mux {
mux := flow.New()
d := deps{c}
mux.HandleFunc("/:name", d.Repo, "GET")
mux.HandleFunc("/:name/tree/...", d.Repo, "GET")
return mux
}