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

Method Remove

cli/context/store/store.go:142–150  ·  view source on GitHub ↗

Remove deletes the context with the given name, if found.

(name string)

Source from the content-addressed store, hash-verified

140
141// Remove deletes the context with the given name, if found.
142func (s *ContextStore) Remove(name string) error {
143 if err := s.meta.remove(name); err != nil {
144 return fmt.Errorf("failed to remove context %s: %w", name, err)
145 }
146 if err := s.tls.remove(name); err != nil {
147 return fmt.Errorf("failed to remove context %s: %w", name, err)
148 }
149 return nil
150}
151
152// GetMetadata returns the metadata for the context with the given name.
153// It returns an errdefs.ErrNotFound if the context was not found.

Callers

nothing calls this directly

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected