It would be very nice to have all marshal/unmarshal private function in client/encode_decode.go to be public as it
enables better integration testing, withhout having to do it manuall again. So having that feature I can do
Scenario:
endpoint := cl.GetContract()
req := cm.GetContractPayload{Token: token, ID: id}
resp, err = endpoint(ctx, &req) // type "Contract"
// you wanna reuse that `resp` type directly with another endpoint.
// if `encode_decode.go` unmarshal/marshal stuff would be public
// I could do
endpoint := cl.GetBanana()
req2 := cm.GetBananaPayload{Token: token, ID: id}
resp2, err = endpoint(ctx, unmarshalContractToContractRequestBody(resp) ) // marshal/unmarshal to "ContractRequestBody"