We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
func main() { r := gin.Default() store := cookie.NewStore([]byte("secret")) r.Use(sessions.Sessions("mysession", store)) r.PUT("/hello", func(c *gin.Context) { session := sessions.Default(c) session.Set("hello", struct{ Name string }{Name: "gin"}) err := session.Save() if err != nil { panic(err) } c.Status(204) }) r.Run(":8000") }
This code will throw error:
securecookie: error - caused by: gob: type not registered for interface: struct { Name string }
Since gorilla/sessions already supports complex data types in sessions, will gin/session consider following up?
The text was updated successfully, but these errors were encountered:
Use gob.Register to register the type i also had this issue i just registered the type and everything worked
gob.Register
Sorry, something went wrong.
No branches or pull requests
This code will throw error:
Since gorilla/sessions already supports complex data types in sessions, will gin/session consider following up?
The text was updated successfully, but these errors were encountered: