johncming / go-spec

my wiki
Apache License 2.0
0 stars 0 forks source link

http.errors实现 #115

Open johncming opened 5 years ago

johncming commented 5 years ago

https://caddyserver.com/docs/errors

johncming commented 5 years ago
// ErrorHandler handles HTTP errors (and errors from other middleware).
type ErrorHandler struct {
    Next             httpserver.Handler
    GenericErrorPage string         // default error page filename
    ErrorPages       map[int]string // map of status code to filename
    Log              *httpserver.Logger
    Debug            bool // if true, errors are written out to client rather than to a log
}