Function
buildSearchURL
(registryHost, term, scheme string)
Source from the content-addressed store, hash-verified
| 137 | } |
| 138 | |
| 139 | func buildSearchURL(registryHost, term, scheme string) string { |
| 140 | host := registryHost |
| 141 | if host == "docker.io" { |
| 142 | host = "index.docker.io" |
| 143 | } |
| 144 | |
| 145 | u := url.URL{ |
| 146 | Scheme: scheme, |
| 147 | Host: host, |
| 148 | Path: "/v1/search", |
| 149 | } |
| 150 | q := u.Query() |
| 151 | q.Set("q", term) |
| 152 | u.RawQuery = q.Encode() |
| 153 | |
| 154 | return u.String() |
| 155 | } |
| 156 | |
| 157 | func createHTTPClient(hostOpts *dockerconfig.HostOptions) *http.Client { |
| 158 | if hostOpts != nil && hostOpts.DefaultTLS != nil { |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…