MCPcopy Index your code
hub / github.com/gorilla/handlers

github.com/gorilla/handlers @v1.5.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.5.2 ↗ · + Follow
142 symbols 484 edges 15 files 45 documented · 32% 104 cross-repo links updated 2y agov1.5.2 · 2023-11-05★ 1,74115 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

gorilla/handlers

Testing Codecov GoDoc Sourcegraph

Package handlers is a collection of handlers (aka "HTTP middleware") for use with Go's net/http package (or any framework supporting http.Handler), including:

Other handlers are documented on the Gorilla website.

Example

A simple example using handlers.LoggingHandler and handlers.CompressHandler:

import (
    "net/http"
    "github.com/gorilla/handlers"
)

func main() {
    r := http.NewServeMux()

    // Only log requests to our admin dashboard to stdout
    r.Handle("/admin", handlers.LoggingHandler(os.Stdout, http.HandlerFunc(ShowAdminDashboard)))
    r.HandleFunc("/", ShowIndex)

    // Wrap our server with our gzip handler to gzip compress all responses.
    http.ListenAndServe(":8000", handlers.CompressHandler(r))
}

License

BSD licensed. See the included LICENSE file for details.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 98
Method 27
Struct 10
FuncType 4
Interface 2
TypeAlias 1

Languages

Go100%

Modules by API surface

cors_test.go21 symbols
logging_test.go20 symbols
compress_test.go19 symbols
cors.go17 symbols
logging.go12 symbols
handlers.go11 symbols
recovery.go10 symbols
compress.go9 symbols
canonical_test.go6 symbols
proxy_headers_test.go4 symbols
handlers_test.go4 symbols
canonical.go4 symbols

For agents

$ claude mcp add handlers \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page