Remove deletes the context with the given name, if found.
(name string)
| 140 | |
| 141 | // Remove deletes the context with the given name, if found. |
| 142 | func (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. |