-
Notifications
You must be signed in to change notification settings - Fork 8
Gob error
rameshvk edited this page Apr 2, 2019
·
1 revision
DOT requires all value and change types to be registered with encoding/gob
to be able to be transmitted across the network.
It is very easy to forget this. A typical encoding error is something like:
gob: type not registered for interface: types.Counter
The solution is to stick the following into both the server and client code:
import "encoding/gob"
func init() {
var zero types.Counter
gob.Register(zero)
}