spiegel_podman/test/tools/vendor/github.com/gorilla/handlers
renovate[bot] 087a44a8e7
Update module github.com/go-swagger/go-swagger to v0.32.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-09 11:31:23 +00:00
..
.editorconfig Update module github.com/go-swagger/go-swagger to v0.32.3 2025-06-09 11:31:23 +00:00
.gitignore Update module github.com/go-swagger/go-swagger to v0.32.3 2025-06-09 11:31:23 +00:00
canonical.go Update module github.com/go-swagger/go-swagger to v0.32.3 2025-06-09 11:31:23 +00:00
compress.go Update module github.com/go-swagger/go-swagger to v0.32.3 2025-06-09 11:31:23 +00:00
cors.go Update module github.com/go-swagger/go-swagger to v0.32.3 2025-06-09 11:31:23 +00:00
doc.go install swagger from source 2024-04-12 15:26:34 +02:00
handlers.go Update module github.com/go-swagger/go-swagger to v0.32.3 2025-06-09 11:31:23 +00:00
LICENSE Update module github.com/go-swagger/go-swagger to v0.32.3 2025-06-09 11:31:23 +00:00
logging.go Update module github.com/go-swagger/go-swagger to v0.32.3 2025-06-09 11:31:23 +00:00
Makefile Update module github.com/go-swagger/go-swagger to v0.32.3 2025-06-09 11:31:23 +00:00
proxy_headers.go Update module github.com/go-swagger/go-swagger to v0.32.3 2025-06-09 11:31:23 +00:00
README.md Update module github.com/go-swagger/go-swagger to v0.32.3 2025-06-09 11:31:23 +00:00
recovery.go Update module github.com/go-swagger/go-swagger to v0.32.3 2025-06-09 11:31:23 +00:00

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.