summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/staticresp.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-12-23 12:45:35 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2019-12-23 12:45:35 -0700
commit95ed603de79c66ff76bfe7e42986a2fc8c7a1fa4 (patch)
tree1a788b8eba98f0c2e69e5816bac9c7cc09aca96f /modules/caddyhttp/staticresp.go
parentcbb405f6aaee046c9de9ffb4f07ca824d9eedeb1 (diff)
Improve godocs all around
These will be used in the new automated documentation system
Diffstat (limited to 'modules/caddyhttp/staticresp.go')
-rw-r--r--modules/caddyhttp/staticresp.go17
1 files changed, 13 insertions, 4 deletions
diff --git a/modules/caddyhttp/staticresp.go b/modules/caddyhttp/staticresp.go
index 44b045e..cc294d5 100644
--- a/modules/caddyhttp/staticresp.go
+++ b/modules/caddyhttp/staticresp.go
@@ -29,10 +29,19 @@ func init() {
// StaticResponse implements a simple responder for static responses.
type StaticResponse struct {
- StatusCode WeakString `json:"status_code,omitempty"`
- Headers http.Header `json:"headers,omitempty"`
- Body string `json:"body,omitempty"`
- Close bool `json:"close,omitempty"`
+ // The HTTP status code to respond with. Can be an integer or,
+ // if needing to use a placeholder, a string.
+ StatusCode WeakString `json:"status_code,omitempty"`
+
+ // Header fields to set on the response.
+ Headers http.Header `json:"headers,omitempty"`
+
+ // The response body.
+ Body string `json:"body,omitempty"`
+
+ // If true, the server will close the client's connection
+ // after writing the response.
+ Close bool `json:"close,omitempty"`
}
// CaddyModule returns the Caddy module information.