initial v0.8 pre-release

This commit is contained in:
Gani Georgiev
2022-10-30 10:28:14 +02:00
parent 9cbb2e750e
commit 90dba45d7c
388 changed files with 21580 additions and 13603 deletions
+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]
}