From 95ed603de79c66ff76bfe7e42986a2fc8c7a1fa4 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Mon, 23 Dec 2019 12:45:35 -0700 Subject: Improve godocs all around These will be used in the new automated documentation system --- modules/caddyhttp/staticresp.go | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'modules/caddyhttp/staticresp.go') 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. -- cgit v1.2.3