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

fix: switch internal implementation of iterator from Tuple2 to Pair

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
Dr. Carsten Leue
2024-02-12 10:33:42 +01:00
parent 51ed1693a5
commit d0e4984b60
30 changed files with 301 additions and 175 deletions

View File

@@ -16,18 +16,18 @@
package exec
import (
T "github.com/IBM/fp-go/tuple"
P "github.com/IBM/fp-go/pair"
)
type (
// CommandOutput represents the output of executing a command. The first field in the [Tuple2] is
// stdout, the second one is stderr. Use [StdOut] and [StdErr] to access these fields
CommandOutput = T.Tuple2[[]byte, []byte]
CommandOutput = P.Pair[[]byte, []byte]
)
var (
// StdOut returns the field of a [CommandOutput] representing `stdout`
StdOut = T.First[[]byte, []byte]
StdOut = P.Head[[]byte, []byte]
// StdErr returns the field of a [CommandOutput] representing `stderr`
StdErr = T.Second[[]byte, []byte]
StdErr = P.Tail[[]byte, []byte]
)