client returns the HTTP client for detection requests. If the detector caches results, the client also caches responses with the given extra status codes, which are not cached by default.
(extraStatuses ...int)
| 219 | // client returns the HTTP client for detection requests. If the detector caches results, the client also caches |
| 220 | // responses with the given extra status codes, which are not cached by default. |
| 221 | func (d *detector) client(extraStatuses ...int) *http.Client { |
| 222 | if d.cacheTTL <= 0 { |
| 223 | return d.httpClient |
| 224 | } |
| 225 | return api.NewCachedHTTPClientWithStatuses(d.httpClient, d.cacheTTL, extraStatuses...) |
| 226 | } |
| 227 | |
| 228 | func (d *detector) IssueFeatures() (IssueFeatures, error) { |
| 229 | if !ghauth.IsEnterprise(d.host) { |