Has checks if element with the specified key exist or not.
(key K)
| 80 | |
| 81 | // Has checks if element with the specified key exist or not. |
| 82 | func (s *Store[K, T]) Has(key K) bool { |
| 83 | s.mu.RLock() |
| 84 | defer s.mu.RUnlock() |
| 85 | |
| 86 | _, ok := s.data[key] |
| 87 | |
| 88 | return ok |
| 89 | } |
| 90 | |
| 91 | // Get returns a single element value from the store. |
| 92 | // |
no outgoing calls