[
https://issues.apache.org/jira/browse/BEAM-12513?focusedWorklogId=618161&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-618161
]
ASF GitHub Bot logged work on BEAM-12513:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 02/Jul/21 16:01
Start Date: 02/Jul/21 16:01
Worklog Time Spent: 10m
Work Description: jrmccluskey commented on a change in pull request
#15057:
URL: https://github.com/apache/beam/pull/15057#discussion_r663110713
##########
File path: website/www/site/content/en/documentation/programming-guide.md
##########
@@ -716,11 +837,45 @@ static class ComputeWordLengthFn extends DoFn<String,
Integer> {
{{< code_sample "sdks/python/apache_beam/examples/snippets/snippets_test.py"
model_pardo_pardo >}}
{{< /highlight >}}
-{{< paragraph class="language-java" >}}
+{{< highlight go >}}
+{{< code_sample "sdks/go/examples/snippets/04transforms.go" model_pardo_pardo
>}}
+{{< /highlight >}}
+
+{{< paragraph class="language-go" >}}
+Simple DoFns can also be written as functions.
+{{< /paragraph >}}
+
+{{< highlight go >}}
+func ComputeWordLengthFn(word string, emit func(int)) { ... }
+
+func init() {
+ beam.RegisterFunction(ComputeWordLengthFn)
+}
+{{< /highlight >}}
+
+<span class="language-go" >
+
+> **Note:** Wether using a structural `DoFn` type or a functional `DoFn`, they
should be registered with
Review comment:
```suggestion
> **Note:** Whether using a structural `DoFn` type or a functional `DoFn`,
they should be registered with
```
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 618161)
Time Spent: 7h 50m (was: 7h 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: 7h 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)