{"id":20557013,"url":"https://github.com/sharpvik/mux","last_synced_at":"2026-04-17T18:31:12.510Z","repository":{"id":57539316,"uuid":"262894935","full_name":"sharpvik/mux","owner":"sharpvik","description":"Package sharpvik/mux seeks to provide customizable and convenient internal routing for Go's http.Server.","archived":false,"fork":false,"pushed_at":"2021-03-12T02:14:56.000Z","size":175,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-16T18:29:42.576Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sharpvik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-10T23:35:11.000Z","updated_at":"2021-03-12T02:12:46.000Z","dependencies_parsed_at":"2022-09-26T18:31:43.099Z","dependency_job_id":null,"html_url":"https://github.com/sharpvik/mux","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpvik%2Fmux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpvik%2Fmux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpvik%2Fmux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpvik%2Fmux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharpvik","download_url":"https://codeload.github.com/sharpvik/mux/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242163857,"owners_count":20082224,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T03:34:18.797Z","updated_at":"2025-12-03T18:02:25.877Z","avatar_url":"https://github.com/sharpvik.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Package sharpvik/mux\n\nThis package seeks to provide customizable and convenient internal routing for\nGo's `http.Server`.\n\nWhen building a server-side app or a REST API, you may wish to implement\ncomplex routing mechanisms that allow you to effectively process incoming\nrequests by checking its signature against different routes with preset filters.\n\nThere already exist a few packages that provide this functionality. However,\nthere is a catch: those packages are written as though the only things your\nhandler functions are going to be working with are `http.ResponseWriter` and\n`http.Request` sent by the user. In reality, you may wish to query a database\nand/or log some data through `log.Logger`. Of course, there are ways to allow\nfunction to acces those interfaces via a global variable or something like that,\nbut those are a pain to write tests for.\n\nIn this package, you can find the Router sturct that is written in a way that\nresolves those problems by supporting the router-embedded context.\n\n## Theory\n\nMux allows you to build flexible and fairly complex routing schemas by giving\nyou the `Router`. To create new `Router` you should use the `New` function.\n\n```go\nfunc New() *Router\n```\n\nHaving a single `Router` may be exactly what you want, but it is unlikely that\nyou decided to use this package for such basic use case. The _cool_ things come\nwhen you make _more_ `Router`s! Or, to be more precise, more `Subrouter`s.\n\n```go\nfunc (rtr *Router) Subrouter() *Router\n```\n\n## License\n\nUse of this source code is governed by the _Mozilla Public License Version 2.0_\nthat can be found in the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpvik%2Fmux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharpvik%2Fmux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpvik%2Fmux/lists"}