UnmarshalYAML implements the yaml.Unmarshaler interface.
(unmarshal func(any) error)
| 465 | |
| 466 | // UnmarshalYAML implements the yaml.Unmarshaler interface. |
| 467 | func (c *HTTPClientConfig) UnmarshalYAML(unmarshal func(any) error) error { |
| 468 | type plain HTTPClientConfig |
| 469 | *c = DefaultHTTPClientConfig |
| 470 | if err := unmarshal((*plain)(c)); err != nil { |
| 471 | return err |
| 472 | } |
| 473 | return c.Validate() |
| 474 | } |
| 475 | |
| 476 | // UnmarshalJSON implements the json.Marshaler interface for URL. |
| 477 | func (c *HTTPClientConfig) UnmarshalJSON(data []byte) error { |