1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-08-10 22:31:32 +02:00

fix: add WithTempFile to ReaderIOEither

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
Dr. Carsten Leue
2023-09-19 18:06:32 +02:00
parent 6532a83e82
commit b15ab38861
6 changed files with 95 additions and 2 deletions

View File

@@ -25,6 +25,7 @@ import (
F "github.com/IBM/fp-go/function"
"github.com/IBM/fp-go/internal/file"
IOE "github.com/IBM/fp-go/ioeither"
IOEF "github.com/IBM/fp-go/ioeither/file"
)
var (
@@ -35,6 +36,12 @@ var (
RIOE.FromIOEither[*os.File],
RIOE.WithContext[*os.File],
)
// Remove removes a file by name
Remove = F.Flow2(
IOEF.Remove,
RIOE.FromIOEither[string],
)
)
// Close closes an object