1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

feat: add Delete method for hashmap

This commit is contained in:
dudaodong
2022-08-23 15:07:54 +08:00
parent b3437fdddf
commit 4eeeabb227

View File

@@ -78,7 +78,7 @@ func (hm *HashMap) putValue(hash uint64, key, value any) any {
return value
}
// Delete key value in hashmap
// Delete item by given key in hashmap
func (hm *HashMap) Delete(key any) {
hash := hm.hash(key)
node := hm.table[hash]