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/logging/encoders.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'modules/logging') diff --git a/modules/logging/encoders.go b/modules/logging/encoders.go index 28cda55..49ad11a 100644 --- a/modules/logging/encoders.go +++ b/modules/logging/encoders.go @@ -36,7 +36,7 @@ func init() { // ConsoleEncoder encodes log entries that are mostly human-readable. type ConsoleEncoder struct { - zapcore.Encoder + zapcore.Encoder `json:"-"` LogEncoderConfig } @@ -56,8 +56,8 @@ func (ce *ConsoleEncoder) Provision(_ caddy.Context) error { // JSONEncoder encodes entries as JSON. type JSONEncoder struct { - zapcore.Encoder - *LogEncoderConfig + zapcore.Encoder `json:"-"` + LogEncoderConfig } // CaddyModule returns the Caddy module information. @@ -77,7 +77,7 @@ func (je *JSONEncoder) Provision(_ caddy.Context) error { // LogfmtEncoder encodes log entries as logfmt: // https://www.brandur.org/logfmt type LogfmtEncoder struct { - zapcore.Encoder + zapcore.Encoder `json:"-"` LogEncoderConfig } @@ -100,9 +100,9 @@ func (lfe *LogfmtEncoder) Provision(_ caddy.Context) error { // for custom, self-encoded log entries that consist of a // single field in the structured log entry. type StringEncoder struct { - zapcore.Encoder - FieldName string `json:"field,omitempty"` - FallbackRaw json.RawMessage `json:"fallback,omitempty" caddy:"namespace=caddy.logging.encoders inline_key=format"` + zapcore.Encoder `json:"-"` + FieldName string `json:"field,omitempty"` + FallbackRaw json.RawMessage `json:"fallback,omitempty" caddy:"namespace=caddy.logging.encoders inline_key=format"` } // CaddyModule returns the Caddy module information. -- cgit v1.2.3