UnmarshalCaddyfile implements caddyfile.Unmarshaler.
(d *caddyfile.Dispenser)
| 1286 | |
| 1287 | // UnmarshalCaddyfile implements caddyfile.Unmarshaler. |
| 1288 | func (m *MatchProtocol) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { |
| 1289 | // iterate to merge multiple matchers into one |
| 1290 | for d.Next() { |
| 1291 | var proto string |
| 1292 | if !d.Args(&proto) { |
| 1293 | return d.Err("expected exactly one protocol") |
| 1294 | } |
| 1295 | *m = MatchProtocol(proto) |
| 1296 | } |
| 1297 | return nil |
| 1298 | } |
| 1299 | |
| 1300 | // CELLibrary produces options that expose this matcher for use in CEL |
| 1301 | // expression matchers. |
nothing calls this directly
no test coverage detected