// SayHi implements Service. Primarily useful in a client.
func (e Endpoints) SayHi(ctx context.Context, name string) (reply string, err error) {
request := SayHiRequest{
Name: name,
}
response, err := e.SayHiEndpoint(ctx, request)
if err != nil {
return
}
return response.(SayHiResponse).Reply, response.(SayHiResponse).Err
}
The above is the an endpoint code generated by kit,both req&rsp aren't pointer type,why is it?
I think convert req&rsp to pointer type is better way, it avoids value copy, isn't it ?
The above is the an endpoint code generated by kit,both req&rsp aren't pointer type,why is it? I think convert req&rsp to pointer type is better way, it avoids value copy, isn't it ?