SetDirectory joins any relative file paths with dir.
(dir string)
| 315 | |
| 316 | // SetDirectory joins any relative file paths with dir. |
| 317 | func (c *HTTPClientConfig) SetDirectory(dir string) { |
| 318 | if c == nil { |
| 319 | return |
| 320 | } |
| 321 | c.TLSConfig.SetDirectory(dir) |
| 322 | c.BasicAuth.SetDirectory(dir) |
| 323 | c.Authorization.SetDirectory(dir) |
| 324 | c.OAuth2.SetDirectory(dir) |
| 325 | c.BearerTokenFile = JoinDir(dir, c.BearerTokenFile) |
| 326 | } |
| 327 | |
| 328 | // Validate validates the HTTPClientConfig to check only one of BearerToken, |
| 329 | // BasicAuth and BearerTokenFile is configured. It also validates that ProxyURL |
nothing calls this directly
no test coverage detected