You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/09/07 15:23:16 UTC

[GitHub] [beam] pcoet commented on a diff in pull request #23057: clean up comments and register functional DoFn in wordcount.go

pcoet commented on code in PR #23057:
URL: https://github.com/apache/beam/pull/23057#discussion_r964983116


##########
sdks/go/examples/wordcount/wordcount.go:
##########
@@ -93,39 +93,47 @@ var (
 	output = flag.String("output", "", "Output file (required).")
 )
 
-// Concept #3: You can make your pipeline assembly code less verbose and by
+// Concept #3: You can make your pipeline assembly code less verbose by
 // defining your DoFns statically out-of-line. A DoFn can be defined as a Go
 // function and is conventionally suffixed "Fn". The argument and return types
-// dictate the pipeline shape when used in a ParDo: for example,
+// dictate the pipeline shape when used in a ParDo. For example,
 //
-//      formatFn: string x int -> string
+//	formatFn: string x int -> string
 //
-// indicate that it operates on a PCollection of type KV<string,int>, representing
-// key value pairs of strings and ints, and outputs a PCollection of type string.
-// Beam typechecks the pipeline before running it.
+// indicates that the function operates on a PCollection of type KV<string,int>,
+// representing key value pairs of strings and ints, and outputs a PCollection
+// of type string. Beam typechecks the pipeline before running it.
 //
-// DoFns that potentially output zero or multiple elements can also be Go functions,
-// but have a different signature. For example,
+// DoFns that potentially output zero or multiple elements can also be Go
+// functions, but have a different signature. For example,
 //
-//       extractFn : string x func(string) -> ()
+//	extractFn : string x func(string) -> ()
 //
-// uses an "emit" function argument instead of string return type to allow it to
-// output any number of elements. It operates on a PCollection of type string and
-// returns a PCollection of type string. Also, using named function transforms allows
-// for easy reuse, modular testing, and an improved monitoring experience.
+// uses an "emit" function argument instead of a string return type to allow it
+// to output any number of elements. It operates on a PCollection of type string
+// and returns a PCollection of type string. Also, using named function
+// transforms allows for easy reuse, modular testing, and an improved monitoring
+// experience.

Review Comment:
   Yes, agreed. Done.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org