initial v0.8 pre-release

This commit is contained in:
Gani Georgiev committed 2022-10-30 10:28:14 +02:00
1 parent 9cbb2e750e
commit 90dba45d7c
388 files changed
+21574 -13597

No files matched your search

+4 -4
View File
@@ -33,8 +33,8 @@ func (s *Store[T]) Remove(key string) {
// Has checks if element with the specified key exist or not.
func (s *Store[T]) Has(key string) bool {
s.mux.Lock()
defer s.mux.Unlock()
s.mux.RLock()
defer s.mux.RUnlock()
_, ok := s.data[key]
@@ -45,8 +45,8 @@ func (s *Store[T]) Has(key string) bool {
//
// If key is not set, the zero T value is returned.
func (s *Store[T]) Get(key string) T {
s.mux.Lock()
defer s.mux.Unlock()
s.mux.RLock()
defer s.mux.RUnlock()
return s.data[key]
}