mirror of
https://github.com/IBM/fp-go.git
synced 2025-08-10 22:31:32 +02:00
fix: remove unnecesary indirection in E.TryCatch
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
@@ -18,11 +18,11 @@ package iooption
|
||||
import (
|
||||
"context"
|
||||
|
||||
IO "github.com/IBM/fp-go/io"
|
||||
G "github.com/IBM/fp-go/iooption/generic"
|
||||
L "github.com/IBM/fp-go/lazy"
|
||||
)
|
||||
|
||||
// WithLock executes the provided IO operation in the scope of a lock
|
||||
func WithLock[E, A any](lock L.Lazy[context.CancelFunc]) func(fa IOOption[A]) IOOption[A] {
|
||||
func WithLock[E, A any](lock IO.IO[context.CancelFunc]) func(fa IOOption[A]) IOOption[A] {
|
||||
return G.WithLock[IOOption[A]](lock)
|
||||
}
|
||||
|
Reference in New Issue
Block a user