1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-06-23 00:27:49 +02:00
Files
fp-go/context/ioeither/ioeither.go
Dr. Carsten Leue b25de3c7c3 doc: fix case
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
2023-07-18 15:57:54 +02:00

14 lines
366 B
Go

package ioeither
import (
"context"
G "github.com/IBM/fp-go/context/ioeither/generic"
IOE "github.com/IBM/fp-go/ioeither"
)
// withContext wraps an existing IOEither and performs a context check for cancellation before delegating
func WithContext[A any](ctx context.Context, ma IOE.IOEither[error, A]) IOE.IOEither[error, A] {
return G.WithContext(ctx, ma)
}