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 2022/06/17 18:28:50 UTC

[GitHub] [beam] gonzojive commented on issue #21930: [Feature Request]: Go SDK: coder.RegisterCoder needs more precise docstring

gonzojive commented on issue #21930:
URL: https://github.com/apache/beam/issues/21930#issuecomment-1159133353

   Aha, here is what I'm now seeing in the docs. This should at least be linked from the mentioned functions.
   
   ```go
   type CustomCoder struct {
   	// Name is the coder name. Informational only.
   	Name [string](https://pkg.go.dev/builtin#string)
   	// Type is the underlying concrete type that is being coded. It is
   	// available to Enc and Dec. It must be a concrete type.
   	Type [reflect](https://pkg.go.dev/reflect).[Type](https://pkg.go.dev/reflect#Type)
   
   	// Enc is the encoding function : T -> []byte. It may optionally take a
   	// reflect.Type parameter and return an error as well.
   	Enc *[funcx](https://pkg.go.dev/github.com/apache/beam/sdks/v2@v2.39.0/go/pkg/beam/core/funcx).[Fn](https://pkg.go.dev/github.com/apache/beam/sdks/v2@v2.39.0/go/pkg/beam/core/funcx#Fn)
   	// Dec is the decoding function: []byte -> T. It may optionally take a
   	// reflect.Type parameter and return an error as well.
   	Dec *[funcx](https://pkg.go.dev/github.com/apache/beam/sdks/v2@v2.39.0/go/pkg/beam/core/funcx).[Fn](https://pkg.go.dev/github.com/apache/beam/sdks/v2@v2.39.0/go/pkg/beam/core/funcx#Fn)
   
   	ID [string](https://pkg.go.dev/builtin#string) // (optional) This coder's ID if translated from a pipeline proto.
   }
   ```


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org