youngoli commented on a change in pull request #14666:
URL: https://github.com/apache/beam/pull/14666#discussion_r623534122
##########
File path: sdks/go/examples/xlang/transforms.go
##########
@@ -17,12 +17,31 @@
package xlang
import (
+ "reflect"
+
"github.com/apache/beam/sdks/go/pkg/beam"
"github.com/apache/beam/sdks/go/pkg/beam/core/graph"
"github.com/apache/beam/sdks/go/pkg/beam/core/typex"
"github.com/apache/beam/sdks/go/pkg/beam/core/util/reflectx"
)
+func init() {
+ beam.RegisterType(reflect.TypeOf((*PrefixPayload)(nil)).Elem())
+}
+
+type PrefixPayload struct {
Review comment:
Done. Made it unexported but still added documentation, including a link
to the Java equivalent.
##########
File path: sdks/go/examples/xlang/transforms.go
##########
@@ -17,12 +17,31 @@
package xlang
import (
+ "reflect"
+
"github.com/apache/beam/sdks/go/pkg/beam"
"github.com/apache/beam/sdks/go/pkg/beam/core/graph"
"github.com/apache/beam/sdks/go/pkg/beam/core/typex"
"github.com/apache/beam/sdks/go/pkg/beam/core/util/reflectx"
)
+func init() {
+ beam.RegisterType(reflect.TypeOf((*PrefixPayload)(nil)).Elem())
+}
+
+type PrefixPayload struct {
+ Data string
+}
+
+func Prefix(s beam.Scope, prefix string, addr string, col beam.PCollection)
beam.PCollection {
Review comment:
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.
For queries about this service, please contact Infrastructure at:
[email protected]