File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -323,7 +323,7 @@ type HTTPClientConfig struct {
323323 ProxyConfig `yaml:",inline"`
324324 // HTTPHeaders specify headers to inject in the requests. Those headers
325325 // could be marshalled back to the users.
326- HTTPHeaders * Headers `yaml:"http_headers" json:"http_headers"`
326+ HTTPHeaders * Headers `yaml:"http_headers,omitempty " json:"http_headers,omitempty "`
327327}
328328
329329// SetDirectory joins any relative file paths with dir.
Original file line number Diff line number Diff line change @@ -2023,7 +2023,6 @@ func TestHTTPClientConfig_Marshal(t *testing.T) {
20232023proxy_url: "http://localhost:8080"
20242024follow_redirects: false
20252025enable_http2: false
2026- http_headers: null
20272026` , string (actualYAML ))
20282027
20292028 // Unmarshalling the YAML should get the same struct in input.
@@ -2040,8 +2039,7 @@ http_headers: null
20402039 "proxy_url":"http://localhost:8080",
20412040 "tls_config":{"insecure_skip_verify":false},
20422041 "follow_redirects":false,
2043- "enable_http2":false,
2044- "http_headers":null
2042+ "enable_http2":false
20452043 }` , string (actualJSON ))
20462044
20472045 // Unmarshalling the JSON should get the same struct in input.
You can’t perform that action at this time.
0 commit comments