MCPcopy Index your code
hub / github.com/containerd/containerd / addQuery

Method addQuery

core/remotes/docker/resolver.go:572–590  ·  view source on GitHub ↗
(key, value string)

Source from the content-addressed store, hash-verified

570}
571
572func (r *request) addQuery(key, value string) (err error) {
573 var q url.Values
574 // Parse query
575 if p, query, ok := strings.Cut(r.path, "?"); ok {
576 q, err = url.ParseQuery(query)
577 if err != nil {
578 return
579 }
580 r.path = p + "?"
581 } else {
582 r.path = r.path + "?"
583 q = url.Values{}
584 }
585 q.Add(key, value)
586
587 r.path = r.path + q.Encode()
588
589 return
590}
591
592const namespaceQueryArg = "ns"
593

Callers 3

TestAddQueryFunction · 0.95
addNamespaceMethod · 0.95
openReferrersMethod · 0.80

Calls 1

AddMethod · 0.65

Tested by 1

TestAddQueryFunction · 0.76