aboutsummaryrefslogtreecommitdiffstats
path: root/skate/zipkey
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-07-22 00:23:00 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-07-22 00:23:00 +0200
commit912dd621a6ac66f86b2ad32df8db6ebc1570c0f3 (patch)
treeada71e8305ab84f7d59cb573fcd80632bc465158 /skate/zipkey
parent2f69336ef77d6396d6db4d6e8536e94dc7aa2b08 (diff)
downloadrefcat-912dd621a6ac66f86b2ad32df8db6ebc1570c0f3.tar.gz
refcat-912dd621a6ac66f86b2ad32df8db6ebc1570c0f3.zip
cleanup (old) clustering related code
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