lightweight, idiomatic and composable router for building Go HTTP services
31 matches across 1 category. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | context_test.go | 1 | package chi |
| LOW | chi.go | 1 | // Package chi is a small, idiomatic and composable router for building HTTP services. |
| LOW | chi.go | 21 | // r.Get("/", func(w http.ResponseWriter, r *http.Request) { |
| LOW | chi.go | 41 | // matched. An anonymous regexp pattern is allowed, using an empty string |
| LOW | context.go | 101 | for k := len(x.URLParams.Keys) - 1; k >= 0; k-- { |
| LOW | mux_test.go | 1121 | // rr2 = r.(*Mux) |
| LOW | mux_test.go | 1321 | // return &ACLMux{Mux: NewRouter(), XX: "hihi"} |
| LOW | middleware/client_ip.go | 21 | // Only safe with headers your proxy unconditionally OVERWRITES on every |
| LOW | middleware/client_ip.go | 61 | // An unparseable entry mid-chain aborts the walk and leaves no client IP |
| LOW | middleware/client_ip.go | 121 | // - You know exactly how many proxies you sit behind, AND |
| LOW | middleware/client_ip.go | 161 | } |
| LOW | middleware/client_ip.go | 201 | // the ClientIPFrom* middlewares. The returned Addr is the zero value if not |
| LOW | middleware/route_headers.go | 1 | package middleware |
| LOW | middleware/route_headers.go | 21 | // rSubdomain.Get("/", h2) |
| LOW | middleware/client_ip_test.go | 481 | got := run(t, ClientIPFromXFF("198.51.100.0/24"), func(r *http.Request) { |
| LOW | middleware/client_ip_test.go | 541 | } |
| LOW | middleware/logger.go | 21 | ) |
| LOW | middleware/timeout.go | 1 | package middleware |
| LOW | middleware/timeout.go | 21 | // |
| LOW | middleware/wrap_writer.go | 41 | } |
| LOW | middleware/client_ip_example_test.go | 21 | // |
| LOW | middleware/client_ip_example_test.go | 41 | r := chi.NewRouter() |
| LOW | middleware/compress.go | 21 | "application/javascript", |
| LOW | middleware/compress.go | 101 | |
| LOW | middleware/compress.go | 121 | // https://zoompf.com/blog/2012/02/lose-the-wait-http-compression |
| LOW | middleware/url_format.go | 21 | // Routers should not include a url parameter for the suffix when using this middleware. |
| LOW | middleware/request_id.go | 21 | const RequestIDKey ctxKeyRequestID = 0 |
| LOW | _examples/fileserver/main.go | 1 | // This example demonstrates how to serve static files from your filesystem. |
| LOW | _examples/rest/main.go | 1 | // This example demonstrates a HTTP REST web service with some fixture data. |
| LOW | _examples/rest/main.go | 21 | // |
| LOW | _examples/rest/main.go | 381 | list = append(list, NewArticleResponse(article)) |