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:
@@ -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]
|
||||
|
||||
@@ -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]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user