March 2019
Intermediate to advanced
336 pages
9h 9m
English
In the following code, the Contains method has an input parameter, key, of the DictKey type, and returns bool if key exists in the dictionary:
// Contains methodfunc (dict *Dictionary) Contains(key DictKey) bool { dict.lock.RLock() defer dict.lock.RUnlock() var exists bool _, exists = dict.elements[key] return exists}
Read now
Unlock full access