Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/vendor/github.com/gorilla/handlers
akuma06 a41f938cec Add Godep support (#758)
As we have seen, dependencies version can prevent the build. We should
user lock versions on dependencies that we know work:
* Packages are vendored
* Add Godep support
* Added addtional install step in readme
* Fix travis build error
2017-05-26 13:07:22 +02:00
..
.travis.yml Add Godep support (#758) 2017-05-26 13:07:22 +02:00
canonical.go Add Godep support (#758) 2017-05-26 13:07:22 +02:00
compress.go Add Godep support (#758) 2017-05-26 13:07:22 +02:00
cors.go Add Godep support (#758) 2017-05-26 13:07:22 +02:00
doc.go Add Godep support (#758) 2017-05-26 13:07:22 +02:00
handlers.go Add Godep support (#758) 2017-05-26 13:07:22 +02:00
handlers_go18.go Add Godep support (#758) 2017-05-26 13:07:22 +02:00
handlers_pre18.go Add Godep support (#758) 2017-05-26 13:07:22 +02:00
LICENSE Add Godep support (#758) 2017-05-26 13:07:22 +02:00
proxy_headers.go Add Godep support (#758) 2017-05-26 13:07:22 +02:00
README.md Add Godep support (#758) 2017-05-26 13:07:22 +02:00
recovery.go Add Godep support (#758) 2017-05-26 13:07:22 +02:00

gorilla/handlers

GoDoc Build Status 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.