[ 
https://issues.apache.org/jira/browse/BEAM-12513?focusedWorklogId=614810&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-614810
 ]

ASF GitHub Bot logged work on BEAM-12513:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Jun/21 01:18
            Start Date: 25/Jun/21 01:18
    Worklog Time Spent: 10m 
      Work Description: damondouglas commented on a change in pull request 
#15057:
URL: https://github.com/apache/beam/pull/15057#discussion_r658395186



##########
File path: website/www/site/content/en/documentation/programming-guide.md
##########
@@ -675,10 +746,31 @@ the types of the input and output elements. If your 
`DoFn` processes incoming
 look like this:
 {{< /paragraph >}}
 
+{{< paragraph class="language-go" >}}
+A `DoFn` processes one element at a time from the input `PCollection`. When you
+create a `DoFn` struct, you'll need to provide type parameters that match
+the types of the input and output elements in a ProcessElement method.
+If your `DoFn` processes incoming `string` elements and produces `int` elements
+for the output collection (like our previous example, `ComputeWordLengthFn`), 
your dofn could
+look like this:
+{{< /paragraph >}}
+
 {{< highlight java >}}
 static class ComputeWordLengthFn extends DoFn<String, Integer> { ... }
 {{< /highlight >}}
 
+{{< highlight go >}}
+type ComputeWordLengthFn struct{}

Review comment:
       Suggested change:
   
   ```
   type ComputeWordLengthFn struct{}
   ```
   
   to
   
   ```
   // ComputeWordLengthFn is a DoFn that computes the word length of string 
elements.
   type ComputeWordLengthFn struct{}
   ```




-- 
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.

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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 614810)
    Time Spent: 3h 50m  (was: 3h 40m)

> Complete Go SDK inclusion to Beam Programming Guide
> ---------------------------------------------------
>
>                 Key: BEAM-12513
>                 URL: https://issues.apache.org/jira/browse/BEAM-12513
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-go
>            Reporter: Robert Burke
>            Assignee: Robert Burke
>            Priority: P2
>          Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> BPG Go Audit snapshot: 
> [https://docs.google.com/spreadsheets/d/1DrBFjxPBmMMmPfeFr6jr_JndxGOes8qDqKZ2Uxwvvds/edit?resourcekey=0-tVFwcLrQ2v2jpZkHk6QOpQ#gid=2072310090]
> Goal is to include Go SDK code for all missing snippets, and where code can't 
> yet exist, file and link a Jira instead.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to