From d030bfdae065c8776e8ac14c0a28f725ec05145c Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Mon, 16 Sep 2019 11:04:18 -0600 Subject: httpcaddyfile: static_response -> respond; minor cleanups --- modules/caddyhttp/staticresp.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'modules/caddyhttp/staticresp.go') diff --git a/modules/caddyhttp/staticresp.go b/modules/caddyhttp/staticresp.go index 21ff9d5..a435f87 100644 --- a/modules/caddyhttp/staticresp.go +++ b/modules/caddyhttp/staticresp.go @@ -25,7 +25,6 @@ import ( func init() { caddy.RegisterModule(StaticResponse{}) - // TODO: Caddyfile directive } // StaticResponse implements a simple responder for static responses. @@ -46,7 +45,7 @@ func (StaticResponse) CaddyModule() caddy.ModuleInfo { // UnmarshalCaddyfile sets up the handler from Caddyfile tokens. Syntax: // -// static_response [] { +// respond [] { // body // close // } @@ -119,5 +118,8 @@ func (s StaticResponse) ServeHTTP(w http.ResponseWriter, r *http.Request, _ Hand return nil } -// Interface guard -var _ MiddlewareHandler = (*StaticResponse)(nil) +// Interface guards +var ( + _ MiddlewareHandler = (*StaticResponse)(nil) + _ caddyfile.Unmarshaler = (*StaticResponse)(nil) +) -- cgit v1.2.3