Skip to content

Commit 5b6d1ec

Browse files
maxtaran2010maxtaran2010
andauthored
fix: correct typos in doc comments (batch.go, reduce.go) (#87)
fix: correct typos in doc comments - batch.go: "Batch take" -> "Batch takes" (missing trailing 's', inconsistent with all other doc comments in the package) - internal/core/reduce.go: "inout" -> "input" in MapReduce comment Signed-off-by: maxtaran2010 <ocotifuzo727@gmail.com> Co-authored-by: maxtaran2010 <ocotifuzo727@gmail.com>
1 parent 4e1b932 commit 5b6d1ec

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

batch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/destel/rill/internal/core"
77
)
88

9-
// Batch take a stream of items and returns a stream of batches based on a maximum size and a timeout.
9+
// Batch takes a stream of items and returns a stream of batches based on a maximum size and a timeout.
1010
//
1111
// A batch is emitted when one of the following conditions is met:
1212
// - The batch reaches the maximum size

internal/core/reduce.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func reduceIntoMap[K comparable, V any](m map[K]V, k K, v V, f func(V, V) V) {
8080
}
8181

8282
// MapReduce applies a map-reduce pattern to the input channel.
83-
// First inout is converted into key-value pairs using the mapper function and nm goroutines.
83+
// First input is converted into key-value pairs using the mapper function and nm goroutines.
8484
// If there are multiple values for the same key, they are reduced into a single value using the reducer function and nr goroutines.
8585
// The result is a map where each key is associated with a single value.
8686
func MapReduce[A any, K comparable, V any](in <-chan A, nm int, mapper func(A) (K, V), nr int, reducer func(V, V) V) map[K]V {

0 commit comments

Comments
 (0)