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

Method CreateOrUpdate

cli/command/defaultcontextstore.go:119–124  ·  view source on GitHub ↗

CreateOrUpdate is not allowed for the default context and fails

(meta store.Metadata)

Source from the content-addressed store, hash-verified

117
118// CreateOrUpdate is not allowed for the default context and fails
119func (s *ContextStoreWithDefault) CreateOrUpdate(meta store.Metadata) error {
120 if meta.Name == DefaultContextName {
121 return invalidParameter(errors.New("default context cannot be created nor updated"))
122 }
123 return s.Store.CreateOrUpdate(meta)
124}
125
126// Remove is not allowed for the default context and fails
127func (s *ContextStoreWithDefault) Remove(name string) error {

Callers

nothing calls this directly

Calls 2

invalidParameterFunction · 0.70
CreateOrUpdateMethod · 0.65

Tested by

no test coverage detected