chore: add more tests (#3338)
This commit is contained in:
@@ -42,7 +42,8 @@ func (manager *ResourceManager) Close() error {
|
||||
}
|
||||
|
||||
// GetResource returns the resource associated with given key.
|
||||
func (manager *ResourceManager) GetResource(key string, create func() (io.Closer, error)) (io.Closer, error) {
|
||||
func (manager *ResourceManager) GetResource(key string, create func() (io.Closer, error)) (
|
||||
io.Closer, error) {
|
||||
val, err := manager.singleFlight.Do(key, func() (any, error) {
|
||||
manager.lock.RLock()
|
||||
resource, ok := manager.resources[key]
|
||||
|
||||
Reference in New Issue
Block a user