Skip to content

mihai-craita/mooxy

Repository files navigation

🐮 mooxy

Router for url paths, it uses a linked tree for path traversal to move fast trough large number of routes.

Instalation

go get github.com/mihai-craita/mooxy

Example

import "github.com/mihai-craita/mooxy"

func main() {
    router := mooxy.NewRouter()
    
    router.Handle(mooxy.NewRoute("/foo/bar"), handler)

    router.Handle(mooxy.NewRoute("/login").Methods("GET", "POST"), handler)
    
    imgRoute := mooxy.NewRoute("/img/{*}").Methods("GET")
    router.Handle(imgRoute, fileserver.GetFileServerHandler())
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages