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

fix: add MakeBodyRequest

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
Dr. Carsten Leue
2023-12-15 16:00:58 +01:00
parent 8f49c1328c
commit 4d2f410c98
2 changed files with 34 additions and 1 deletions

View File

@@ -15,7 +15,10 @@
package file
import "path/filepath"
import (
"io"
"path/filepath"
)
// Join appends a filename to a root path
func Join(name string) func(root string) string {
@@ -23,3 +26,13 @@ func Join(name string) func(root string) string {
return filepath.Join(root, name)
}
}
// ToReader converts a [io.Reader]
func ToReader[R io.Reader](r R) io.Reader {
return r
}
// ToCloser converts a [io.Closer]
func ToCloser[C io.Closer](c C) io.Closer {
return c
}