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