When I learn go language, I was confused by interface{} parameter
for example, I use the net/rpc
the interface is:
// description: Call invokes the named function, waits for it to complete, and returns its error status.
func (client *Client) Call(serviceMethod string, args interface{}, reply interface{}) error
I just pass the reply parameter as value, the program will error:rpc call error:reading body gob: attempt to decode into a non-pointer
so how to distinguish when I should pass pointer or pass value for the interface.