mirror of
https://github.com/IBM/fp-go.git
synced 2025-08-10 22:31:32 +02:00
doc: fix case
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
@@ -3,9 +3,9 @@ package generic
|
||||
import (
|
||||
"context"
|
||||
|
||||
E "github.com/ibm/fp-go/either"
|
||||
ET "github.com/ibm/fp-go/either"
|
||||
IOE "github.com/ibm/fp-go/ioeither/generic"
|
||||
E "github.com/IBM/fp-go/either"
|
||||
ET "github.com/IBM/fp-go/either"
|
||||
IOE "github.com/IBM/fp-go/ioeither/generic"
|
||||
)
|
||||
|
||||
// withContext wraps an existing IOEither and performs a context check for cancellation before delegating
|
||||
|
@@ -3,8 +3,8 @@ package ioeither
|
||||
import (
|
||||
"context"
|
||||
|
||||
G "github.com/ibm/fp-go/context/ioeither/generic"
|
||||
IOE "github.com/ibm/fp-go/ioeither"
|
||||
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
|
||||
|
@@ -16,7 +16,7 @@
|
||||
package reader
|
||||
|
||||
import (
|
||||
R "github.com/ibm/fp-go/reader/generic"
|
||||
R "github.com/IBM/fp-go/reader/generic"
|
||||
)
|
||||
|
||||
// TraverseArray transforms an array
|
||||
|
@@ -18,7 +18,7 @@ package reader
|
||||
import (
|
||||
"context"
|
||||
|
||||
R "github.com/ibm/fp-go/reader/generic"
|
||||
R "github.com/IBM/fp-go/reader/generic"
|
||||
)
|
||||
|
||||
// these functions curry a golang function with the context as the firsr parameter into a either reader with the context as the last parameter
|
||||
|
@@ -3,7 +3,7 @@ package reader
|
||||
import (
|
||||
"context"
|
||||
|
||||
R "github.com/ibm/fp-go/reader/generic"
|
||||
R "github.com/IBM/fp-go/reader/generic"
|
||||
)
|
||||
|
||||
// these functions curry a golang function with the context as the firsr parameter into a either reader with the context as the last parameter
|
||||
|
@@ -3,7 +3,7 @@ package reader
|
||||
import (
|
||||
"context"
|
||||
|
||||
R "github.com/ibm/fp-go/reader/generic"
|
||||
R "github.com/IBM/fp-go/reader/generic"
|
||||
)
|
||||
|
||||
func MonadMap[A, B any](fa Reader[A], f func(A) B) Reader[B] {
|
||||
|
@@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
F "github.com/ibm/fp-go/function"
|
||||
T "github.com/ibm/fp-go/tuple"
|
||||
F "github.com/IBM/fp-go/function"
|
||||
T "github.com/IBM/fp-go/tuple"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package reader
|
||||
|
||||
import (
|
||||
R "github.com/ibm/fp-go/reader/generic"
|
||||
T "github.com/ibm/fp-go/tuple"
|
||||
R "github.com/IBM/fp-go/reader/generic"
|
||||
T "github.com/IBM/fp-go/tuple"
|
||||
)
|
||||
|
||||
// SequenceT converts n inputs of higher kinded types into a higher kinded types of n strongly typed values, represented as a tuple
|
||||
|
@@ -4,7 +4,7 @@ package reader
|
||||
import (
|
||||
"context"
|
||||
|
||||
R "github.com/ibm/fp-go/reader"
|
||||
R "github.com/IBM/fp-go/reader"
|
||||
)
|
||||
|
||||
// Reader is a specialization of the Reader monad assuming a golang context as the context of the monad
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package readereither
|
||||
|
||||
import (
|
||||
RE "github.com/ibm/fp-go/readereither/generic"
|
||||
RE "github.com/IBM/fp-go/readereither/generic"
|
||||
)
|
||||
|
||||
// TraverseArray transforms an array
|
||||
|
@@ -3,7 +3,7 @@ package readereither
|
||||
import (
|
||||
"context"
|
||||
|
||||
E "github.com/ibm/fp-go/either"
|
||||
E "github.com/IBM/fp-go/either"
|
||||
)
|
||||
|
||||
// withContext wraps an existing ReaderEither and performs a context check for cancellation before deletating
|
||||
|
@@ -3,7 +3,7 @@ package readereither
|
||||
import (
|
||||
"context"
|
||||
|
||||
RE "github.com/ibm/fp-go/readereither/generic"
|
||||
RE "github.com/IBM/fp-go/readereither/generic"
|
||||
)
|
||||
|
||||
// these functions curry a golang function with the context as the firsr parameter into a either reader with the context as the last parameter
|
||||
|
@@ -3,11 +3,11 @@ package exec
|
||||
import (
|
||||
"context"
|
||||
|
||||
RE "github.com/ibm/fp-go/context/readereither"
|
||||
E "github.com/ibm/fp-go/either"
|
||||
"github.com/ibm/fp-go/exec"
|
||||
F "github.com/ibm/fp-go/function"
|
||||
GE "github.com/ibm/fp-go/internal/exec"
|
||||
RE "github.com/IBM/fp-go/context/readereither"
|
||||
E "github.com/IBM/fp-go/either"
|
||||
"github.com/IBM/fp-go/exec"
|
||||
F "github.com/IBM/fp-go/function"
|
||||
GE "github.com/IBM/fp-go/internal/exec"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@@ -3,7 +3,7 @@ package readereither
|
||||
import (
|
||||
"context"
|
||||
|
||||
RE "github.com/ibm/fp-go/readereither/generic"
|
||||
RE "github.com/IBM/fp-go/readereither/generic"
|
||||
)
|
||||
|
||||
// these functions curry a golang function with the context as the firsr parameter into a either reader with the context as the last parameter
|
||||
|
@@ -3,10 +3,10 @@ package readereither
|
||||
import (
|
||||
"context"
|
||||
|
||||
R "github.com/ibm/fp-go/context/reader"
|
||||
ET "github.com/ibm/fp-go/either"
|
||||
O "github.com/ibm/fp-go/option"
|
||||
RE "github.com/ibm/fp-go/readereither/generic"
|
||||
R "github.com/IBM/fp-go/context/reader"
|
||||
ET "github.com/IBM/fp-go/either"
|
||||
O "github.com/IBM/fp-go/option"
|
||||
RE "github.com/IBM/fp-go/readereither/generic"
|
||||
)
|
||||
|
||||
func MakeReaderEither[A any](f func(context.Context) ET.Either[error, A]) ReaderEither[A] {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package readereither
|
||||
|
||||
import (
|
||||
RE "github.com/ibm/fp-go/readereither/generic"
|
||||
T "github.com/ibm/fp-go/tuple"
|
||||
RE "github.com/IBM/fp-go/readereither/generic"
|
||||
T "github.com/IBM/fp-go/tuple"
|
||||
)
|
||||
|
||||
// SequenceT converts n inputs of higher kinded types into a higher kinded types of n strongly typed values, represented as a tuple
|
||||
|
@@ -4,7 +4,7 @@ package readereither
|
||||
import (
|
||||
"context"
|
||||
|
||||
RE "github.com/ibm/fp-go/readereither"
|
||||
RE "github.com/IBM/fp-go/readereither"
|
||||
)
|
||||
|
||||
// ReaderEither is a specialization of the Reader monad for the typical golang scenario
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package readerio
|
||||
|
||||
import (
|
||||
IO "github.com/ibm/fp-go/io"
|
||||
R "github.com/ibm/fp-go/readerio/generic"
|
||||
IO "github.com/IBM/fp-go/io"
|
||||
R "github.com/IBM/fp-go/readerio/generic"
|
||||
)
|
||||
|
||||
// TraverseArray transforms an array
|
||||
|
@@ -3,8 +3,8 @@ package readerio
|
||||
import (
|
||||
"context"
|
||||
|
||||
IO "github.com/ibm/fp-go/io"
|
||||
R "github.com/ibm/fp-go/readerio/generic"
|
||||
IO "github.com/IBM/fp-go/io"
|
||||
R "github.com/IBM/fp-go/readerio/generic"
|
||||
)
|
||||
|
||||
// these functions curry a golang function with the context as the firsr parameter into a either reader with the context as the last parameter
|
||||
|
@@ -3,7 +3,7 @@ package readerio
|
||||
import (
|
||||
"context"
|
||||
|
||||
R "github.com/ibm/fp-go/readerio/generic"
|
||||
R "github.com/IBM/fp-go/readerio/generic"
|
||||
)
|
||||
|
||||
func MonadMap[A, B any](fa ReaderIO[A], f func(A) B) ReaderIO[B] {
|
||||
|
@@ -6,9 +6,9 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
F "github.com/ibm/fp-go/function"
|
||||
IO "github.com/ibm/fp-go/io"
|
||||
T "github.com/ibm/fp-go/tuple"
|
||||
F "github.com/IBM/fp-go/function"
|
||||
IO "github.com/IBM/fp-go/io"
|
||||
T "github.com/IBM/fp-go/tuple"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package readerio
|
||||
|
||||
import (
|
||||
R "github.com/ibm/fp-go/readerio/generic"
|
||||
T "github.com/ibm/fp-go/tuple"
|
||||
R "github.com/IBM/fp-go/readerio/generic"
|
||||
T "github.com/IBM/fp-go/tuple"
|
||||
)
|
||||
|
||||
// SequenceT converts n inputs of higher kinded types into a higher kinded types of n strongly typed values, represented as a tuple
|
||||
|
@@ -4,7 +4,7 @@ package readerio
|
||||
import (
|
||||
"context"
|
||||
|
||||
R "github.com/ibm/fp-go/readerio"
|
||||
R "github.com/IBM/fp-go/readerio"
|
||||
)
|
||||
|
||||
// ReaderIO is a specialization of the ReaderIO monad assuming a golang context as the context of the monad
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package readerioeither
|
||||
|
||||
import (
|
||||
G "github.com/ibm/fp-go/context/readerioeither/generic"
|
||||
G "github.com/IBM/fp-go/context/readerioeither/generic"
|
||||
)
|
||||
|
||||
// WithContext wraps an existing ReaderIOEither and performs a context check for cancellation before delegating
|
||||
|
@@ -3,9 +3,9 @@ package readerioeither
|
||||
import (
|
||||
"context"
|
||||
|
||||
G "github.com/ibm/fp-go/context/readerioeither/generic"
|
||||
ET "github.com/ibm/fp-go/either"
|
||||
EQ "github.com/ibm/fp-go/eq"
|
||||
G "github.com/IBM/fp-go/context/readerioeither/generic"
|
||||
ET "github.com/IBM/fp-go/either"
|
||||
EQ "github.com/IBM/fp-go/eq"
|
||||
)
|
||||
|
||||
// Eq implements the equals predicate for values contained in the IOEither monad
|
||||
|
@@ -3,11 +3,11 @@ package exec
|
||||
import (
|
||||
"context"
|
||||
|
||||
RIOE "github.com/ibm/fp-go/context/readerioeither"
|
||||
"github.com/ibm/fp-go/exec"
|
||||
F "github.com/ibm/fp-go/function"
|
||||
GE "github.com/ibm/fp-go/internal/exec"
|
||||
IOE "github.com/ibm/fp-go/ioeither"
|
||||
RIOE "github.com/IBM/fp-go/context/readerioeither"
|
||||
"github.com/IBM/fp-go/exec"
|
||||
F "github.com/IBM/fp-go/function"
|
||||
GE "github.com/IBM/fp-go/internal/exec"
|
||||
IOE "github.com/IBM/fp-go/ioeither"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@@ -5,11 +5,11 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
|
||||
RIOE "github.com/ibm/fp-go/context/readerioeither"
|
||||
ET "github.com/ibm/fp-go/either"
|
||||
F "github.com/ibm/fp-go/function"
|
||||
"github.com/ibm/fp-go/internal/file"
|
||||
IOE "github.com/ibm/fp-go/ioeither"
|
||||
RIOE "github.com/IBM/fp-go/context/readerioeither"
|
||||
ET "github.com/IBM/fp-go/either"
|
||||
F "github.com/IBM/fp-go/function"
|
||||
"github.com/IBM/fp-go/internal/file"
|
||||
IOE "github.com/IBM/fp-go/ioeither"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@@ -7,7 +7,7 @@ package readerioeither
|
||||
import (
|
||||
"context"
|
||||
|
||||
G "github.com/ibm/fp-go/context/readerioeither/generic"
|
||||
G "github.com/IBM/fp-go/context/readerioeither/generic"
|
||||
)
|
||||
|
||||
// Eitherize0 converts a function with 0 parameters returning a tuple into a function with 0 parameters returning a [ReaderIOEither[R]]
|
||||
|
@@ -3,9 +3,9 @@ package generic
|
||||
import (
|
||||
"context"
|
||||
|
||||
CIOE "github.com/ibm/fp-go/context/ioeither/generic"
|
||||
E "github.com/ibm/fp-go/either"
|
||||
IOE "github.com/ibm/fp-go/ioeither/generic"
|
||||
CIOE "github.com/IBM/fp-go/context/ioeither/generic"
|
||||
E "github.com/IBM/fp-go/either"
|
||||
IOE "github.com/IBM/fp-go/ioeither/generic"
|
||||
)
|
||||
|
||||
// withContext wraps an existing ReaderIOEither and performs a context check for cancellation before delegating
|
||||
|
@@ -3,10 +3,10 @@ package generic
|
||||
import (
|
||||
"context"
|
||||
|
||||
E "github.com/ibm/fp-go/either"
|
||||
ET "github.com/ibm/fp-go/either"
|
||||
EQ "github.com/ibm/fp-go/eq"
|
||||
G "github.com/ibm/fp-go/readerioeither/generic"
|
||||
E "github.com/IBM/fp-go/either"
|
||||
ET "github.com/IBM/fp-go/either"
|
||||
EQ "github.com/IBM/fp-go/eq"
|
||||
G "github.com/IBM/fp-go/readerioeither/generic"
|
||||
)
|
||||
|
||||
// Eq implements the equals predicate for values contained in the IOEither monad
|
||||
|
@@ -7,8 +7,8 @@ package generic
|
||||
import (
|
||||
"context"
|
||||
|
||||
E "github.com/ibm/fp-go/either"
|
||||
RE "github.com/ibm/fp-go/readerioeither/generic"
|
||||
E "github.com/IBM/fp-go/either"
|
||||
RE "github.com/IBM/fp-go/readerioeither/generic"
|
||||
)
|
||||
|
||||
// Eitherize0 converts a function with 0 parameters returning a tuple into a function with 0 parameters returning a [GRA]
|
||||
|
@@ -4,13 +4,13 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
E "github.com/ibm/fp-go/either"
|
||||
ER "github.com/ibm/fp-go/errors"
|
||||
F "github.com/ibm/fp-go/function"
|
||||
IO "github.com/ibm/fp-go/io/generic"
|
||||
IOE "github.com/ibm/fp-go/ioeither/generic"
|
||||
O "github.com/ibm/fp-go/option"
|
||||
RIE "github.com/ibm/fp-go/readerioeither/generic"
|
||||
E "github.com/IBM/fp-go/either"
|
||||
ER "github.com/IBM/fp-go/errors"
|
||||
F "github.com/IBM/fp-go/function"
|
||||
IO "github.com/IBM/fp-go/io/generic"
|
||||
IOE "github.com/IBM/fp-go/ioeither/generic"
|
||||
O "github.com/IBM/fp-go/option"
|
||||
RIE "github.com/IBM/fp-go/readerioeither/generic"
|
||||
)
|
||||
|
||||
func FromEither[
|
||||
|
@@ -3,9 +3,9 @@ package generic
|
||||
import (
|
||||
"context"
|
||||
|
||||
E "github.com/ibm/fp-go/either"
|
||||
F "github.com/ibm/fp-go/function"
|
||||
RIE "github.com/ibm/fp-go/readerioeither/generic"
|
||||
E "github.com/IBM/fp-go/either"
|
||||
F "github.com/IBM/fp-go/function"
|
||||
RIE "github.com/IBM/fp-go/readerioeither/generic"
|
||||
)
|
||||
|
||||
// WithResource constructs a function that creates a resource, then operates on it and then releases the resource
|
||||
|
@@ -3,9 +3,9 @@ package generic
|
||||
import (
|
||||
"context"
|
||||
|
||||
E "github.com/ibm/fp-go/either"
|
||||
RE "github.com/ibm/fp-go/readerioeither/generic"
|
||||
T "github.com/ibm/fp-go/tuple"
|
||||
E "github.com/IBM/fp-go/either"
|
||||
RE "github.com/IBM/fp-go/readerioeither/generic"
|
||||
T "github.com/IBM/fp-go/tuple"
|
||||
)
|
||||
|
||||
// SequenceT converts n inputs of higher kinded types into a higher kinded types of n strongly typed values, represented as a tuple
|
||||
|
@@ -3,8 +3,8 @@ package generic
|
||||
import (
|
||||
"context"
|
||||
|
||||
E "github.com/ibm/fp-go/either"
|
||||
RE "github.com/ibm/fp-go/readerioeither/generic"
|
||||
E "github.com/IBM/fp-go/either"
|
||||
RE "github.com/IBM/fp-go/readerioeither/generic"
|
||||
)
|
||||
|
||||
// TraverseArray transforms an array
|
||||
|
@@ -4,14 +4,14 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
B "github.com/ibm/fp-go/bytes"
|
||||
RIOE "github.com/ibm/fp-go/context/readerioeither"
|
||||
F "github.com/ibm/fp-go/function"
|
||||
H "github.com/ibm/fp-go/http"
|
||||
IOE "github.com/ibm/fp-go/ioeither"
|
||||
IOEF "github.com/ibm/fp-go/ioeither/file"
|
||||
J "github.com/ibm/fp-go/json"
|
||||
T "github.com/ibm/fp-go/tuple"
|
||||
B "github.com/IBM/fp-go/bytes"
|
||||
RIOE "github.com/IBM/fp-go/context/readerioeither"
|
||||
F "github.com/IBM/fp-go/function"
|
||||
H "github.com/IBM/fp-go/http"
|
||||
IOE "github.com/IBM/fp-go/ioeither"
|
||||
IOEF "github.com/IBM/fp-go/ioeither/file"
|
||||
J "github.com/IBM/fp-go/json"
|
||||
T "github.com/IBM/fp-go/tuple"
|
||||
)
|
||||
|
||||
type (
|
||||
|
@@ -4,13 +4,13 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
R "github.com/ibm/fp-go/context/reader"
|
||||
RIO "github.com/ibm/fp-go/context/readerio"
|
||||
G "github.com/ibm/fp-go/context/readerioeither/generic"
|
||||
ET "github.com/ibm/fp-go/either"
|
||||
IO "github.com/ibm/fp-go/io"
|
||||
IOE "github.com/ibm/fp-go/ioeither"
|
||||
O "github.com/ibm/fp-go/option"
|
||||
R "github.com/IBM/fp-go/context/reader"
|
||||
RIO "github.com/IBM/fp-go/context/readerio"
|
||||
G "github.com/IBM/fp-go/context/readerioeither/generic"
|
||||
ET "github.com/IBM/fp-go/either"
|
||||
IO "github.com/IBM/fp-go/io"
|
||||
IOE "github.com/IBM/fp-go/ioeither"
|
||||
O "github.com/IBM/fp-go/option"
|
||||
)
|
||||
|
||||
func FromEither[A any](e ET.Either[error, A]) ReaderIOEither[A] {
|
||||
|
@@ -6,9 +6,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
E "github.com/ibm/fp-go/either"
|
||||
F "github.com/ibm/fp-go/function"
|
||||
"github.com/ibm/fp-go/internal/utils"
|
||||
E "github.com/IBM/fp-go/either"
|
||||
F "github.com/IBM/fp-go/function"
|
||||
"github.com/IBM/fp-go/internal/utils"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package readerioeither
|
||||
|
||||
import (
|
||||
G "github.com/ibm/fp-go/context/readerioeither/generic"
|
||||
G "github.com/IBM/fp-go/context/readerioeither/generic"
|
||||
)
|
||||
|
||||
// WithResource constructs a function that creates a resource, then operates on it and then releases the resource
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package readerioeither
|
||||
|
||||
import (
|
||||
G "github.com/ibm/fp-go/context/readerioeither/generic"
|
||||
T "github.com/ibm/fp-go/tuple"
|
||||
G "github.com/IBM/fp-go/context/readerioeither/generic"
|
||||
T "github.com/IBM/fp-go/tuple"
|
||||
)
|
||||
|
||||
// SequenceT converts n inputs of higher kinded types into a higher kinded types of n strongly typed values, represented as a tuple
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package readerioeither
|
||||
|
||||
import (
|
||||
G "github.com/ibm/fp-go/context/readerioeither/generic"
|
||||
G "github.com/IBM/fp-go/context/readerioeither/generic"
|
||||
)
|
||||
|
||||
// TraverseArray transforms an array
|
||||
|
@@ -4,7 +4,7 @@ package readerioeither
|
||||
import (
|
||||
"context"
|
||||
|
||||
RE "github.com/ibm/fp-go/readerioeither"
|
||||
RE "github.com/IBM/fp-go/readerioeither"
|
||||
)
|
||||
|
||||
// ReaderIOEither is a specialization of the Reader monad for the typical golang scenario
|
||||
|
Reference in New Issue
Block a user