StdHandler converts a ReturnHandler into a standard http.Handler. Handled requests are logged using opts.Logf, as are any errors. Errors are handled as specified by the ReturnHandler interface. Short-hand for LogHandler(ErrorHandler()).
(h ReturnHandler, opts HandlerOptions)
| 462 | // Errors are handled as specified by the ReturnHandler interface. |
| 463 | // Short-hand for LogHandler(ErrorHandler()). |
| 464 | func StdHandler(h ReturnHandler, opts HandlerOptions) http.Handler { |
| 465 | return LogHandler(ErrorHandler(h, opts.errorOptions()), opts.logOptions()) |
| 466 | } |
| 467 | |
| 468 | // LogHandler returns an http.Handler that logs to opts.Logf. |
| 469 | // It logs both successful and failing requests. |
searching dependent graphs…