MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / Delete

Method Delete

internal/entities/store.go:139–152  ·  view source on GitHub ↗

Delete removes an entity and reports whether it existed.

(name string)

Source from the content-addressed store, hash-verified

137
138// Delete removes an entity and reports whether it existed.
139func (s *Store) Delete(name string) (bool, error) {
140 all, err := s.allMap()
141 if err != nil {
142 return false, err
143 }
144 if _, ok := all[name]; !ok {
145 return false, nil
146 }
147 delete(all, name)
148 if err := s.write(all); err != nil {
149 return false, err
150 }
151 return true, nil
152}
153
154func (s *Store) allMap() (map[string]Entity, error) {
155 if err := s.migrateIfInstruction(); err != nil {

Callers 3

TestStoreRoundTripFunction · 0.95
UninstallMethod · 0.45
handleInstructionItemMethod · 0.45

Calls 2

allMapMethod · 0.95
writeMethod · 0.95

Tested by 1

TestStoreRoundTripFunction · 0.76