{"id":21690937,"url":"https://github.com/reiver/go-pathmux","last_synced_at":"2025-08-12T09:09:46.897Z","repository":{"id":148331261,"uuid":"193004981","full_name":"reiver/go-pathmux","owner":"reiver","description":"Package pathmux provides a path oriented (\"middleware\") HTTP handler, which can hand-off to other HTTP handler for each path, for the Go programming language's built-in \"net/http\" library.","archived":false,"fork":false,"pushed_at":"2025-01-13T18:43:25.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T13:29:20.357Z","etag":null,"topics":["http","http-middleware"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/reiver/go-pathmux","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reiver.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-06-21T00:42:27.000Z","updated_at":"2025-01-13T18:43:28.000Z","dependencies_parsed_at":"2025-06-08T04:16:05.911Z","dependency_job_id":null,"html_url":"https://github.com/reiver/go-pathmux","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reiver/go-pathmux","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiver%2Fgo-pathmux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiver%2Fgo-pathmux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiver%2Fgo-pathmux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiver%2Fgo-pathmux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reiver","download_url":"https://codeload.github.com/reiver/go-pathmux/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiver%2Fgo-pathmux/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270033228,"owners_count":24515453,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["http","http-middleware"],"created_at":"2024-11-25T17:35:13.857Z","updated_at":"2025-08-12T09:09:46.872Z","avatar_url":"https://github.com/reiver.png","language":"Go","readme":"# go-pathmux\n\nPackage **pathmux** provides a path oriented route (\"middleware\") HTTP handler, which can hand-off to other HTTP handler for each path,\nfor the Go programming language's built-in `\"net/http\"` library.\n\nPackage pathmux is a HTTP request router, and dispatcher.\n\nThe name mux stands for \"HTTP request multiplexer\".\n\nSimilar to the built-in standard http.ServeMux in the \"net/http\" package,\npathmux.Mux matches incoming requests against a list of registered routes\nand calls a handler for the route that matches the URL or other conditions.\n\n\n## Documention\n\nOnline documentation, which includes examples, can be found at: http://godoc.org/github.com/reiver/go-pathmux\n\n[![GoDoc](https://godoc.org/github.com/reiver/go-pathmux?status.svg)](https://godoc.org/github.com/reiver/go-pathmux)\n\n## Example\n```go\nimport \"github.com/reiver/go-pathmux\"\n\n// ...\n\nvar mux pathmux.Mux\n\nerr := mux.HandlePath(homeHandler, \"/\")\nerr := mux.HandlePath(productsHandler, \"/products\")\nerr := mux.HandlePath(articlesHandler, \"/articles\")\n\nerr := mux.HandlePattern(productPatternHandler, \"/products/{key}\")\nerr := mux.HandlePattern(articleCategoryPatternHandler, \"/articles/{category}/\")\nerr := mux.HandlePattern(articlePatternHandler, \"/articles/{category}/{article_id}\")\n\n// handles: \"/app\", \"/app/\", \"/app/apple\", \"/app/banana\", \"/app/banana/\", \"/app/banana/peel.jpeg\",  \"/app/cherry\", etc.\nerr := mux.HandleDirectory(homeHandler, \"/app\")\n\n// ...\n\nerr := http.ListenAndServe(\":8080\", mux)\n```\n\n## Import\n\nTo import package **pathmux** use `import` code like the follownig:\n\n```\nimport \"github.com/reiver/go-pathmux\"\n```\n\n## Installation\n\nTo install package **pathmux** do the following:\n```\nGOPROXY=direct go get github.com/reiver/go-pathmux\n```\n\n## Author\n\nPackage **pathmux** was written by [Charles Iliya Krempeaux](http://reiver.link)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freiver%2Fgo-pathmux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freiver%2Fgo-pathmux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freiver%2Fgo-pathmux/lists"}