mirror of
https://github.com/Pungyeon/clean-go-article.git
synced 2024-11-23 14:14:05 +00:00
key typo in hashmap example
This commit is contained in:
parent
061ee338a3
commit
9256c081aa
|
@ -1330,7 +1330,7 @@ func (hashmap *HashMap) Insert(key string, value interface{}) {
|
||||||
hashmap.store[key] = value
|
hashmap.store[key] = value
|
||||||
}
|
}
|
||||||
|
|
||||||
func (hashmap *HashMap) Get(id string) (interface{}, error) {
|
func (hashmap *HashMap) Get(key string) (interface{}, error) {
|
||||||
value, ok := hashmap.store[key]
|
value, ok := hashmap.store[key]
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, ErrKeyNotFoundInHashMap
|
return nil, ErrKeyNotFoundInHashMap
|
||||||
|
|
Loading…
Reference in a new issue