MCPcopy Index your code
hub / github.com/docker/cli / New

Function New

cli/command/idresolver/idresolver.go:22–28  ·  view source on GitHub ↗

New creates a new IDResolver.

(apiClient client.APIClient, noResolve bool)

Source from the content-addressed store, hash-verified

20
21// New creates a new IDResolver.
22func New(apiClient client.APIClient, noResolve bool) *IDResolver {
23 return &IDResolver{
24 client: apiClient,
25 noResolve: noResolve,
26 cache: make(map[string]string),
27 }
28}
29
30func (r *IDResolver) get(ctx context.Context, t any, id string) (string, error) {
31 switch t.(type) {

Callers 5

TestResolveErrorFunction · 0.70
TestResolveWithCacheFunction · 0.70
TestResolveNodeFunction · 0.70
TestResolveServiceFunction · 0.70

Calls

no outgoing calls

Tested by 5

TestResolveErrorFunction · 0.56
TestResolveWithCacheFunction · 0.56
TestResolveNodeFunction · 0.56
TestResolveServiceFunction · 0.56