mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 16:52:26 -05:00
[chore] Bump go swagger (#2871)
* bump go swagger version * bump swagger version
This commit is contained in:
parent
3a369d834a
commit
fd8a724e77
251 changed files with 10841 additions and 11896 deletions
22
vendor/github.com/gorilla/handlers/recovery.go
generated
vendored
22
vendor/github.com/gorilla/handlers/recovery.go
generated
vendored
|
|
@ -36,12 +36,12 @@ func parseRecoveryOptions(h http.Handler, opts ...RecoveryOption) http.Handler {
|
|||
//
|
||||
// Example:
|
||||
//
|
||||
// r := mux.NewRouter()
|
||||
// r.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
// panic("Unexpected error!")
|
||||
// })
|
||||
// r := mux.NewRouter()
|
||||
// r.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
// panic("Unexpected error!")
|
||||
// })
|
||||
//
|
||||
// http.ListenAndServe(":1123", handlers.RecoveryHandler()(r))
|
||||
// http.ListenAndServe(":1123", handlers.RecoveryHandler()(r))
|
||||
func RecoveryHandler(opts ...RecoveryOption) func(h http.Handler) http.Handler {
|
||||
return func(h http.Handler) http.Handler {
|
||||
r := &recoveryHandler{handler: h}
|
||||
|
|
@ -50,20 +50,22 @@ func RecoveryHandler(opts ...RecoveryOption) func(h http.Handler) http.Handler {
|
|||
}
|
||||
|
||||
// RecoveryLogger is a functional option to override
|
||||
// the default logger
|
||||
// the default logger.
|
||||
func RecoveryLogger(logger RecoveryHandlerLogger) RecoveryOption {
|
||||
return func(h http.Handler) {
|
||||
r := h.(*recoveryHandler)
|
||||
r := h.(*recoveryHandler) //nolint:errcheck //TODO:
|
||||
// @bharat-rajani should return type-assertion error but would break the API?
|
||||
r.logger = logger
|
||||
}
|
||||
}
|
||||
|
||||
// PrintRecoveryStack is a functional option to enable
|
||||
// or disable printing stack traces on panic.
|
||||
func PrintRecoveryStack(print bool) RecoveryOption {
|
||||
func PrintRecoveryStack(shouldPrint bool) RecoveryOption {
|
||||
return func(h http.Handler) {
|
||||
r := h.(*recoveryHandler)
|
||||
r.printStack = print
|
||||
r := h.(*recoveryHandler) //nolint:errcheck //TODO:
|
||||
// @bharat-rajani should return type-assertion error but would break the API?
|
||||
r.printStack = shouldPrint
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue