jrmccluskey commented on a change in pull request #16923:
URL: https://github.com/apache/beam/pull/16923#discussion_r822780069



##########
File path: sdks/go/pkg/beam/core/graph/coder/coder.go
##########
@@ -440,3 +454,9 @@ func checkCodersNotNil(list []*Coder) {
                }
        }
 }
+
+func checkCoderNotNil(c *Coder, outercoder string) {

Review comment:
       Having this function take the singular name for the helper that was 
already written is a little unclear since the signature takes the outer coder 
name as a debug string. You could route the check through the existing helper 
since the stack trace will indicate that it was a nil coder being passed to 
NewN()

##########
File path: sdks/go/pkg/beam/core/graph/coder/coder_test.go
##########
@@ -517,6 +524,59 @@ func TestNewKV(t *testing.T) {
        }
 }
 
+func TestNewNullable(t *testing.T) {
+       bytes := NewBytes()
+
+       tests := []struct {
+               name        string
+               component   *Coder
+               shouldpanic bool
+               want        *Coder
+       }{{

Review comment:
       Fix formatting here




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


Reply via email to