{"id":24196746,"url":"https://github.com/pchchv/gor","last_synced_at":"2025-07-09T16:41:13.347Z","repository":{"id":65662077,"uuid":"595954465","full_name":"pchchv/gor","owner":"pchchv","description":"Lightweight router for creating Go HTTP services","archived":false,"fork":false,"pushed_at":"2023-02-15T09:58:54.000Z","size":111,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T08:23:54.621Z","etag":null,"topics":["api","go","golang","http","microservices","middleware","rest-api","router"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pchchv.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}},"created_at":"2023-02-01T06:34:38.000Z","updated_at":"2023-02-12T09:08:56.000Z","dependencies_parsed_at":"2024-01-30T11:50:39.440Z","dependency_job_id":null,"html_url":"https://github.com/pchchv/gor","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pchchv/gor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchchv%2Fgor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchchv%2Fgor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchchv%2Fgor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchchv%2Fgor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pchchv","download_url":"https://codeload.github.com/pchchv/gor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchchv%2Fgor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264496155,"owners_count":23617698,"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":["api","go","golang","http","microservices","middleware","rest-api","router"],"created_at":"2025-01-13T19:37:50.210Z","updated_at":"2025-07-09T16:41:13.245Z","avatar_url":"https://github.com/pchchv.png","language":"Go","readme":"[![Go Reference](https://pkg.go.dev/badge/github.com/pchchv/gor.svg)](https://pkg.go.dev/github.com/pchchv/gor)\n\n\u003cdiv align=\"center\"\u003e\n\n# **_gor_**  \n\n\u003c/div\u003e\n\n**`gor`** is a lightweight router for creating *Go HTTP services*. It helps build large *REST API services* that can be maintained as the project grows.  \n**`gor`** is built on the [*context*](https://pkg.go.dev/context) package.  \n*See [examples](https://github.com/pchchv/gor/blob/main/examples/)*\n\n## Install\n\n```sh\ngo get -u github.com/pchchv/gor\n```\n\n\n## Features\n\n* ### **Fast**\n* ### **Reliability**\n* ### **Lightweight**\n* ### **Context control**\n* ### **Go.mod support**\n* ### **100% compatible with net/http**\n* ### **Designed for modular/composable APIs**\n\n\n## Middlewares\n\ngor comes with an optional `middleware` package that provides a set of standard `net/http` middleware.   \nAny middleware in the ecosystem that is also compatible with `net/http` can be used with gor's mux.\n\n### Core middlewares\n\n------------------------------------------------------------------------------------------------------\n| gor/middleware Handler | description                                                               |\n| :--------------------- | :----------------------------------------------------------------------   |\n| [AllowContentEncoding](https://pkg.go.dev/github.com/pchchv/gor/middleware#AllowContentEncoding) | Provides a white list of Content-Encoding headers of the request          |\n| [AllowContentType](https://pkg.go.dev/github.com/pchchv/gor/middleware#AllowContentType)     | Explicit white list of accepted Content-Types requests                    |\n| [BasicAuth](https://pkg.go.dev/github.com/pchchv/gor/middleware#BasicAuth)          | Basic HTTP authentication                                                 |\n| [Compress](https://pkg.go.dev/github.com/pchchv/gor/middleware#Compress)          | Gzip compression for clients accepting compressed responses               |\n| [ContentCharset](https://pkg.go.dev/github.com/pchchv/gor/middleware#ContentCharset)       | Providing encoding for Content-Type request headers                       |\n| [CleanPath](https://pkg.go.dev/github.com/pchchv/gor/middleware#CleanPath)            | Clean the double slashes from request path                                |\n| [GetHead](https://pkg.go.dev/github.com/pchchv/gor/middleware#GetHead)              | Automatically route undefined HEAD requests to GET handlers               |\n| [Heartbeat](https://pkg.go.dev/github.com/pchchv/gor/middleware#Heartbeat)            | Monitoring endpoint to check the pulse of the servers                     |\n| [Logger](https://pkg.go.dev/github.com/pchchv/gor/middleware#Logger)               | Logs the start and end of each request with the elapsed processing time   |\n| [NoCache](https://pkg.go.dev/github.com/pchchv/gor/middleware#NoCache)              | Sets response headers to prevent caching by clients                       |\n| [Profiler](https://pkg.go.dev/github.com/pchchv/gor/middleware#Profiler)             | Simple net/http/pprof connection to routers                               |\n| [RealIP](https://pkg.go.dev/github.com/pchchv/gor/middleware#RealIP)              | Sets RemoteAddr http.Request to X-Real-IP or X-Forwarded-For              |\n| [Recoverer](https://pkg.go.dev/github.com/pchchv/gor/middleware#Recoverer)            | Gracefully absorbs panic and prints a stack trace                         |\n| [RequestID](https://pkg.go.dev/github.com/pchchv/gor/middleware#RequestID)            | Injects a request ID in the context of each request                       |\n| [RedirectSlashes](https://pkg.go.dev/github.com/pchchv/gor/middleware#RedirectSlashes)      | Redirect slashes in routing paths                                         |\n| [RouteHeaders](https://pkg.go.dev/github.com/pchchv/gor/middleware#RouteHeaders)         | Handling routes for request headers                                       |\n| [SetHeader](https://pkg.go.dev/github.com/pchchv/gor/middleware#SetHeader)            | Middleware to set the key/response header value                           |\n| [StripSlashes](https://pkg.go.dev/github.com/pchchv/gor/middleware#StripSlashes)         | Strip slashes in routing paths                                            |\n| [Throttle](https://pkg.go.dev/github.com/pchchv/gor/middleware#Throttle)            | Puts a ceiling on the number of concurrent requests                       |\n| [Timeout](https://pkg.go.dev/github.com/pchchv/gor/middleware#Timeout)              | Signals to the request context that the timeout deadline has been reached |\n| [URLFormat](https://pkg.go.dev/github.com/pchchv/gor/middleware#URLFormat)            | Parse the extension from the url and put it in the request context        |\n| [WithValue](https://pkg.go.dev/github.com/pchchv/gor/middleware#WithValue)           | Middleware to set the key/value in the context of a request               |\n------------------------------------------------------------------------------------------------------\n\n## context\n\n[```context```](https://golang.org/pkg/context) is a tiny package available in stdlib since go1.7, providing a simple interface for context signaling via call stacks and goroutines.   \nLearn more at [The Go Blog](https://blog.golang.org/context)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpchchv%2Fgor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpchchv%2Fgor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpchchv%2Fgor/lists"}