UnmarshalCaddyfile sets up the module from Caddyfile tokens. Syntax: json { <common encoder config subdirectives...> } See the godoc on the LogEncoderConfig type for the syntax of subdirectives that are common to most/all encoders.
(d *caddyfile.Dispenser)
| 105 | // See the godoc on the LogEncoderConfig type for the syntax of |
| 106 | // subdirectives that are common to most/all encoders. |
| 107 | func (je *JSONEncoder) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { |
| 108 | d.Next() // consume encoder name |
| 109 | if d.NextArg() { |
| 110 | return d.ArgErr() |
| 111 | } |
| 112 | err := je.LogEncoderConfig.UnmarshalCaddyfile(d) |
| 113 | if err != nil { |
| 114 | return err |
| 115 | } |
| 116 | return nil |
| 117 | } |
| 118 | |
| 119 | // LogEncoderConfig holds configuration common to most encoders. |
| 120 | type LogEncoderConfig struct { |
nothing calls this directly
no test coverage detected