(key string, value int)
| 38 | } |
| 39 | |
| 40 | func (table *HashTable) Set(key string, value int) bool { |
| 41 | position := generateHash(key) |
| 42 | current := table.data[position] |
| 43 | for current != nil { |
| 44 | if current.key == key { |
| 45 | current.data = value |
| 46 | return true |
| 47 | } |
| 48 | current = current.next |
| 49 | } |
| 50 | return false |
| 51 | } |
| 52 | |
| 53 | func (table *HashTable) Remove(key string) bool { |
| 54 | position := generateHash(key) |
nothing calls this directly
no test coverage detected