go-cache icon indicating copy to clipboard operation
go-cache copied to clipboard

gob: name not registered for interface: "*main.Person"

Open sujunbo opened this issue 5 years ago • 1 comments

err := dataCache.LoadFile("./data") fmt.Println(err)

Caching object data to a file and then loading cached data from a file failed. Is it not supported to load object data from a file?

sujunbo avatar Jul 01 '20 01:07 sujunbo

func init() {
  gob.Register(Person{})
}

jszwec avatar Jul 30 '20 20:07 jszwec