You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lo...@apache.org on 2022/06/22 23:20:38 UTC
[beam-starter-go] 16/17: make myPipeline private
This is an automated email from the ASF dual-hosted git repository.
lostluck pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/beam-starter-go.git
commit 09cf63d11c2218122d946e689e027ebf50683d74
Author: David Cavazos <dc...@google.com>
AuthorDate: Fri Jun 17 14:11:01 2022 -0700
make myPipeline private
---
main.go | 4 ++--
main_test.go | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/main.go b/main.go
index 1c00014..cb3a265 100644
--- a/main.go
+++ b/main.go
@@ -27,7 +27,7 @@ func logAndEmit(ctx context.Context, element string, emit func(string)) {
emit(element)
}
-func MyPipeline(scope beam.Scope, input_text string) beam.PCollection {
+func myPipeline(scope beam.Scope, input_text string) beam.PCollection {
elements := beam.Create(scope, "hello", "world!", input_text)
elements = beam.ParDo(scope, strings.Title, elements)
return beam.ParDo(scope, logAndEmit, elements)
@@ -39,7 +39,7 @@ func main() {
ctx := context.Background()
pipeline, scope := beam.NewPipelineWithRoot()
- MyPipeline(scope, *input_text)
+ myPipeline(scope, *input_text)
// Run the pipeline. You can specify your runner with the --runner flag.
if err := beamx.Run(ctx, pipeline); err != nil {
diff --git a/main_test.go b/main_test.go
index 77848f7..f31d48d 100644
--- a/main_test.go
+++ b/main_test.go
@@ -14,7 +14,7 @@ func TestPipeline(t *testing.T) {
pipeline, scope := beam.NewPipelineWithRoot()
// Note that the order of the elements doesn't matter.
- elements := MyPipeline(scope, "Test")
+ elements := myPipeline(scope, "Test")
passert.Equals(scope, elements, "Test", "Hello", "World!")
ptest.RunAndValidate(t, pipeline)
}