aboutsummaryrefslogtreecommitdiffstats
path: root/skate/zipkey
diff options
context:
space:
mode:
Diffstat (limited to 'skate/zipkey')
-rw-r--r--skate/zipkey/zipkey.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/skate/zipkey/zipkey.go b/skate/zipkey/zipkey.go
index ffd33fe..e5e9f07 100644
--- a/skate/zipkey/zipkey.go
+++ b/skate/zipkey/zipkey.go
@@ -21,10 +21,10 @@ type (
)
// ZipRun reads records (separated by sep) from two readers, extracts a key
-// from each record with a keyFunc and collects records from the two streams
-// into a Group. A callback groupFunc can be registered, which allows to
-// customize the processing of the group. Current limitation: both streams need
-// to use the same keyFunc.
+// from each record with a keyFunc and collects records with the same key from
+// the two streams into a Group. A callback groupFunc can be registered, which
+// allows to customize the processing of the group. Current limitation: both
+// streams need to use the same keyFunc.
type ZipRun struct {
r0, r1 *bufio.Reader
kf keyFunc
@@ -44,7 +44,7 @@ func New(r0, r1 io.Reader, kf keyFunc, gf groupFunc) *ZipRun {
}
// Run starts reading from both readers. The process stops, if one reader is
-// exhausted or reads from any reader fail.
+// exhausted or a read from any reader fails.
func (z *ZipRun) Run() error {
var (
k0, k1, c0, c1 string // key: k0, k1; current line: c0, c1