Skip to content

Commit

Permalink
fix: better use method
Browse files Browse the repository at this point in the history
  • Loading branch information
Marina-Sakai committed Jun 11, 2024
1 parent cf834ad commit 585bce3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/genericclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ type genericServiceClient struct {

func (gc *genericServiceClient) GenericCall(ctx context.Context, method string, request interface{}, callOptions ...callopt.Option) (response interface{}, err error) {
ctx = client.NewCtxWithCallOptions(ctx, callOptions)
_args := gc.svcInfo.MethodInfo(serviceinfo.GenericService).NewArgs().(*generic.Args)
_args := gc.svcInfo.MethodInfo(method).NewArgs().(*generic.Args)
_args.Method = method
_args.Request = request

Expand All @@ -106,7 +106,7 @@ func (gc *genericServiceClient) GenericCall(ctx context.Context, method string,
return nil, gc.kClient.Call(ctx, mt.Name, _args, nil)
}

_result := gc.svcInfo.MethodInfo(serviceinfo.GenericService).NewResult().(*generic.Result)
_result := gc.svcInfo.MethodInfo(method).NewResult().(*generic.Result)
if err = gc.kClient.Call(ctx, mt.Name, _args, _result); err != nil {
return
}
Expand Down

0 comments on commit 585bce3

Please sign in to comment.