From 68cebb28d063a7a71705ce022f118b5e1205fa3f Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Sat, 11 Apr 2020 09:01:40 -0600 Subject: Fix some godocs --- modules/caddyhttp/celmatcher.go | 4 ++++ modules/caddyhttp/staticerror.go | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'modules/caddyhttp') diff --git a/modules/caddyhttp/celmatcher.go b/modules/caddyhttp/celmatcher.go index 8d183c1..19c7bca 100644 --- a/modules/caddyhttp/celmatcher.go +++ b/modules/caddyhttp/celmatcher.go @@ -44,6 +44,10 @@ func init() { // This enables complex logic to be expressed using a comfortable, // familiar syntax. // +// This matcher's JSON interface is actually a string, not a struct. +// The generated docs are not correct because this type has custom +// marshaling logic. +// // COMPATIBILITY NOTE: This module is still experimental and is not // subject to Caddy's compatibility guarantee. type MatchExpression struct { diff --git a/modules/caddyhttp/staticerror.go b/modules/caddyhttp/staticerror.go index 306c3eb..d2d255e 100644 --- a/modules/caddyhttp/staticerror.go +++ b/modules/caddyhttp/staticerror.go @@ -34,11 +34,11 @@ func init() { // 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 { - // The recommended HTTP status code. Can be either an integer or a - // string if placeholders are needed. Optional. Default is 500. + // The error message. Optional. Default is no error message. Error string `json:"error,omitempty"` - // The error message. Optional. Default is no error message. + // The recommended HTTP status code. Can be either an integer or a + // string if placeholders are needed. Optional. Default is 500. StatusCode WeakString `json:"status_code,omitempty"` } -- cgit v1.2.3