{"id":13493300,"url":"https://github.com/bmizerany/pat","last_synced_at":"2025-05-14T01:06:46.133Z","repository":{"id":2310183,"uuid":"3269762","full_name":"bmizerany/pat","owner":"bmizerany","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-28T12:19:41.000Z","size":1005,"stargazers_count":1437,"open_issues_count":5,"forks_count":117,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-04-04T17:49:51.670Z","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/bmizerany.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":"2012-01-25T23:37:07.000Z","updated_at":"2025-03-17T09:03:39.000Z","dependencies_parsed_at":"2022-08-02T23:46:15.728Z","dependency_job_id":null,"html_url":"https://github.com/bmizerany/pat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmizerany%2Fpat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmizerany%2Fpat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmizerany%2Fpat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmizerany%2Fpat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmizerany","download_url":"https://codeload.github.com/bmizerany/pat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248202064,"owners_count":21064256,"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-07-31T19:01:13.999Z","updated_at":"2025-04-10T10:47:55.615Z","avatar_url":"https://github.com/bmizerany.png","language":"Go","funding_links":[],"categories":["Go","Multiplexers","HarmonyOS","Web Frameworks","Web框架","XML"],"sub_categories":["Windows Manager","Routers","路由器","路由","Advanced Console UIs"],"readme":"# pat (formerly pat.go) - A Sinatra style pattern muxer for Go's net/http library\n\n[![GoDoc](https://godoc.org/github.com/bmizerany/pat?status.svg)](https://godoc.org/github.com/bmizerany/pat) \n\n## INSTALL\n\n\t$ go get github.com/bmizerany/pat\n\n## USE\n\n```go\npackage main\n\nimport (\n\t\"io\"\n\t\"net/http\"\n\t\"github.com/bmizerany/pat\"\n\t\"log\"\n)\n\n// hello world, the web server\nfunc HelloServer(w http.ResponseWriter, req *http.Request) {\n\tio.WriteString(w, \"hello, \"+req.URL.Query().Get(\":name\")+\"!\\n\")\n}\n\nfunc main() {\n\tm := pat.New()\n\tm.Get(\"/hello/:name\", http.HandlerFunc(HelloServer))\n\n\t// Register this pat with the default serve mux so that other packages\n\t// may also be exported. (i.e. /debug/pprof/*)\n\thttp.Handle(\"/\", m)\n\terr := http.ListenAndServe(\":12345\", nil)\n\tif err != nil {\n\t\tlog.Fatal(\"ListenAndServe: \", err)\n\t}\n}\n```\n\nIt's that simple.\n\nFor more information, see:\nhttp://godoc.org/github.com/bmizerany/pat\n\n## CONTRIBUTORS\n\n* Alexis Svinartchouk (@zvin)\n* Blake Mizerany (@bmizerany)\n* Brian Ketelsen (@bketelsen)\n* Bryan Matsuo (@bmatsuo)\n* Caleb Spare (@cespare)\n* Evan Shaw (@edsrzf)\n* Gary Burd (@garyburd)\n* George Rogers (@georgerogers42)\n* Keith Rarick (@kr)\n* Matt Williams (@mattyw)\n* Mike Stipicevic (@wickedchicken)\n* Nick Saika (@nesv)\n* Timothy Cyrus (@tcyrus)\n* binqin (@binku87)\n\n## LICENSE\n\nCopyright (C) 2012 by Keith Rarick, Blake Mizerany\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmizerany%2Fpat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmizerany%2Fpat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmizerany%2Fpat/lists"}