diff options
author | Anirudh Oppiliappan <x@icyphox.sh> | 2022-12-11 11:22:47 +0530 |
---|---|---|
committer | Anirudh Oppiliappan <x@icyphox.sh> | 2022-12-11 11:22:47 +0530 |
commit | 856f66808b913baff13c815daec3cdde7121e3bd (patch) | |
tree | 60feca35e702d20a0ec8da208b6b59926470bf31 /routes/handler.go | |
download | legit-856f66808b913baff13c815daec3cdde7121e3bd.tar.gz legit-856f66808b913baff13c815daec3cdde7121e3bd.tar.bz2 legit-856f66808b913baff13c815daec3cdde7121e3bd.zip |
all: init
Diffstat (limited to 'routes/handler.go')
-rw-r--r-- | routes/handler.go | 14 |
1 files changed, 14 insertions, 0 deletions
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 +} |