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

Function NewKeyValueStore

ch08/hexarch/core/core.go:33–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31var ErrorNoSuchKey = errors.New("no such key")
32
33func NewKeyValueStore() *KeyValueStore {
34 return &KeyValueStore{
35 m: make(map[string]string),
36 transact: ZeroTransactionLogger{},
37 }
38}
39
40func (store *KeyValueStore) Delete(key string) error {
41 store.Lock()

Callers 4

mainFunction · 0.92
TestPutFunction · 0.85
TestGetFunction · 0.85
TestDeleteFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestPutFunction · 0.68
TestGetFunction · 0.68
TestDeleteFunction · 0.68