Open aiqency opened 3 years ago
Im getting this as well in the future of 2024 :+1: any chance you found a work around?
Try change the argument type of GreeterRPCServer.Greet from interface{}
to your defined type Arg
//func (s *GreeterRPCServer) Greet(args interface{}, resp *string) error {
func (s *GreeterRPCServer) Greet(args Arg, resp *string) error {
//*resp = s.Impl.Greet()
*resp = s.Impl.Greet(args)
return nil
}
How am I suppose to pass a struct argument to the
basic
rpc example?So far I did that and got the panic shown in the comment:
I'm not very familiar with rpc but the
net/rpc
package tests works and are pretty straightforward.Am I missing something?