MCPcopy Create free account
hub / github.com/docker/cli / New

Function New

cli/config/memorystore/store.go:121–131  ·  view source on GitHub ↗

New creates a new in memory credential store

(opts ...Options)

Source from the content-addressed store, hash-verified

119
120// New creates a new in memory credential store
121func New(opts ...Options) (credentials.Store, error) {
122 m := &Config{
123 memoryCredentials: make(map[string]types.AuthConfig),
124 }
125 for _, opt := range opts {
126 if err := opt(m); err != nil {
127 return nil, err
128 }
129 }
130 return m, nil
131}

Callers 2

TestMemoryStoreFunction · 0.70

Calls

no outgoing calls

Tested by 2

TestMemoryStoreFunction · 0.56