1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-11-27 22:28:29 +02:00

fix: refactor

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
Dr. Carsten Leue
2025-11-11 11:01:49 +01:00
parent 62fcd186a3
commit 600521b220
100 changed files with 1786 additions and 1618 deletions

View File

@@ -23,8 +23,8 @@ import (
HTTP "net/http"
A "github.com/IBM/fp-go/v2/array"
R "github.com/IBM/fp-go/v2/context/readerioeither"
H "github.com/IBM/fp-go/v2/context/readerioeither/http"
R "github.com/IBM/fp-go/v2/context/readerioresult"
H "github.com/IBM/fp-go/v2/context/readerioresult/http"
E "github.com/IBM/fp-go/v2/either"
F "github.com/IBM/fp-go/v2/function"
IO "github.com/IBM/fp-go/v2/io"
@@ -74,7 +74,7 @@ func TestMultipleHttpRequests(t *testing.T) {
assert.Equal(t, E.Of[error](count), result())
}
func heterogeneousHTTPRequests() ReaderIOEither[T.Tuple2[PostItem, CatFact]] {
func heterogeneousHTTPRequests() ReaderIOResult[T.Tuple2[PostItem, CatFact]] {
// prepare the http client
client := H.MakeClient(HTTP.DefaultClient)
// readSinglePost sends a GET request and parses the response as [PostItem]

View File

@@ -15,10 +15,8 @@
package http
import (
"github.com/IBM/fp-go/v2/context/readerioeither"
)
import "github.com/IBM/fp-go/v2/context/readerioresult"
type (
ReaderIOEither[A any] = readerioeither.ReaderIOEither[A]
ReaderIOResult[A any] = readerioresult.ReaderIOResult[A]
)