You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/08/19 16:15:37 UTC

[GitHub] [beam] lostluck commented on a change in pull request #12628: [BEAM-3301] Consolidating starcgen method names in graph/fn.go and adding SDF names.

lostluck commented on a change in pull request #12628:
URL: https://github.com/apache/beam/pull/12628#discussion_r473145499



##########
File path: sdks/go/pkg/beam/core/graph/fn.go
##########
@@ -167,6 +167,23 @@ const (
 	// TODO: ViewFn, etc.
 )
 
+var methodNames = []string{

Review comment:
       Consider using a map[string]struct{} instead instead of looping over a slice.
   
   Alternatively, given that this is a combination of both doFnNames and sdfNames, consider  
   var methodNames = append(append(nil, doFnNames...), sdfNames...)
   
   which avoids duplicating the constant lists.




----------------------------------------------------------------
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:
users@infra.apache.org