mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-10 16:27:26 +02:00
initial v0.8 pre-release
This commit is contained in:
1 parent
9cbb2e750e
commit
90dba45d7c
388 files changed
+21574
-13597
No files matched your search
@@ -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]
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user