In my package main, I have:
type InfoToSend struct {
id string
field1 string
field2 string
}
and I call a method send:
err = rpc.SendValue(toSend.id, toSend.field1, toSend.field2)
I would like to refactor it to:
err = rpc.SendValue(toSend)
But in the rpc
package, I cannot access the main.InfoToSend struct.
func SendValue(info InfoToSend) error {
...
}
What can do about it ?