{"id":18320668,"url":"https://github.com/xtlsoft/router","last_synced_at":"2026-03-03T20:07:45.564Z","repository":{"id":57486038,"uuid":"135817700","full_name":"xtlsoft/router","owner":"xtlsoft","description":"Maybe the best router library in Golang.","archived":false,"fork":false,"pushed_at":"2018-07-19T04:00:50.000Z","size":27,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-31T06:23:19.627Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/xtlsoft.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":"2018-06-02T12:56:40.000Z","updated_at":"2021-10-14T14:42:17.000Z","dependencies_parsed_at":"2022-09-02T00:10:29.589Z","dependency_job_id":null,"html_url":"https://github.com/xtlsoft/router","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xtlsoft/router","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtlsoft%2Frouter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtlsoft%2Frouter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtlsoft%2Frouter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtlsoft%2Frouter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xtlsoft","download_url":"https://codeload.github.com/xtlsoft/router/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtlsoft%2Frouter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30057865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-05T18:17:04.303Z","updated_at":"2026-03-03T20:07:45.547Z","avatar_url":"https://github.com/xtlsoft.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go-Router\n\n[![GoDoc](https://godoc.org/github.com/xtlsoft/router?status.svg)](https://godoc.org/github.com/xtlsoft/router)\n\nMaybe the best router library in Golang.\n\nDesigned for all usages. Almost the same as XPHP's router.\n\n## Installation\n\n```bash\ngo get -u gopkg.in/xtlsoft/router.v1\n```\n\n## Quickstart\n\nA Simple Example: (In `/examples/01/01.go`)\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    router \"../..\"\n)\n\nfunc main() {\n\n    r := router.New()\n\n    router.AddShortcut(\"@test\", \"i[0-9]+\");\n\n    r.Group(\"/\", func (g *router.Group){\n        g.On(\"GET\", \"test/{test}/{@test:another}\", func (req router.Request) router.Response {\n            return \u0026router.DefaultResponse{\n                StatusCode: 200,\n                Body: \"Hello World!\" + req.(*router.DefaultRequest).RouterVariable[\"test\"],\n            }\n        })\n        g.Any(func (router.Request) router.Response{\n            return \u0026router.DefaultResponse{\n                Body: \"404 Not Found\",\n            }\n        })\n    })\n\n    fmt.Println( r.Handle(\"GET\", \"/test/abc/i234\", \u0026router.DefaultRequest{}) )\n\n}\n```\n\n## Documention\n\nThe router is very easy to use.\nThe document is avaliable in `Document.md`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtlsoft%2Frouter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxtlsoft%2Frouter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtlsoft%2Frouter/lists"}