fjl / gencodec

Command gencodec generates marshaling methods for Go struct types.
MIT License
54 stars 26 forks source link

add support for mapping to functions in override type #2

Closed bas-vk closed 7 years ago

bas-vk commented 7 years ago

This PR adds support for including output of function on serialization of objects. See godoc in main.go for more information and an example.

@fjl, since functions cannot have tags this PR grabs the tags from the override structure while field tags are grabbed from the original type. Is might be a bit confusion for users but I don't have a good solution.