UnmarshalYAML implements the yaml.Unmarshaler interface
(unmarshal func(interface{}) error)
| 396 | |
| 397 | // UnmarshalYAML implements the yaml.Unmarshaler interface |
| 398 | func (c *HTTPClientConfig) UnmarshalYAML(unmarshal func(interface{}) error) error { |
| 399 | type plain HTTPClientConfig |
| 400 | *c = DefaultHTTPClientConfig |
| 401 | if err := unmarshal((*plain)(c)); err != nil { |
| 402 | return err |
| 403 | } |
| 404 | return c.Validate() |
| 405 | } |
| 406 | |
| 407 | // UnmarshalJSON implements the json.Marshaler interface for URL. |
| 408 | func (c *HTTPClientConfig) UnmarshalJSON(data []byte) error { |