MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / Del

Method Del

structure/string.go:107–111  ·  view source on GitHub ↗

Del deletes the value of a key If the key does not exist, it will return nil If the key exists, it will be deleted If the key is expired, it will be deleted and return nil If the key is not expired, it will be updated and return nil

(k string)

Source from the content-addressed store, hash-verified

105// If the key is expired, it will be deleted and return nil
106// If the key is not expired, it will be updated and return nil
107func (s *StringStructure) Del(k string) error {
108 key := stringToBytesWithKey(k)
109 // Delete the value
110 return s.db.Delete(key)
111}
112
113// Type returns the type of a key
114// If the key does not exist, it will return ""

Callers

nothing calls this directly

Calls 2

stringToBytesWithKeyFunction · 0.85
DeleteMethod · 0.65

Tested by

no test coverage detected