Merge pull request #34 from jeffwalsh/key_id_typo

Typo: 'id' should be 'key' in hashmap example
This commit is contained in:
Lasse Martin Jakobsen 2019-12-06 19:48:21 +01:00 committed by GitHub
commit 50b1d72abf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1330,7 +1330,7 @@ func (hashmap *HashMap) Insert(key string, value interface{}) {
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]
if !ok {
return nil, ErrKeyNotFoundInHashMap