Closed manhdaovan closed 5 years ago
This has come up a few times, and after some thorough discussion, we've decided not to do it. Previous issues have the discussion: https://github.com/twitchtv/twirp/issues/187 https://github.com/twitchtv/twirp/issues/184
If the
RequestReceived
ofServerHooks
struct is changed tofunc(ctx context.Context, req interface{}) (context.Context, error)
instead offunc(context.Context) (context.Context, error)
, go-proto-validators can be integrated to validate request message content.For example: