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

Method Remove

cli/command/defaultcontextstore.go:127–132  ·  view source on GitHub ↗

Remove is not allowed for the default context and fails

(name string)

Source from the content-addressed store, hash-verified

125
126// Remove is not allowed for the default context and fails
127func (s *ContextStoreWithDefault) Remove(name string) error {
128 if name == DefaultContextName {
129 return invalidParameter(errors.New("default context cannot be removed"))
130 }
131 return s.Store.Remove(name)
132}
133
134// GetMetadata implements store.Store's GetMetadata
135func (s *ContextStoreWithDefault) GetMetadata(name string) (store.Metadata, error) {

Callers

nothing calls this directly

Calls 2

invalidParameterFunction · 0.70
RemoveMethod · 0.65

Tested by

no test coverage detected