From 856f66808b913baff13c815daec3cdde7121e3bd Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Sun, 11 Dec 2022 11:22:47 +0530 Subject: all: init --- routes/handler.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 routes/handler.go (limited to 'routes/handler.go') diff --git a/routes/handler.go b/routes/handler.go new file mode 100644 index 0000000..13e4ae4 --- /dev/null +++ b/routes/handler.go @@ -0,0 +1,14 @@ +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 +} -- cgit