lostluck commented on code in PR #29181:
URL: https://github.com/apache/beam/pull/29181#discussion_r1376442302


##########
sdks/go/pkg/beam/pardo.go:
##########
@@ -207,28 +211,34 @@ func ParDo0(s Scope, dofn any, col PCollection, opts 
...Option) {
 // options, and their contents accessible to each of the DoFn operations. For
 // example:
 //
+//     func filterLessThanCutoff(word string, cutoff int, emit func(string)) {
+//             if len(word) < cutoff {
+//                     emit(word)
+//             }
+//     }
+//     func init() { register.Function3x0(filterLessThanCutoff) }
+//
 //     words := ...
 //     cufoff := ...  // Singleton PCollection<int>
-//     smallWords := beam.ParDo(s, func (word string, cutoff int, emit 
func(string)) {
-//           if len(word) < cutoff {
-//                emit(word)
-//           }
-//     }, words, beam.SideInput{Input: cutoff})
+//     smallWords := beam.ParDo(s, filterLessThanCutoff, words, 
beam.SideInput{Input: cutoff})
 //
 // # Additional Outputs
 //
 // Optionally, a ParDo transform can produce zero or multiple output
 // PCollections. Note the use of ParDo2 to specfic 2 outputs. For example:
 //
+//     func partitionAtCutoff(word string, cutoff int, small,big func(string)) 
{

Review Comment:
   Good catch. Thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to