MCPcopy Create free account
hub / github.com/cloud-native-go/examples / Delete

Method Delete

ch08/hexarch/core/core.go:40–48  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

38}
39
40func (store *KeyValueStore) Delete(key string) error {
41 store.Lock()
42 delete(store.m, key)
43 store.Unlock()
44
45 store.transact.WriteDelete(key)
46
47 return nil
48}
49
50func (store *KeyValueStore) Get(key string) (string, error) {
51 store.RLock()

Callers 2

RestoreMethod · 0.95
TestDeleteFunction · 0.95

Calls 1

WriteDeleteMethod · 0.65

Tested by 1

TestDeleteFunction · 0.76