MCPcopy Create free account
hub / github.com/containerd/nerdctl / buildSearchURL

Function buildSearchURL

pkg/cmd/search/search.go:139–155  ·  view source on GitHub ↗
(registryHost, term, scheme string)

Source from the content-addressed store, hash-verified

137}
138
139func 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
157func createHTTPClient(hostOpts *dockerconfig.HostOptions) *http.Client {
158 if hostOpts != nil && hostOpts.DefaultTLS != nil {

Callers 1

SearchFunction · 0.85

Calls 3

EncodeMethod · 0.80
SetMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…