Skip to content

Commit f5bf394

Browse files
whencanibecinar
andauthored
Fix outdated float64 doc comments in helper package (#353)
# Describe Request Doc comments in the helper package still referenced float64 despite the functions having been migrated to generics. This PR updates the comments in all 20 affected files to accurately reflect the generic type parameters (T, F) used in their signatures. # Change Type Documentation fix (no functional changes) Co-authored-by: Onur Cinar <onur.cinar@gmail.com>
1 parent e86d913 commit f5bf394

20 files changed

Lines changed: 22 additions & 22 deletions

helper/abs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package helper
66

77
import "math"
88

9-
// Abs calculates the absolute value of each value in a channel of float64.
9+
// Abs calculates the absolute value of each value in a channel of type T.
1010
//
1111
// Example:
1212
//

helper/add.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
package helper
66

7-
// Add adds each pair of values from the two input channels of float64
7+
// Add adds each pair of values from the two input channels of type T
88
// and returns a new channel containing the sums.
99
//
1010
// Example:

helper/apply.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ package helper
66

77
// Apply applies the given transformation function to each element in the
88
// input channel and returns a new channel containing the transformed
9-
// values. The transformation function takes a float64 value as input
10-
// and returns a float64 value as output.
9+
// values. The transformation function takes a value of type T as input
10+
// and returns a value of type T as output.
1111
//
1212
// Example:
1313
//

helper/chan_to_slice.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
package helper
66

7-
// ChanToSlice converts a channel of float64 to a slice of float64.
7+
// ChanToSlice converts a channel of type T to a slice of type T.
88
//
99
// Example:
1010
//

helper/divide.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
package helper
66

7-
// Divide takes two channels of float64 and divides the values
7+
// Divide takes two channels of type T and divides the values
88
// from the first channel with the values from the second one.
99
// It returns a new channel containing the results of
1010
// the division.

helper/divide_by.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
package helper
66

77
// DivideBy divides each element in the input channel
8-
// of float64 values by the given divider and returns a
8+
// of type T values by the given divider and returns a
99
// new channel containing the divided values.
1010
//
1111
// Example:

helper/filter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package helper
66

77
// Filter filters the items from the input channel based on the
88
// provided predicate function. The predicate function takes a
9-
// float64 value as input and returns a boolean value indicating
9+
// value of type T as input and returns a boolean value indicating
1010
// whether the value should be included in the output channel.
1111
//
1212
// Example:

helper/head.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
package helper
66

77
// Head retrieves the specified number of elements
8-
// from the given channel of float64 values and
8+
// from the given channel of type T values and
99
// delivers them through a new channel.
1010
//
1111
// Example:

helper/keep_negatives.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
package helper
66

7-
// KeepNegatives processes a stream of float64 values, retaining negative
7+
// KeepNegatives processes a stream of type T values, retaining negative
88
// values unchanged and replacing positive values with zero.
99
//
1010
// Example:

helper/keep_positives.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
package helper
66

7-
// KeepPositives processes a stream of float64 values, retaining positive
7+
// KeepPositives processes a stream of type T values, retaining positive
88
// values unchanged and replacing negative values with zero.
99
//
1010
// Example:

0 commit comments

Comments
 (0)