mirror of
https://github.com/Fishwaldo/huma.git
synced 2025-03-15 19:31:27 +00:00
docs: additional comments
This commit is contained in:
parent
5c4ae17766
commit
b46f0413e5
1 changed files with 2 additions and 1 deletions
|
@ -91,7 +91,8 @@ func Recovery(onPanic PanicFunc) func(http.Handler) http.Handler {
|
|||
}
|
||||
|
||||
// Recovering comes *after* the above so the buffer is not returned to
|
||||
// the pool until after we print out its contents.
|
||||
// the pool until after we print out its contents. This deferred func
|
||||
// is used to recover from panics and deliberately left in-line.
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
// The body might have been read or partially read, so replace it
|
||||
|
|
Loading…
Add table
Reference in a new issue