mirror of
https://github.com/caddyserver/caddy.git
synced 2025-08-26 03:11:58 +08:00
Improve godocs all around
These will be used in the new automated documentation system
This commit is contained in:
@ -27,8 +27,18 @@ func init() {
|
||||
}
|
||||
|
||||
// StaticError implements a simple handler that returns an error.
|
||||
// This handler returns an error value, but does not write a response.
|
||||
// This is useful when you want the server to act as if an error
|
||||
// occurred; for example, to invoke your custom error handling logic.
|
||||
//
|
||||
// Since this handler does not write a response, the error information
|
||||
// is for use by the server to know how to handle the error.
|
||||
type StaticError struct {
|
||||
Error string `json:"error,omitempty"`
|
||||
// The recommended HTTP status code. Can be either an integer or a
|
||||
// string if placeholders are needed. Optional. Default is 500.
|
||||
Error string `json:"error,omitempty"`
|
||||
|
||||
// The error message. Optional. Default is no error message.
|
||||
StatusCode WeakString `json:"status_code,omitempty"`
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user