lostluck commented on a change in pull request #13070:
URL: https://github.com/apache/beam/pull/13070#discussion_r503570217
##########
File path: sdks/go/pkg/beam/core/runtime/exec/dynsplit_test.go
##########
@@ -103,11 +103,11 @@ func TestDynamicSplit(t *testing.T) {
// with the input coder to the path.
// TODO(BEAM-10579) Switch to using splittable unit's
input coder
// once that is implemented.
- p, err := decodeDynSplitElm(splitRes.split.PS, cdr)
+ p, err := decodeDynSplitElm(splitRes.split.PS[0], cdr)
Review comment:
Go, being a simple language would have you put the if in there. It would
be a waste to wrap it in a function unless the pattern is repeating. At least
not until generics land and we can define a `GetOnlyElement[T any](slice []T) {
... }` helper.
----------------------------------------------------------------
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]